create-test-plan

$npx mdskill add tobihagemann/turbo/create-test-plan

Analyze changes and generate a structured test plan for four levels of testing

  • Identify what changed in code based on user input, PR details, context, or app-level discovery.
  • Read and understand the actual code to determine expected behavior, error paths, and affected features.
  • Decide which tests are necessary by covering basic functionality, complex operations, adversarial testing, and cross-cutting scenarios.
  • Generate a test plan at .turbo/test-plan.md that includes detailed instructions for each level of testing.

SKILL.md

.github/skills/create-test-planView on GitHub ↗
---
name: create-test-plan
description: "Analyze what changed and generate a structured test plan at .turbo/test-plan.md covering four escalating levels: basic functionality, complex operations, adversarial testing, and cross-cutting scenarios. Use when the user asks to \"create a test plan\", \"plan tests\", \"what should I test\", \"generate test scenarios\", \"test plan for this PR\", or \"what are the test cases\"."
---

# Create Test Plan

Analyze what changed and generate a comprehensive test plan covering four escalating levels of testing depth.

## Step 1: Determine Scope

Resolve scope using the first match:

1. **User-specified** — the user says what to test. Use that.
2. **PR** — a PR URL or number is provided. Fetch the PR details (title, description, changed files, comments) and read the changed code.
3. **Conversation context** — prior conversation contains recent work (a feature, fix, or refactor). Extract what changed, where it lives, and expected behavior.
4. **App-level discovery** — fresh context with no prior work. Examine the project (entry points, routes, commands, README) to identify the app's core user-facing flows.

## Step 2: Analyze the Change

After identifying scope, read the actual code in depth to understand:

- What was added, modified, or removed
- Expected behavior (from PR descriptions, comments, commit messages, or specs)
- Assumptions the implementation makes
- Error paths and edge cases
- Other features or components that could be affected

## Step 3: Determine Testing Approach

Always check for project-specific testing skills or MCP tools first. Use the fallbacks below when nothing project-specific is available:

- **Web app** → `/agent-browser` skill if available, otherwise `claude-in-chrome` MCP
- **UI/native app** → `computer-use` MCP
- **CLI tool** → direct terminal execution
- **Library with no entry point** → report that interactive testing is not applicable and stop

## Step 4: Generate the Test Plan

For each level, generate specific, actionable test scenarios tailored to the actual change. Each scenario needs exact steps and an expected outcome.

### Level 1: Basic Functionality

Does the feature work at all? Verify the happy path and the most obvious behavior.

- Core feature works as described
- Expected output/UI matches the spec or PR description
- No regressions in directly related functionality

### Level 2: Complex Operations

Combine multiple actions in sequence. Verify state consistency across operations.

- Chain related operations (e.g., create, edit, rename, delete)
- Exercise different combinations of feature parameters
- Verify intermediate states are correct, not just the final result

### Level 3: Adversarial Testing

Actively try to break the feature. Explore boundary conditions and unexpected inputs.

- Invalid, empty, or extreme inputs
- Rapid repeated actions
- Interrupting operations midway (cancel, disconnect, close)
- Resource limits (very large files, deep structures, long names)
- Permission and access edge cases

### Level 4: Cross-Cutting Scenarios

Explore state interactions across system boundaries. These surface the hardest bugs.

- Concurrent modifications from different sources
- State transitions (online to offline to online, foreground to background)
- Interactions with other features that share state
- Race conditions between asynchronous operations

### When a Level Does Not Apply

If the change is small enough that a level has no meaningful scenarios (e.g., a typo fix has no cross-cutting scenarios), note "N/A for this change" with a brief explanation.

## Step 5: Present and Write

Output the plan as text. Then use `AskUserQuestion` to ask for approval before writing.

Create the `.turbo/` directory if it does not exist. Write the plan to `.turbo/test-plan.md` using this format:

```markdown
# Test Plan: <Feature/Change Name>

## Context

<Brief description of what changed and why>

## Approach

<Testing approach: agent-browser / claude-in-chrome / computer-use / terminal>
<Dev server command if applicable>

## Level 1: Basic Functionality

- [ ] **<Test name>** — <Steps to perform> → Expected: <expected outcome>

## Level 2: Complex Operations

- [ ] **<Test name>** — <Steps to perform> → Expected: <expected outcome>

## Level 3: Adversarial Testing

- [ ] **<Test name>** — <Steps to perform> → Expected: <expected outcome>

## Level 4: Cross-Cutting Scenarios

- [ ] **<Test name>** — <Steps to perform> → Expected: <expected outcome>
```

## Rules

- Generate at least 2 scenarios per level, more for complex changes.
- Each scenario must have concrete steps and an expected outcome specific to the change.
- Tailor all scenarios to the actual change. Generic test advice is not useful.

More from tobihagemann/turbo

SkillDescription
answer-reviewer-questionsFor each reviewer question on a PR, recall implementation reasoning and compose a raw answer. Use when the user asks to \"answer reviewer questions\", \"draft answers to PR questions\", or \"explain reviewer questions\".
apply-findingsApply findings by making the suggested code changes. Applies accepted verdicts, escalates ambiguous findings to the user, and offers to note genuine improvements for later. Use when the user asks to \"apply findings\", \"apply fixes\", \"apply suggestions\", \"apply accepted findings\", \"fix the findings\", or \"apply the review results\".
assess-technical-debtAssess project-wide structural technical debt: complexity hotspots, deprecated API usage, duplication clusters, and architecture rot. Ranks findings by impact and refactor effort into a report at .turbo/technical-debt.md. Use when the user asks to \"assess technical debt\", \"find technical debt\", \"review technical debt\", \"what should we refactor\", \"find refactoring candidates\", \"where is the code rot\", or \"what's our worst code\". Analysis-only — does not modify code.
changelog-rulesShared changelog conventions and formatting rules referenced by /create-changelog and /update-changelog. Not typically invoked directly.
claude-printRun a non-interactive Claude Code print-mode call from Codex. Use when the user asks to \"claude print\", \"ask claude\", \"run claude\", \"consult claude\", or when a Codex Turbo skill needs Claude as an independent peer reviewer.
code-styleEnforce mirror, reuse, and symmetry principles to keep new code consistent with surrounding code. Use when writing new code in an existing codebase, adding new features, refactoring, or making any code changes.
codex-execRun autonomous task execution using the codex CLI. Use when the user asks to \"codex exec\", \"run codex exec\", \"execute a task with codex\", or \"delegate to codex\".
commit-rulesShared commit message rules and technical constraints referenced by /stage-commit and /commit-staged. Not typically invoked directly.
commit-staged-pushCommit already-staged changes and push in one step. Use when the user asks to \"commit and push staged changes\", \"commit and push what's staged\", or \"commit staged and push\".
consult-claudeConsult Claude Code for second opinions, brainstorming, or difficult debugging from Codex. Use when the user asks to \"consult claude\", \"ask claude\", \"get claude's opinion\", \"brainstorm with claude\", or \"discuss with claude\".