一键导入
ctest
Write tests for a planned or implemented change. Use when the user says 'write tests', 'test this', 'TDD', or wants to create tests for a feature.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Write tests for a planned or implemented change. Use when the user says 'write tests', 'test this', 'TDD', or wants to create tests for a feature.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Explore requirements and approaches through collaborative dialogue before writing a right-sized requirements document and planning implementation. Use for feature ideas, problem framing, when the user says 'let's brainstorm', or when they want to think through options before deciding what to build.
Document a solved problem as reusable institutional knowledge with parallel research. Use when the user says 'document this', 'compound', 'save learnings', or wants to capture a solution for future reference.
Scaffold a new custom agent — reviewers, researchers, or workflow agents. Use when asked to create, scaffold, or add a new agent.
Enhance an existing plan with parallel research agents for depth, best practices, and implementation details. Use when the user says 'deepen the plan', 'research more', or when a plan has high-risk dimensions that need more investigation.
Review requirements or plan documents using parallel persona agents that surface role-specific issues. Use when a requirements document or plan document exists and the user wants to improve it, or when invoked by /cplan for quality gating.
Commit, push, and open a PR with an adaptive, value-first description. Use when the user says "commit and PR", "push and open a PR", "ship this", "create a PR", "open a pull request", or wants to go from working changes to an open pull request in one step. Also handles "update the PR description" or "refresh the PR description".
| name | ctest |
| description | Write tests for a planned or implemented change. Use when the user says 'write tests', 'test this', 'TDD', or wants to create tests for a feature. |
| argument-hint | Path to plan file or leave empty to read from docs/plans/.latest |
Write tests for a planned or implemented change. Works in two modes:
This skill uses the cexplore subagent to research testing conventions in the codebase.
docs/plans/.latestgit diff --name-only HEAD and check if implementation files already exist for the plan's taskscexplore subagent to find:
#askQuestions to confirm: "Proceed with these [N] tests?" with options to approve, add more, or adjust scope__tests__/, spec/, test/, colocated .test.ts)it("returns 404 when user does not exist") not it("test error")Run the test suite and check results based on mode:
Pre-implementation (red phase):
Post-implementation (verification):
docs/tests/.latest (one path per line)test: add failing tests for <feature> (TDD red phase)test: add tests for <feature>Use #askQuestions to ask what the user wants to do next, based on mode:
Pre-implementation:
| Option | When to show |
|---|---|
Start Implementation — load the /cwork skill | Always |
| Add more tests — continue writing tests | Always |
| Revise tests — adjust based on feedback | Always |
Post-implementation:
| Option | When to show |
|---|---|
Simplify Code — load the /csimplify skill | Always |
| Add more tests — continue writing tests | Always |
| Revise tests — adjust based on feedback | Always |
After the user picks a next skill, announce the handover and load the chosen skill.