Co-Evolve
Four modes: Session (run at session end), Personalize (discover and integrate external skills), Registry (curate skillpacks/skill_dictionary.yaml and presets), Create (build a new skill from scratch). Skill creation and significant rewrites always go through skill-creator — never write to SKILL.md directly.
If skill-creator is unavailable in the current environment, stop and tell the user. Do not silently simulate its workflow.
Mode 1 — Session
Inputs
- Read
RESEARCH.md History section and the git log (git log --since="24 hours ago" --oneline).
Identify Candidate Lessons
- Look for: things that failed and why; unexpected experiment results; debugging insights that took significant effort; workflow improvements; decisions that were revisited or reversed.
Generalize Filter
- For each candidate: "Would this help in a different project on a different topic?"
- No → discard. Project-specific learnings stay in
RESEARCH.md.
- Yes → write a lesson file.
Write Lesson Files
Create lessons/YYYYMMDD-<slug>.md using LESSON.md.template. Fill in: Trigger, Lesson, Evidence, Applies to, Confidence (LOW/MED/HIGH), Status (PROPOSED).
If the lesson implies a skill change, classify it:
- Minor tweak (wording, one extra step, edge case) → write a unified diff under
## Proposed diff and a matching lessons/YYYYMMDD-<slug>.diff.
- New skill or significant rewrite → hand off to
skill-creator: describe the intent, provide the lesson as context, and follow its draft→test→iterate loop. The resulting SKILL.md lands in lessons/ as a proposal — never installed directly.
Session Summary
- Print:
Session summary:
- TODOs completed: N
- Key metrics: <any that moved>
- Lessons extracted: N
- Skill diffs proposed: N
- Tell the user: "Review proposed diffs in
lessons/. Merge with git apply or edit directly."
Mode 2 — Personalize
Activate when the user says "personalize", "integrate this skill", "find a skill for", or provides an external SKILL.md path or URL.
Step 0 — Discover (if no target provided)
- If the user gives a description rather than a path/URL, search the registry:
npx skills find "<query>"
Present the top results (name, description, install command) and ask the user which to integrate. Then continue with the chosen skill(s).
Step 1 — Read external skill(s)
- Read the target: a single SKILL.md, a skills directory, or a skill pack repo. Extract:
- Name, description, trigger phrases
- Tools, MCP servers, and external dependencies it references
- Behavioral patterns (workflows, delegation, output files)
Step 2 — Inventory installed skills
- Read all SKILL.md files in
~/.claude/skills/ (or the project .claude/skills/). Build a map of:
- Names and descriptions
- Tools and MCP servers already in use
- Overlapping trigger phrases
Step 3 — Analyze
For each external skill, assess three dimensions:
Compatibility — will it conflict?
- Name collision with an installed skill?
- References a tool/MCP not configured (e.g.,
alpha login not done)?
- Contradicts a behavioral rule in an existing skill?
Scope overlap — does it duplicate something?
- Substantially the same as an installed skill → flag as overlap, note the delta
- Partially overlapping → identify which parts are additive
New capability — what does it genuinely add?
- List capabilities not covered by any installed skill
Step 4 — Interview the user
Ask targeted questions based on the analysis. Ask all at once, not one-by-one:
For each overlap: > "<external> overlaps with your <installed>. It differs in: <delta>. Replace, merge, or skip?"
For each missing dependency: > "<external> requires <tool/MCP>. Do you have it? If not, skip those parts?"
For each behavioral conflict: > "<external> does <X> but your <installed> does <Y>. Which do you prefer?"
Open: > "Anything from this skill you explicitly don't want?"
Step 5 — Create or improve via skill-creator
Based on user answers, determine the scope:
- Additive merge (minor additions to an existing skill) → write a unified diff to
lessons/YYYYMMDD-personalize-<slug>.diff with a companion .md.
- New skill or substantial rewrite → hand off to
skill-creator: describe the desired skill, provide the source material and user's confirmed preferences as context, and follow its draft→test→iterate loop. Output lands in lessons/ as a proposal.
Tell the user: "Ready in lessons/. Review and apply with git apply when satisfied."
Mode 3 — Registry
Activate when the user asks to refresh the tracked skill-pack catalog, assess a new pack, compare packs, or update skillpacks/skill_dictionary.yaml / preset definitions.
Registry inputs
Read:
skillpacks/skill_dictionary.yaml
skillpacks/presets/*.yaml
README.md / README_CN.md pack comparison sections when relevant
If the user points at a new external repo, read its README and any obvious skill inventory files first.
Responsibilities
Maintain skillpacks/skill_dictionary.yaml as the shared curated registry.
For each pack or skill being assessed, judge:
- workflow fit
- gap coverage
- overlap cost
- dependency burden
- maintenance health
- composability
- supervision sensitivity
- autonomy bias
Normalize outputs into concise labels when possible:
- necessity:
default | recommended | optional | niche | avoid
- compatibility:
high | medium | low
- role:
base | donor | overlay | niche | experimental
Recommend subsets, not bulk imports, unless the user clearly asks for a full-pack strategy.
Update presets when the registry change meaningfully affects default recommendations.
Keep rationales concise and decision-oriented. The registry is for recommendation and comparison, not exhaustive catalog dumps.
Safety boundary
Registry curation may edit skillpacks/skill_dictionary.yaml and skillpacks/presets/*.yaml, but changes to existing SKILL.md behavior still require either:
- a minor diff proposal in
lessons/, or
- a
skill-creator handoff for substantial rewrites.
If a registry update would imply changing default project behavior materially, ask before proceeding.
Mode 4 — Create
Activate when the user says "create a skill for X" or "build a new skill".
- Capture intent: what should the skill do, when should it trigger, what's the expected output?
- Check
npx skills find "<intent>" — if a close match exists, suggest integrating it instead (Mode 2).
- If creating from scratch, hand off to
skill-creator with the captured intent. Follow its draft→test→iterate loop fully. Output lands in lessons/ as a proposal.
Constraints
- Never write directly to any
SKILL.md file. Always propose. The human merges.
- Create
lessons/ if it does not exist.
skillpacks/skill_dictionary.yaml and skillpacks/presets/*.yaml are curated repo metadata and may be updated directly in Registry mode when the user asks.
- All skill creation and significant rewrites go through
skill-creator. Raw diffs are only for minor, targeted changes.
- Err toward asking rather than assuming. One unanswered question beats a wrong assumption baked into a diff.
Example
Session mode: Experiment failed due to unset random seed. Minor → lessons/20260329-seed-reproducibility.diff. New workflow implied → hand off to skill-creator to draft a reproducibility-check skill.
Personalize mode: User says "find me a skill for LaTeX compilation" → npx skills find "latex" returns 3 results → user picks one → reads it, finds no conflicts → substantial enough to need skill-creator → draft→test→iterate → lessons/20260401-personalize-latex.diff.
Create mode: User says "create a skill for Slack notifications" → npx skills find "slack" finds a close match → suggests integrating it → user confirms → Mode 2 kicks in.
1---2name: co-evolve3description: Three modes. Session mode (default): extracts generalizable lessons from RESEARCH.md and git history at session end; lessons that imply a new or significantly changed skill are handed off to skill-creator. Personalize mode: searches the skills registry via `npx skills find`, reads the target skill(s), checks compatibility and scope overlap against installed skills, interviews the user to understand what they want and what to skip, then creates or improves skills using skill-creator. Registry mode: curates `skillpacks/skill_dictionary.yaml` and `skillpacks/presets/*.yaml` by assessing external packs, judging necessity/compatibility, and recommending subsets. Create mode: designs a brand- new skill from scratch using skill-creator. Never edits SKILL.md directly — all changes go through skill-creator's draft→test→iterate loop, human merges. Trigger phrases: "end session", "extract lessons", "personalize my skills", "integrate this skill", "update skillpack", "find a skill for", "create a skill", "improve skill",4---56# Co-Evolve78Four modes: **Session** (run at session end), **Personalize** (discover and integrate external skills), **Registry** (curate `skillpacks/skill_dictionary.yaml` and presets), **Create** (build a new skill from scratch). Skill creation and significant rewrites always go through `skill-creator` — never write to SKILL.md directly.910If `skill-creator` is unavailable in the current environment, stop and tell the user. Do not silently simulate its workflow.1112---1314## Mode 1 — Session1516### Inputs17181. Read `RESEARCH.md` **History** section and the git log (`git log --since="24 hours ago" --oneline`).1920### Identify Candidate Lessons21222. Look for: things that failed and why; unexpected experiment results; debugging insights that took significant effort; workflow improvements; decisions that were revisited or reversed.2324### Generalize Filter25263. For each candidate: *"Would this help in a different project on a different topic?"*27 - **No** → discard. Project-specific learnings stay in `RESEARCH.md`.28 - **Yes** → write a lesson file.2930### Write Lesson Files31324. Create `lessons/YYYYMMDD-<slug>.md` using `LESSON.md.template`. Fill in: Trigger, Lesson, Evidence, Applies to, Confidence (LOW/MED/HIGH), Status (PROPOSED).33345. If the lesson implies a skill change, classify it:35 - **Minor tweak** (wording, one extra step, edge case) → write a unified diff under `## Proposed diff` and a matching `lessons/YYYYMMDD-<slug>.diff`.36 - **New skill or significant rewrite** → hand off to `skill-creator`: describe the intent, provide the lesson as context, and follow its draft→test→iterate loop. The resulting SKILL.md lands in `lessons/` as a proposal — never installed directly.3738### Session Summary39406. Print:41 ```42 Session summary:43 - TODOs completed: N44 - Key metrics: <any that moved>45 - Lessons extracted: N46 - Skill diffs proposed: N47 ```487. Tell the user: *"Review proposed diffs in `lessons/`. Merge with `git apply` or edit directly."*4950---5152## Mode 2 — Personalize5354Activate when the user says "personalize", "integrate this skill", "find a skill for", or provides an external SKILL.md path or URL.5556### Step 0 — Discover (if no target provided)57588. If the user gives a description rather than a path/URL, search the registry:59 ```bash60 npx skills find "<query>"61 ```62 Present the top results (name, description, install command) and ask the user which to integrate. Then continue with the chosen skill(s).6364### Step 1 — Read external skill(s)65669. Read the target: a single SKILL.md, a skills directory, or a skill pack repo. Extract:67 - Name, description, trigger phrases68 - Tools, MCP servers, and external dependencies it references69 - Behavioral patterns (workflows, delegation, output files)7071### Step 2 — Inventory installed skills727310. Read all SKILL.md files in `~/.claude/skills/` (or the project `.claude/skills/`). Build a map of:74 - Names and descriptions75 - Tools and MCP servers already in use76 - Overlapping trigger phrases7778### Step 3 — Analyze798011. For each external skill, assess three dimensions:8182 **Compatibility** — will it conflict?83 - Name collision with an installed skill?84 - References a tool/MCP not configured (e.g., `alpha login` not done)?85 - Contradicts a behavioral rule in an existing skill?8687 **Scope overlap** — does it duplicate something?88 - Substantially the same as an installed skill → flag as overlap, note the delta89 - Partially overlapping → identify which parts are additive9091 **New capability** — what does it genuinely add?92 - List capabilities not covered by any installed skill9394### Step 4 — Interview the user959612. Ask targeted questions based on the analysis. Ask all at once, not one-by-one:9798 For each **overlap**: > "`<external>` overlaps with your `<installed>`. It differs in: `<delta>`. Replace, merge, or skip?"99100 For each **missing dependency**: > "`<external>` requires `<tool/MCP>`. Do you have it? If not, skip those parts?"101102 For each **behavioral conflict**: > "`<external>` does `<X>` but your `<installed>` does `<Y>`. Which do you prefer?"103104 Open: > "Anything from this skill you explicitly don't want?"105106### Step 5 — Create or improve via skill-creator10710813. Based on user answers, determine the scope:109 - **Additive merge** (minor additions to an existing skill) → write a unified diff to `lessons/YYYYMMDD-personalize-<slug>.diff` with a companion `.md`.110 - **New skill or substantial rewrite** → hand off to `skill-creator`: describe the desired skill, provide the source material and user's confirmed preferences as context, and follow its draft→test→iterate loop. Output lands in `lessons/` as a proposal.11111214. Tell the user: *"Ready in `lessons/`. Review and apply with `git apply` when satisfied."*113114---115116## Mode 3 — Registry117118Activate when the user asks to refresh the tracked skill-pack catalog, assess a new pack, compare packs, or update `skillpacks/skill_dictionary.yaml` / preset definitions.119120### Registry inputs121122Read:123124- `skillpacks/skill_dictionary.yaml`125- `skillpacks/presets/*.yaml`126- `README.md` / `README_CN.md` pack comparison sections when relevant127128If the user points at a new external repo, read its README and any obvious skill inventory files first.129130### Responsibilities13113215. Maintain `skillpacks/skill_dictionary.yaml` as the shared curated registry.13313416. For each pack or skill being assessed, judge:135 - **workflow fit**136 - **gap coverage**137 - **overlap cost**138 - **dependency burden**139 - **maintenance health**140 - **composability**141 - **supervision sensitivity**142 - **autonomy bias**14314417. Normalize outputs into concise labels when possible:145 - necessity: `default | recommended | optional | niche | avoid`146 - compatibility: `high | medium | low`147 - role: `base | donor | overlay | niche | experimental`14814918. Recommend **subsets**, not bulk imports, unless the user clearly asks for a full-pack strategy.15015119. Update presets when the registry change meaningfully affects default recommendations.15215320. Keep rationales concise and decision-oriented. The registry is for recommendation and comparison, not exhaustive catalog dumps.154155### Safety boundary15615721. Registry curation may edit `skillpacks/skill_dictionary.yaml` and `skillpacks/presets/*.yaml`, but changes to existing `SKILL.md` behavior still require either:158 - a minor diff proposal in `lessons/`, or159 - a `skill-creator` handoff for substantial rewrites.16016122. If a registry update would imply changing default project behavior materially, ask before proceeding.162163---164165## Mode 4 — Create166167Activate when the user says "create a skill for X" or "build a new skill".16816923. Capture intent: what should the skill do, when should it trigger, what's the expected output?17024. Check `npx skills find "<intent>"` — if a close match exists, suggest integrating it instead (Mode 2).17125. If creating from scratch, hand off to `skill-creator` with the captured intent. Follow its draft→test→iterate loop fully. Output lands in `lessons/` as a proposal.172173---174175## Constraints176177- Never write directly to any `SKILL.md` file. Always propose. The human merges.178- Create `lessons/` if it does not exist.179- `skillpacks/skill_dictionary.yaml` and `skillpacks/presets/*.yaml` are curated repo metadata and may be updated directly in Registry mode when the user asks.180- All skill creation and significant rewrites go through `skill-creator`. Raw diffs are only for minor, targeted changes.181- Err toward asking rather than assuming. One unanswered question beats a wrong assumption baked into a diff.182183## Example184185**Session mode**: Experiment failed due to unset random seed. Minor → `lessons/20260329-seed-reproducibility.diff`. New workflow implied → hand off to `skill-creator` to draft a `reproducibility-check` skill.186187**Personalize mode**: User says "find me a skill for LaTeX compilation" → `npx skills find "latex"` returns 3 results → user picks one → reads it, finds no conflicts → substantial enough to need skill-creator → draft→test→iterate → `lessons/20260401-personalize-latex.diff`.188189**Create mode**: User says "create a skill for Slack notifications" → `npx skills find "slack"` finds a close match → suggests integrating it → user confirms → Mode 2 kicks in.