用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/bdarbaz/claude-stack-plugin --skill s-build命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
| name | s-build |
| description | Implement current phase tasks using TDD - RED > GREEN > REFACTOR cycle with commits |
You are implementing the current phase's tasks using strict Test-Driven Development. Every line of production code must be justified by a failing test. Follow the RED > GREEN > REFACTOR cycle without exception.
Before starting, read:
.planning/STATE.md - Identify the active phase number (N)..planning/phases/N/PLAN.md - Get the task list for the active phase..planning/ROADMAP.md - Understand how this phase fits the bigger picture.${CLAUDE_PLUGIN_ROOT}/lib/tdd-protocol.md - Load the TDD protocol into your working memory. Follow it exactly.If no active phase is set in STATE.md, tell the user: "No active phase found. Run /s:plan first."
If all tasks in the current phase are marked complete, tell the user: "Phase {N} is complete. Moving to phase {N+1}." and update STATE.md accordingly. If there is no next phase, suggest /s:review and /s:verify.
For each incomplete task in the phase plan (in order), execute the following cycle:
Before writing any code, tell the user:
Starting Task {N.M}: {title}
Status: RED (writing failing test)
Determine the test file location. Follow the project's existing test conventions. If none exist, use:
__tests__/{module}.test.{ext} or {module}.test.{ext} next to sourcetests/test_{module}.py{module}_test.go in the same packagetests/ directory with appropriate namingWrite the test FIRST. The test should:
Run the test. It MUST fail. If it passes, something is wrong:
Show the failure to the user:
RED: {test name} - FAILED as expected
Error: {brief error description}
Write the minimum code to make the failing test pass. This means:
Run the test again. It MUST pass now. If it still fails:
Run ALL existing tests (not just the new one). If any other test broke:
Show the success:
GREEN: {test name} - PASSED
All tests: {pass count} passed, {fail count} failed
Review the code you just wrote. Look for:
Refactor only if there is a clear improvement. Do not refactor for the sake of it. Small, obvious improvements only.
Run ALL tests after refactoring. Everything must still pass. If anything breaks, undo the refactor.
If no refactoring needed, say so:
REFACTOR: No changes needed. Code is clean.
After each GREEN (and optional REFACTOR), create a git commit:
git add {changed files}
git commit -m "feat({scope}): {what was implemented}
Task {N.M}: {task title}
TDD: RED > GREEN > REFACTOR complete"
Commit message conventions:
feat for new featuresfix for bug fixesrefactor for refactoring stepstest for test-only changesAfter completing each task, update .planning/STATE.md:
Also update .planning/phases/N/PLAN.md:
completeIf there are more tasks in the phase, announce the next one and repeat from Step 1.
If a task is blocked (dependency not met, unclear requirement), STOP and tell the user:
BLOCKED: Task {N.M} - {title}
Reason: {why it is blocked}
Suggestion: {what to do about it}
When ALL tasks in the phase are complete:
Create .planning/phases/N/SUMMARY.md:
# Phase {N} Summary: {Name}
**Status:** complete
**Started:** {date}
**Completed:** {date}
## What Was Built
- {feature/component 1}: {brief description}
- {feature/component 2}: {brief description}
## Test Coverage
- {X} test files created
- {Y} total tests
- All passing
## Key Decisions During Implementation
- {decision 1}: {rationale}
- {decision 2}: {rationale}
## Deviations from Plan
- {deviation 1}: {why}
## Files Created/Modified
- {file list}
## Learnings
- {learning 1}
- {learning 2}
phase-{N}-complete{N+1} (or complete if this was the last phase){DATE} | Phase {N} complete | {task count} tasks, {test count} testsPhase {N}: {name} COMPLETE
- {task count} tasks implemented
- {test count} tests passing
- {commit count} commits made
Next step: Run `/s:review` to review the implementation.
Or: Run `/s:build` again to start Phase {N+1}.
These rules come from ${CLAUDE_PLUGIN_ROOT}/lib/tdd-protocol.md and are absolute:
should_return_404_when_user_not_found not test_get_user.基于 SOC 职业分类