一键导入
testing
Test writing and fixing methodology. Covers TDD, investigating failures, and delegating fixes to agents. Use when writing tests or diagnosing test failures.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Test writing and fixing methodology. Covers TDD, investigating failures, and delegating fixes to agents. Use when writing tests or diagnosing test failures.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Structure Claude prompts for clarity and better results using roles, explicit instructions, context, positive framing, and strategic organization. Use when crafting prompts for complex tasks, long documents, tool workflows, or code generation.
Pause agent execution to have the human validate decisions, choose between options, answer freetext, or comment on a document — via the `hl` CLI. Every interaction is a kickoff that returns a job handle immediately; collect the human's answer later with `hl job result`. Use for material design decisions, approval gates, picks between meaningful alternatives, and markdown doc review. Not for trivial yes/no confirmations the agent should decide itself.
Validate technical designs against requirements for coverage, feasibility, and architectural soundness. Use after creating a design.
Validate implementation plans against requirements and design. Use after creating a plan to ensure full coverage and no ambiguities.
Validate requirements documents for EARS compliance, completeness, and consistency. Use after creating requirements.
Design CLIs for humans and LLM agents — subcommand shape, output streams, exit codes, JSON modes, TTY-aware color, structured errors, mutation safety. Use when building or refactoring a CLI, adding machine-readable output, writing --help, deciding stdout vs stderr, or making a tool agent-friendly.
基于 SOC 职业分类
| name | testing |
| description | Test writing and fixing methodology. Covers TDD, investigating failures, and delegating fixes to agents. Use when writing tests or diagnosing test failures. |
| user-invocable | true |
A failing test signals one of two things:
Don't assume. Read the failure, trace the code path, determine which is true before changing anything.
Common signs the test is wrong:
Common signs the code is broken:
When adding new functionality, write tests first:
Benefits:
Skip TDD when: fixing obvious bugs, exploratory prototyping, or when the test setup cost exceeds the implementation.
When using agents to fix test failures:
Why agents don't run tests:
In agent instructions, include:
Fix the failing test. Do NOT run the test suite—make your change and exit.
If an agent encounters ambiguity about whether to fix the test or the code, it should stop and report a blocker.
If no, keep investigating.