upgrade-skills
Skill2 starsChanged 2 months agoMITView on GitHub
Bring a repo that was set up under an earlier version of this skill set up to the current one: refresh its Agent skills block, replace in-repo skill copies with links to the current skills, and move an old worktree harness to the current provision script and hook. Run once per repo after this skill set changes.
- Reads credentials
In this repository36 other files it gives its agents.
- askSkill
- setup-skillsSkill
- setup-worktreesSkill
- cleanupSkill
- code-reviewSkill
- dispatchSkill
- grill-with-docsSkill
- implementSkill
- prSkill
- shipSkill
- to-specSkill
- to-ticketsSkill
- worktreeSkill
- grill-meSkill
- handoffSkill
- teachSkill
- to-questionnaireSkill
- unslopSkill
- wait-whatSkill
- writing-for-agentsSkill
- close-ticketSkill
- codebase-designSkill
- domain-modelingSkill
- grillingSkill
- tddSkill
- prototypeSkill
- researchSkill
- wayfinderSkill
- diagnosing-bugsSkill
- improve-codebase-architectureSkill
- resolving-merge-conflictsSkill
- retroSkill
- ticket-clerkSkill
- triageSkill
- ui-reviewSkill
- wizardSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 17
Read the target repo and record each finding:
- Distinctive: line 39
Worktree harness: When the repo needs provisioning:
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Upgrade Skills
A repo set up months ago carries the skill set as it was then: copied skill folders, an ## Agent skills block in an older shape, a worktree harness with rules the current skills contradict. This skill brings one repo to the current set without touching anything the repo wrote for itself.
The current set lives in the repo three folders above this file (../../.. from this skill's folder), with install.sh at its root and the skills under skills/. That repo is the source of truth for every skill it holds; the target repo is the source of truth for everything else.
This is a prompt-driven skill: explore, present the plan, confirm, then apply.
1. Explore
Read the target repo and record each finding:
- Agent file:
CLAUDE.mdandAGENTS.mdat the root. Which one is real, which is a symlink to the other. The real one is the file edited below. Missing## Agent skillsblock: sayRun /setup-skills firstand stop; this skill upgrades a setup, it does not create one. - Block shape: the sub-blocks under
## Agent skills, and any worktree text anywhere in the file: a### Worktreessub-block, a top-level## Worktreessection, a rule such as "work in a worktree, never in the primary checkout". - In-repo skills: every folder in
.claude/skills/. For each: symlink or copy, its prefix (<prefix>-<leaf>), and whether<leaf>exists in the current set (find <set>/skills -name SKILL.md). A copy whose leaf is in the set is stale. A copy whose leaf is not in the set is repo-own and stays as it is. A symlink into the set is current. - Worktree harness:
scripts/provision.shand its CONFIG block;.claude/hooks/provision-worktree.sh; any other worktree hook, such as a PreToolUse guard that refuses edits in the primary; the hooks in.claude/settings.json;.claude/worktrees/in.git/info/exclude. - Provisioning need: gitignored
.env*files, a lockfile, a database URL in an env file. A repo with none of these gets no harness.
Completion: a table of findings, each marked current, stale, repo-own, or missing.
2. Present the plan
One line per change, grouped as below. The human strikes lines before anything is written.
3. Apply
Agent file. Rewrite the ## Agent skills block to the shape /setup-skills writes today: ### Issue tracker, ### Triage labels (only when docs/agents/triage-labels.md exists), ### Domain docs, each a one-line summary plus its See docs/agents/<file>.md pointer. Keep the existing summaries; they are the repo's. Add the docs-to-trunk sentence to ### Domain docs exactly as /setup-skills writes it (../setup-skills/SKILL.md), when it is missing. When docs/agents/triage-labels.md has no later row, add the row from the template (../setup-skills/triage-labels.md), and create the label on a GitHub tracker. When docs/agents/issue-tracker.md has no ## Idea notes section, add it from the matching tracker template, and create the needs-grilling label on a GitHub or GitLab tracker, as /setup-skills step 4 does. Remove every old worktree rule and section. When the repo keeps a harness, write the ### Worktrees sub-block exactly as step 3 of the setup-worktrees skill writes it (../setup-worktrees/SKILL.md), with the bracketed parts the CONFIG does not do dropped. An older Worktrees block is replaced: the current one sends /implement to the worktree skill.
Text outside the block stays byte for byte.
In-repo skills. For each stale copy: delete the folder, then <set>/install.sh skills/<path-to-leaf> --prefix <prefix> from the target repo root (--no-prefix when the copy had none). The link keeps the same name the repo already uses in prompts. Repo-own skills are listed in the report and left alone. A repo that links the set into .claude/skills/ and has a harness also gets worktree linked, with the same prefix.
Worktree harness. When the repo needs provisioning:
scripts/provision.sh: take the CONFIG values from the old file (install_deps, port bases,stamp_ports, the DATABASE variables,stamp_database,migrate) and put them into the current template from thesetup-worktreesskill folder. The ENGINE section is the template's.stamp_databasenow takes the dev database and the test database as two arguments; adapt the old body to it. Say what changed: the default shares the primary's dev database,db forkis the explicit fork, anddb shareand--no-dbare gone..claude/hooks/provision-worktree.sh: replace with the template'shook.sh.- A primary-checkout guard hook: delete the file and its entry in
.claude/settings.json. Planning and changes to docs only happen in the primary now. .claude/settings.json: the SessionStart and PostToolUse(EnterWorktree) entries as/setup-worktreeswrites them; other hooks stay..claude/worktrees/in.git/info/exclude.
Completion: every line of the confirmed plan applied, or named as skipped with the reason.
4. Verify
ls -la .claude/skillsshows a link for every skill of the set, a folder for every repo-own one.- With a harness: a throwaway worktree off the trunk in
.claude/worktrees/provision-checkrunsscripts/provision.shgreen. When there is a database, the tail shows it shared,db forkruns green, anddb dropremoves the fork and the test database. Thengit worktree removeit and delete its branch.
Report
Agent file edited (which) · block sub-blocks written · later row and label added or n/a · idea notes section and label added or n/a · worktree text removed · skills linked (listed) · repo-own skills left (listed) · harness replaced, kept, or none · guard removed or n/a · verify result.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

