用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/PiLastDigit/TRIP-workflow --skill trip-2-implement命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | TRIP-2-implement |
| description | Implement a feature following TRIP plan |
| argument-hint | plan file or feature to implement |
You are now in implementation mode for [PROJECT_NAME].
Before implementing, you MUST read ALL THE LINES of:
Implement: $ARGUMENTS
Always create a dedicated branch before implementing — no need to ask. TRIP-3-release merges it back into the main branch with fast-forward, keeping a single clean linear history.
git checkout -b feat/[short-description] # or fix/[short-description]
Derive the short description from the plan/feature name. If already on a dedicated branch for this work (e.g., resuming a session), continue on it.
You do NOT write the implementation yourself — delegate it to Codex via the codex-implement skill. (Exception: trivial unplanned changes of a few lines may be done directly.)
Delegation is batched: Codex implements a few of the plan's checkboxes per turn, you review and fix each batch, then request the next one with your corrections attached. Same persistent thread throughout — context and conventions compound across turns.
Read the plan fully and split its to-dos into batches. You are the judge of batch size:
Start the session with the first batch (state dir is handled by the script):
bash .claude/skills/codex-implement/scripts/start.sh \
--prompt-file .claude/skills/codex-implement/prompts/implement.tpl \
<plan-path> "Implement only: <batch-1 checkboxes>" # or omit instructions to one-shot a small plan
Each next batch resumes the same thread, carrying your review corrections as --notes:
export STATE_DIR=".claude/skills/codex-implement/state"
bash .claude/skills/codex-plan-review/scripts/resume.sh \
--prompt-file .claude/skills/codex-implement/prompts/continue.tpl \
--notes "<what you fixed after the last batch and why; conventions to apply from now on>" \
<plan-path> "Now implement: <next batch checkboxes>"
Parse the trailing tag of each report:
IMPLEMENTATION_COMPLETE → review the batch (below).IMPLEMENTATION_PARTIAL → read the report; resume with instructions for the remainder, or finish small leftovers yourself during the batch review.After each Codex report, before requesting the next batch:
git status -s && git diff — worktree vs index shows just this batch, since previous batches are staged (step 4). Check it against the plan, ARCHI.md patterns, and project conventions (DRY, KISS, comment discipline, error-handling and naming conventions from ARCHI.md).--notes of the next resume.git add -A — stage the reviewed batch so the next delta review starts clean. No commits — history stays clean for release.Adapt as you go: clean batch → grow the next one; heavy corrections → shrink the next one and spell out the fix pattern in the notes. If Codex ignores notes or repeats corrected mistakes late in a long session, reset the thread at the next batch boundary — the plan file plus a summary note rebuilds context.
After the last batch, read the full feature diff once (git diff HEAD). Batch reviews catch local issues; this pass catches cross-batch drift — duplicated helpers, divergent naming, dead code left by course corrections. Fix directly.
The testing gate and Codex code review run once, after the final pass — never per batch. Proceed to the testing gate once you consider the implementation good for review.
After implementation, before the Codex review loop. Any failure here blocks the loop from starting.
# [ADAPT_TO_PROJECT: Replace with actual lint/type-check/build commands during Init]
[LINT_COMMAND] 2>&1 | tee /tmp/_trip2-lint.txt
[TYPECHECK_COMMAND] 2>&1 | tee /tmp/_trip2-typecheck.txt
[TEST_COMMAND] <pattern-for-affected-files>
Only the files/areas the change touched — never the full suite by default.
If the change modifies an externally observable contract (API shape, UI selectors, auth behavior), exercise it with the project's integration/E2E tooling. Docs-only changes skip this.
If the change adds new logic, write its tests now, guided by the plan's Test Impact section and the project's testing guide (see TRIP-test). If no new logic was added, skip this step.
Hard-to-cover code policy:
docs/4-unit-tests/COVERAGE-DEBT.md (path | why hard | escape plan).Format: lint: clean | typecheck: clean | tests: N passed (M new)
Fix failures before starting the loop.
Always run the Codex code review after the testing gate passes — no confirmation needed.
Always export before invoking shared scripts:
export STATE_DIR=".claude/skills/codex-code-review/state"
Start:
bash .claude/skills/codex-plan-review/scripts/start.sh \
--prompt-file .claude/skills/codex-code-review/prompts/start.tpl \
<plan-path> "$GATE_SUMMARY"
$GATE_SUMMARY is the testing-gate summary (lint | typecheck | tests). For unplanned work (no F_*.plan.md), pass a free-form label instead of a plan path.
Parse trailing tag: APPROVED -> synthesize. NEEDS_REWORK -> surface to user. REQUEST_CHANGES -> continue.
Address findings — quote each with file:line, read the actual code, fix legitimate ones, push back on incorrect ones. Critical/Major block approval; Minor/Suggestion are case-by-case.
Write implementer notes (1-3 sentences): which findings you fixed, which you pushed back on and why, any user decisions or environment limitations Codex should stop re-flagging.
Resume (re-run the testing gate first — lint, typecheck, affected tests — and build a fresh summary):
bash .claude/skills/codex-plan-review/scripts/resume.sh \
--prompt-file .claude/skills/codex-code-review/prompts/resume.tpl \
--notes "Fixed X. Pushed back on Y because Z." \
<plan-path> "$GATE_SUMMARY"
Loop to step 2.
No cap — keep iterating until Codex returns APPROVED.
Skip if loop converged on Turn 1 (state file already holds full review).
Turn-N state files hold only that turn's delta. After multi-round convergence, produce a consolidated review:
bash .claude/skills/codex-plan-review/scripts/resume.sh \
--prompt-file .claude/skills/codex-code-review/prompts/synthesize.tpl \
<plan-path> "Today's date is YYYY-MM-DD"
Outputs PROMOTION_READY sentinel. <x.y.z> Version placeholder left unfilled (resolved during TRIP-3-release).
Edge case:
TRIP-3-release: "Code review skipped — trivial change."Surface reviews verbatim. Keep edits scoped. If Codex repeats a finding, re-read carefully — you likely addressed an adjacent concern. Reset thread only if context is confused. The testing gate (lint, typecheck, affected tests) must pass before APPROVED.
After Codex converges (or is skipped):
AskUserQuestion tool to ask:
If "Yes": proceed directly into the release — read .claude/skills/TRIP-3-release/SKILL.md and follow it in this session, passing the same plan path (or feature label). The release skill owns everything from version bump to the fast-forward merge and push.
If "No": continue working, then repeat the sequence: testing gate → Codex review → this question.