Skip to content
Development
Skill

/automated-test-planning

Produce a standalone test plan by analyzing code for test coverage gaps and edge cases. Use when you need to create, generate, or draft a test plan for a branch, need to analyze test coverage, or need to identify what tests to write for specific files or directories. Does not

From plugin
han
26747 skills31 agents
Install
$ npx -y skills add testdouble/han --skill automated-test-planning --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.
  • Slash command/automated-test-planning

Context preview

The summary Claude sees to decide when to auto-load this skill.

Produce a standalone test plan by analyzing code for test coverage gaps and edge cases. Use when you need to create, generate, or draft a test plan for a branch, need to analyze test coverage, or need to identify what tests to write for specific files or directories. Does not

SKILL.md

automated-test-planning.SKILL.md
name: automated-test-planning
description: >
  Produce a standalone test plan by analyzing code for test coverage gaps and edge cases. Use when you need to create,
  generate, or draft a test plan for a branch, need to analyze test coverage, or need to identify what tests to write
  for specific files or directories. Does not produce a plain-language plan for a person to run tests by hand — use
  manual-test-planning for that. Does not write test code — use tdd to implement behavior test-first. Does not
  refine existing plans — use iterative-plan-review. Does not review code quality, security, or style — use code-review
  for full code review. Does not evaluate architectural testability or structural coupling — use architectural-analysis
  for architectural assessment.
arguments: size
argument-hint: "[size: small | medium | large | dynamic] [optional: file paths, directories, or description of what to test]"
allowed-tools:
  Bash(git *), Bash(find *), Read, Grep, Glob, Agent,
  Bash(bash "${CLAUDE_PLUGIN_ROOT}/scripts/han-config-dir.sh")

Operating Principles

  • **Test behavior through the public API, never internals.** Every recommended test verifies observable behavior at a

public seam: the inputs a real caller supplies, the outputs and side effects they observe, and the interactions the unit has with the other objects and services it collaborates with. Do not recommend tests that reach into private methods, internal state, or implementation structure — those tests pin the _how_ and break on every refactor. When two designs would produce the same observable behavior, the test must pass for both. If a behavior can only be observed by inspecting internals, that is a signal the behavior belongs at a different seam, not a license to test the internal; note it and move the recommendation to the public boundary that exposes it. This is the depth ceiling: cover the critical behaviors a caller depends on, and stop. Do not specify tests for every branch, every private helper, or every intermediate value.

  • **YAGNI is a first-class operating principle for tests.** Apply the evidence-based YAGNI rule from

[../../references/yagni-rule.md](../../references/yagni-rule.md). A test is worth recommending only when (a) the code under review commits to a behavior the test verifies and (b) the failure mode the test would catch is realistic for this codebase. Tests for code paths that don't exist yet, hypothetical adversaries the code doesn't face, hypothetical scaling problems the workload doesn't have, "completeness" with existing tests, or symmetry ("we have a test for create, so we should have one for delete") are YAGNI candidates and go to the Deferred Tests section with the trigger that would justify writing them. When many speculative low-level tests can be replaced by one durable behavioral test that catches the same realistic failure modes, recommend the single test instead. Every test is ongoing maintenance and a brittleness surface.

  • **Dispatch in proportion to the question.** The size band chosen in Step 1.5 caps the roster, and a narrow question

gets one agent and a prose answer rather than a team and a full document. Never dispatch the full roster for a question a single agent can settle BECAUSE the dispatch overhead exceeds the work, and a reader who asked one question pays for a document they did not want.

Project Context

  • git installed: !`which git 2>/dev/null || echo "not installed"`
  • CLAUDE.md: !`find . -maxdepth 1 -name "CLAUDE.md" -type f`
  • project-discovery.md: !`find . -maxdepth 3 -name "project-discovery.md" -type f`
  • personal config directory: !`bash "${CLAUDE_PLUGIN_ROOT}/scripts/han-config-dir.sh" 2>/dev/null || echo "$HOME/.claude"`
  • project .han/config.md: !`cat .han/config.md 2>/dev/null || echo ""`

As your first action, use the Read tool on `.han/config.md` inside the `personal config directory` path above. A read that returns no file is no personal configuration: continue silently. When that file or the `project .han/config.md` probe supplies content, apply it per [config-rule.md](../../references/config-rule.md), which governs precedence between the two files, relative-path resolution, and what to do with a file that reads but cannot be used.

Step 1: Determine Scope

Resolve project config: read CLAUDE.md's `## Project Discovery` section for test command (under `### Commands and Tests`, not `### Frameworks and Tooling`), language, and framework; fall back to project-discovery.md. Store found values for use in later steps.

**Scope determination:** Check `git installed` from Project Context. If empty or `not installed`, skip to **Mode C** below.

Run `${CLAUDE_SKILL_DIR}/scripts/detect-test-context.sh` and parse its output. If `git-available: false`, skip to **Mode C** below.

**Mode A: Full git context** — `git-available: true` and the output contains a `changed-files-start` block with content.

  • If the user provided file paths, directories, or a description: use those as scope (do not go searching for plan files

or try to locate plans)

  • Otherwise: use the changed files list from the script output as scope

**Mode B: Uncommitted changes** — `git-available: true` but output contains `changed-files: none`.

  • If the user provided scope: use it as-is
  • Otherwise: run `git diff` (unstaged changes), `git diff --cached` (staged changes), and `git status --short`

(untracked files) to identify changed files; if any files are found, use those as scope

  • If no files found in any of those commands, fall through to **Mode C**

**Mode C: No git / no changes found** — git missing, not in a repo, or no changes detected in any state.

  • If the user provided file paths, directories, or a description of what to test: use those as-is
  • Otherwise: use Glob to discover source files in the current directory, excluding `node_modules/`, `.git/`, `vendor/`,

`dist/`, `build/`, `__pycache__/`, lock files; present the discovere

Read more
Ships withhan

Han is a suite of AI skills and agents for solo (or small-team) product engineers.

Get the whole plugin

Other skills on han.