用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/PiLastDigit/TRIP-workflow --skill trip-upgrade命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | TRIP-upgrade |
| description | Upgrade TRIP workflow skills to a newer version while preserving project customizations |
| disable-model-invocation | true |
| argument-hint | [path to new-TRIP folder] |
You are now in upgrade mode — merging a newer version of the TRIP workflow into this project's existing, customized TRIP skills.
Each project's TRIP skills have two interleaved layers:
A naive copy would destroy layer 2. This skill separates both layers, applies the new skeleton, and re-injects the customizations.
The user must have copied the new generic TRIP skills into a staging folder before running this skill. Default location: .claude/skills/new-TRIP/
If $ARGUMENTS is provided, treat it as the path to the staging folder. Otherwise use .claude/skills/new-TRIP/.
Confirm the staging folder exists and contains TRIP skills:
ls -R <staging-path>/
If missing or empty, tell the user:
"No staging folder found at
<path>. Copy the new TRIP workflow'sskills/folder there first, then re-run."
List all skill folders in both locations:
# Currently installed
ls -d .claude/skills/*/
# New (staging)
ls -d <staging-path>/*/
Categorize each skill into one of:
| Category | Meaning | Action |
|---|---|---|
| New | Exists in staging only | Copy directly |
| Removed | Exists in installed only | Warn user, leave in place |
| Unchanged | Identical in both | Skip |
| Updated — pure workflow | Changed, but no project customizations | Replace directly |
| Updated — customized | Changed, AND contains project-specific content | Extract → merge → replace |
Pure workflow skills (no project customizations): TRIP-compact, TRIP-hotfix, TRIP-research, TRIP-init, codex-implement, codex-plan-review, codex-code-review
Exception — model defaults: codex-plan-review/scripts/_common.sh holds the per-flow Codex model/effort/service-tier defaults, which the user may have tuned. Before replacing, diff the installed _common.sh against staging — if the model/effort/tier values differ from the generic defaults, carry the user's values into the new file.
Customized skills (have project-specific content): TRIP-1-plan, TRIP-2-implement, TRIP-3-release, TRIP-review, TRIP-test
Renamed in TRIP v2 — when the installed folder uses an old name, treat it as the same skill under its new name (merge into the new name, then delete the old folder):
| Installed (old) | Staging (new) |
|---|---|
TRIP-3-review | TRIP-review |
TRIP-4-test | TRIP-test |
TRIP-3-release is new in v2 but its project values (version file, week anchor, tutorial config) are extracted from the old TRIP-2-implement's post-implementation steps — categorize it as customized even though no folder exists yet.
Other non-TRIP skills in staging (e.g. future additions): Treat as new, or as pure workflow if they already exist.
For each skill, diff the installed vs new version to confirm whether it actually changed:
diff -rq .claude/skills/<skill>/ <staging-path>/<skill>/
Show a summary table to the user:
Skill | Status | Action
--------------------- | ------------------- | ------
TRIP-1-plan | Updated (customized) | Extract + merge
TRIP-2-implement | Updated (customized) | Extract + merge
TRIP-3-release | New (customized) | New template + values from old TRIP-2
TRIP-review | Renamed + updated | Extract + merge, delete TRIP-3-review/
TRIP-test | Renamed + updated | Extract + merge, delete TRIP-4-test/
TRIP-compact | Unchanged | Skip
TRIP-hotfix | Unchanged | Skip
TRIP-init | Updated (pure) | Replace
TRIP-research | Unchanged | Skip
codex-plan-review | New | Copy
codex-code-review | New | Copy
codex-implement | New | Copy
AskUserQuestion: "Here's the upgrade plan. Proceed?"
Options: "Yes, start upgrade" (recommended) / "Let me review the new files first" / "Abort"
Before touching any installed files, read every customized skill and extract all project-specific values into a context block. This is your safety net — everything here gets re-injected later.
Read every file in the installed skills directory that will be affected.
Build a context block by extracting these values from the installed skills:
From TRIP-1-plan/SKILL.md:
PROJECT_NAME — the text that replaced [PROJECT_NAME] (appears in the # Planning Mode header and **planning mode** for line)TECHNICAL_CONSIDERATIONS — the full content of the ## Technical Considerations section in the plan template (everything between ## Technical Considerations and the next ## heading)GUIDANCE_SECTIONS — everything after the plan template's closing section that replaced [ADAPT_TO_PROJECT: Guidance Sections] (project-specific per-component guidance at the bottom of the file)DOC_IMPACT_CANDIDATES — the candidates list inside the plan template's ## Documentation Impact section, if present (may not exist in pre-v2.5 installs)PLAN_PREREQUISITES — any additional living-docs lines in the Prerequisites list beyond ARCHI.md, if presentFrom TRIP-2-implement/SKILL.md (in v1 installs, the release values below live in its Post-Implementation steps; in v2 installs they live in TRIP-3-release/SKILL.md):
PROJECT_NAME — (confirm matches TRIP-1-plan)VERSION_FILE — the text that replaced [VERSION_FILE] in Step 2WEEK_ANCHOR_DATE — the date that replaced [WEEK_ANCHOR_DATE] in Step 1TUTORIAL_CONFIG — if tutorials are enabled: the full Tutorial step block with user context. If disabled: note "tutorials disabled"LINT_COMMAND — if present (may not exist in older versions)TYPECHECK_COMMAND — if presentTEST_COMMAND — if presentFrom TRIP-review/SKILL.md — or TRIP-3-review/ in v1 installs (checklist.md if already split):
REVIEW_CHECKLIST — the full checklist content. In older versions this is inline in SKILL.md. In newer versions it's in checklist.md. Extract it wherever it lives.CR_TEMPLATE — if cr-template.md exists, extract it. Otherwise note "no template file — using inline template"From TRIP-test/SKILL.md — or TRIP-4-test/ in v1 installs:
TEST_COMMANDS — the full Commands sectionTEST_STRUCTURE — the test structure descriptionTESTING_PRIORITIES — the full testing priorities sectionShow the user a summary of what was extracted:
Extracted project context:
- Project name: [name]
- Version file: [path]
- Week anchor: [date]
- Tutorials: [enabled/disabled]
- Test commands: [lint] / [typecheck] / [test]
- Checklist sections: [count] sections ([list names])
- Guidance sections: [count] sections ([list names])
- Technical considerations: [count] items
AskUserQuestion: "Extracted project context looks correct?"
Options: "Yes, continue" / "No, let me correct something"
If "No": let the user specify corrections, update the context block.
Before merging, handle any structural changes between the old and new workflow versions. Read both old and new files to detect what changed structurally.
Old structure (early v1): Checklist inline in TRIP-3-review/SKILL.md
New structure (v2): Checklist in separate TRIP-review/checklist.md, template in TRIP-review/cr-template.md (late-v1 installs have these same files under TRIP-3-review/)
If the installed version has the checklist inline in SKILL.md (no separate checklist.md):
REVIEW_CHECKLIST from Phase 2 is the project-customized checklistchecklist.md in Phase 4If the installed version already has checklist.md:
Old structure: No Codex review steps New structure: TRIP-1-plan has Step 3 (Codex plan review), TRIP-2-implement has Codex Code Review section
These are pure workflow additions — no project-specific content to migrate. They will be applied from the new template. The only project-specific part is the test commands in TRIP-2-implement's Codex pre-step, which come from the extracted context.
If not installed yet, these are entirely new — copy from staging directly. The review skills reference TRIP-review/checklist.md and TRIP-review/cr-template.md, which will be populated with project content. If already installed (late-v1), replace as pure workflow (see the _common.sh exception in Phase 1.2) — v1 prompt templates point at the old TRIP-3-review/ paths and must be replaced with the v2 versions.
For each skill, apply the appropriate action from the Phase 1 inventory.
cp -r <staging-path>/<skill>/ .claude/skills/<skill>/
For skills with state/ directories, ensure .gitignore is in place.
rm -rf .claude/skills/<skill>/
cp -r <staging-path>/<skill>/ .claude/skills/<skill>/
For each customized skill, take the new template from staging and inject the extracted project context from Phase 2. This is the core of the upgrade.
General approach: Read the new template file. Find each placeholder or generic section. Replace with the corresponding extracted value. Write the result.
[PROJECT_NAME] with extracted PROJECT_NAME## Technical Considerations block in the plan template with extracted TECHNICAL_CONSIDERATIONS[ADAPT_TO_PROJECT: Guidance Sections] comment block with extracted GUIDANCE_SECTIONS[ADAPT_TO_PROJECT] marker in the ## Documentation Impact section: use extracted DOC_IMPACT_CANDIDATES if present; otherwise build the list from the project's living docs (README, module READMEs, operations/user manuals, reference specs next to the code, contributor guides), one bullet per doc with when it's affected[ADAPT_TO_PROJECT] line in the Prerequisites list: use extracted PLAN_PREREQUISITES if present; otherwise list any living docs a plan must respect beyond ARCHI.md, or delete the line if there are none[PROJECT_NAME] with extracted PROJECT_NAME[LINT_COMMAND], [TYPECHECK_COMMAND], [TEST_COMMAND] in the Testing Gate with extracted commands
[PROJECT_NAME] with extracted PROJECT_NAME[VERSION_FILE] with extracted VERSION_FILE[WEEK_ANCHOR_DATE] with extracted WEEK_ANCHOR_DATE[MAIN_BRANCH] with the repo's default branch name[TUTORIAL_STEP] block[TUTORIAL_STEP] block with extracted TUTORIAL_CONFIG and renumber subsequent stepsTRIP-3-review in v1)SKILL.md: Start from the new template. Replace [PROJECT_NAME].checklist.md: Start from the new template. Replace the [ADAPT_TO_PROJECT] comment block with the project-specific checklist sections from the extracted REVIEW_CHECKLIST.
[ADAPT_TO_PROJECT] marker and renumber if needed.cr-template.md: Start from the new template. Update the Checklist section names to match the actual sections in the merged checklist.md.TRIP-4-test in v1)[PROJECT_NAME] with extracted PROJECT_NAME[TEST_COMMAND_*] placeholders with extracted TEST_COMMANDSTEST_STRUCTURETESTING_PRIORITIESAfter building all merged content in memory, write every file. Do NOT write partial results — complete the full merge first, then write all at once.
After writing all files, run a validation pass.
Scan all upgraded skill files for leftover placeholders:
grep -rn '\[ADAPT_TO_PROJECT\|\[PROJECT_NAME\]\|\[VERSION_FILE\]\|\[WEEK_ANCHOR_DATE\]\|\[TEST_COMMAND\]\|\[LINT_COMMAND\]\|\[TYPECHECK_COMMAND\]\|\[TUTORIAL_STEP\]\|\[MAIN_BRANCH\]' .claude/skills/TRIP-*/
If any are found, fill them from context or ask the user.
checklist.md section names must match cr-template.md checklist section namescodex-code-review/prompts/start.tpl and resume.tpl reference .claude/skills/TRIP-review/checklist.md — confirm it exists, and that no template still points at the old TRIP-3-review/ pathcodex-code-review/prompts/synthesize.tpl and codex-code-review/SKILL.md reference .claude/skills/TRIP-review/cr-template.md — confirm it existsTRIP-1-plan and TRIP-2-implement reference codex-plan-review/scripts/start.sh and resume.sh; TRIP-2-implement also references codex-implement/scripts/start.sh — confirm they existShow what changed:
Upgrade complete:
- New skills added: [list]
- Skills updated: [list]
- Skills unchanged: [list]
- Project customizations preserved: [list key ones]
AskUserQuestion: "Upgrade applied. Review the changes?"
Options: "Looks good" / "Show me the diffs" / "Revert everything"
If "Show me the diffs": run git diff .claude/skills/ and present.
If "Revert everything": git checkout -- .claude/skills/
After user confirms:
Remove the staging folder:
rm -rf <staging-path>
Report completion:
"TRIP workflow upgraded. The staging folder has been removed. You can
git diff .claude/skills/to review all changes before committing."
This is the most common upgrade path. The Codex skills are "New" — copy directly. The Codex integration in TRIP-1-plan and TRIP-2-implement comes from the new template and needs no project-specific content except test commands.
The structural migration in Phase 3.1 handles this. Extract the custom checklist content from the old SKILL.md, inject into the new checklist.md.
Everything categorizes as "Unchanged" or minor updates. The merge is trivial.
These are "Removed" in the inventory — warn the user but leave them in place. Never delete skills that exist only in the installed version.
If the old version predates the Codex review pre-step and TRIP-4-test doesn't have extractable commands, ask the user:
AskUserQuestion: "The new workflow needs lint/typecheck/test commands for Codex code review. What are the commands for this project?"
Options: "Let me provide them" (user types commands) / "Skip for now" (leave placeholders)