Package findings from a completed spike into a durable, project-local skill that auto-loads on future similar work. Reads the most recent `.gsd/workflows/spikes
复制下面这句话,粘贴给 Claude Code、Codex、Cursor 等 AI 编程工具,它会读取安装说明并在你确认后完成安装。
请阅读 https://ai.atlankj.com/install/asset/gh-spike-wrap-up-ea862cfb6533 ,按照其中的说明把「spike-wrap-up」安装到你(当前 AI 工具)中。执行前先告诉我将运行的命令和写入的位置,等我确认。
查看 AI 将读取的安装说明正在读取 GitHub 原文…
内容来自 GitHub 原始文件,由原作者维护。在 GitHub 查看
GSD already watches .claude/skills/ (and .agents/skills/) at both user and project levels — see src/resources/extensions/gsd/skill-discovery.ts. Any skill written there is picked up on the next session without further wiring. This skill is the bridge from "spike done" to "skill available."
Invocation points:
/gsd start spike — prompt suggests running this skillRECOMMENDATION.md that deserves a permanent home
<core_principle> NOT EVERY SPIKE DESERVES A SKILL. If the recommendation was "don't do X," there may be no reusable guidance. Ask the user first; exit without writing if the answer is no.
PROJECT-LOCAL, NOT USER-GLOBAL. Write to .claude/skills/ in the repo, not ~/.claude/skills/. The skill encodes project-specific choices that should not leak into unrelated projects.
DESCRIPTION IS THE DISCOVERABILITY SIGNAL. The description field in frontmatter is the primary signal the agent uses to judge relevance and decide whether to load the skill — it is a heuristic, not a deterministic trigger. Write it as keywords the future agent will plausibly encounter, not a summary.
</core_principle>
.gsd/workflows/spikes/ — sort by mtime, newest first.Read the core files:
<spike>/SCOPE.md — the question that was asked<spike>/research/*.md — the angles investigated<spike>/RECOMMENDATION.md — the conclusionAsk the user — one round:
Is the conclusion reusable on future work, or was it specific to one decision?
Recommendation: packaging is worth it if the findings include repeatable guidance (how to evaluate X, a pattern to follow, a library's gotchas). If the spike ended in "we chose library Y, end of story," it probably belongs in .gsd/DECISIONS.md instead.
What is the trigger? When should a future agent load this skill? Give concrete keywords — "adding a new webhook handler", "writing a SQL migration", etc.
If the user says it's not worth packaging, offer instead to append a summary to .gsd/DECISIONS.md and stop.
Before writing, sketch in the conversation:
auth-webhook-setup, not webhook).Show this sketch to the user. One round of feedback. Iterate.
Write to .claude/skills/<name>/SKILL.md (create the directory). Match the frontmatter + XML-tag structure used by other bundled skills — see src/resources/skills/review/SKILL.md for the canonical shape.
Minimum structure:
---
name: <skill-name>
description: <one sentence with trigger keywords>
---
<objective>
<one paragraph — what this skill does>
</objective>
<context>
<when to invoke, what produced it (cite the spike), assumptions>
</context>
<process>
## Step 1: <action>
<instructions>
## Step 2: <action>
<instructions>
</process>
<anti_patterns>
- <gotcha from the spike>
- <another gotcha>
</anti_patterns>
<success_criteria>
- [ ] <observable confirmation>
- [ ] <observable confirmation>
</success_criteria>
If the spike produced a reusable template (a config file, a starter script), copy it into .claude/skills/<name>/templates/ or .claude/skills/<name>/references/ and reference it from the skill body.
.gsd/workflows/spikes/<slug>/RECOMMENDATION.md (dated YYYY-MM-DD).".gsd/DECISIONS.md: - YYYY-MM-DD [spike]: packaged "<slug>" findings as skill <name>.Tell the user the skill will be surfaced on the next session via skill-discovery.ts. If they want to use it immediately, they can Read .claude/skills/<name>/SKILL.md now.
<anti_patterns>
~/.claude/skills/. That's user-global. Project spikes produce project skills — keep them scoped.</anti_patterns>
<success_criteria>
.claude/skills/<name>/SKILL.md exists with well-formed frontmatter.description field uses keywords that will plausibly match future agent work..gsd/DECISIONS.md has a one-line entry recording the packaging.</success_criteria>