{"name":"onboard-project","title":"Onboard a project's skills","description":"Choose and wire a repository's skills from evidence instead of hoping a description matches: scan the repository and its own session history against every skill's declared fit, show one change list where each row carries the evidence that justified it and the undo that takes it back, and on one yes write a profile plus a generated .claude/rules/skill-routing.md that every session in this repository loads. A quiet session-start check then says one line when a listed skill is neither installed nor adapted here, the repository's evidence or its adapted copies move, or the routing file drifts. Symptoms: which skills should this project use, set this repo up for agents, the right skill never loads when I need it, we installed it and nobody uses it, onboard this project, check the prerequisites for this repo, re-check now that we have a database. It writes its own rules file and never edits CLAUDE.md, AGENTS.md or a generated context file, and it installs nothing itself: it prints the commands and you run them.","compatibility":"Any repository on a machine with Node 22+ and the Skills CLI available through npx. Git is optional: without it, files stay local. Reads the pack's own fit declarations, the repository's files, and — for onboard and refresh only — this machine's session history for this repository. Writes at most two files plus a git exclude line, and only on an explicit yes. The session-start hook is off until you arm it, and arming it affects every project on this machine.","allowedTools":"Read Write Edit Grep Glob Bash","license":"MIT","kind":"requestOnly","useWhen":"asked for by name: choosing and wiring this repository's skills","group":"workflow","lifecycle":"release","version":"1.1.1","author":"crissmoldovan","install":["npx skills add crissmoldovan/agent-skills --skill onboard-project"],"asks":["Onboard this project. Tell me which skills this repository should use and why, show me everything\nyou would write and everything you would install before you write any of it, and do not arm any\nhook without telling me it affects all my projects.","We added migrations and a background worker since you last looked. Refresh the profile and show me\nonly what changed — do not rewrite the routing file if it has not moved.","Check this repository quietly. If everything the profile lists is installed and the evidence has\nnot moved, say nothing at all.","Keep this one local: the repository is not mine to put tooling files in. Write the routing file,\nadd it to the git exclude, and keep the profile under my agents directory."],"commands":[],"documents":[{"path":"references/fit-signals.md","slug":"fit-signals","title":"Fit signals","body":"# Fit signals\n\nEvery skill in this pack carries `references/fit.json`: where that skill fits, written so a script\ncan evaluate it against a repository. This file is the grammar, for anyone adding a skill or\nsharpening one that is matching too often or not often enough.\n\nA description is a guess a matcher might like. A fit is a claim about a repository that a fixture\ncan prove both ways — and `verify-skills` refuses a skill that does not carry one.\n\n## The three kinds\n\n```json\n{ \"version\": 1, \"kind\": \"signals\", \"useWhen\": \"...\", \"anyOf\": [ ... ] }\n```\n\n| `kind` | What it means | Evaluated? |\n|---|---|---|\n| `signals` | Fits repositories that carry particular evidence | Yes, against the repository |\n| `general` | Fits nearly any repository; forms a small default set | No — always offered |\n| `requestOnly` | Invoked by name, never recommended by a scan | No — never offered |\n\n`useWhen` is required for all three. It is the line the generated routing file will carry, so write\nit as the **moment** a reader would recognise, not as a summary of the skill: *\"about to cut a\nrelease, bump a version, or write a CHANGELOG entry\"*, not *\"release management\"*.\n\n`signals` fits need `anyOf` (one signal is enough) or `allOf` (every signal must hold).\n\n## Repository signals\n\nRead from the repository's files. Cheap enough to run at session start, which is why the check\nre-evaluates exactly these and nothing else.\n\n| Signal | Shape | True when |\n|---|---|---|\n| exists | `{ \"repo\": { \"exists\": \"CHANGELOG.md\" } }` | A path matches. A named path is asked of the filesystem, so its case follows the volume's; a pattern with `*` or `?` is matched against the scan. A trailing `/` means a directory, with or without wildcards (`**/migrations/`); `*` stays inside one segment and `**` crosses them |\n| missing | `{ \"repo\": { \"missing\": \"README.md\" } }` | An exact path is **not** there, asked of the filesystem. No globs: \"nothing matched this pattern\" is a much weaker claim than \"this file is not here\" |\n| json | `{ \"repo\": { \"json\": \"package.json\", \"field\": \"version\" } }` | The file parses and the dotted field is present |\n| toml | `{ \"repo\": { \"toml\": \"Cargo.toml\", \"field\": \"package.version\" } }` | A `[section]` header and a `key = value` under it. Shallow by design |\n| yaml | `{ \"repo\": { \"yaml\": \"pubspec.yaml\", \"field\": \"environment.sdk\" } }` | Top-level and indented keys, two levels. Shallow by design |\n| grep | `{ \"repo\": { \"grep\": \"x-hub-signature\", \"globs\": [\"**/*.ts\"] } }` | A JavaScript regular expression matches inside a file the globs select. The scan stops at the first match and names that file as the evidence |\n\nThe shallow readers are not an oversight. A fit signal asks whether a repository has a shape; a\nsignal that needs a real TOML or YAML parser is asking a question that belongs in the skill itself.\n\n`grep` is bounded: a byte budget per file and in total, over the globs you name. A file too large\nto read is skipped, and a grep that finds nothing but skipped one is unknown. Name them\nnarrowly — `**/*` across a large repository is slow and matches things you did not mean.\n\n**A bound makes a signal unknown, never false.** The scan walks at most twenty thousand files and\ntwelve levels, skipping dependency trees and tool-owned build output. When a glob or a grep finds\nnothing but the walk or the budget stopped before the end, the honest answer is \"not in the part\nthat was read\", and the signal reads as unknown — it neither matches nor rules the skill out, and it\ndoes not move the evidence the session-start check compares.\n\n## History signals\n\nRead from this machine's own session history for this repository. They answer questions no file in\nthe tree can: is implementation delegated here, does work run in the background, are releases cut\nfrom this directory.\n\n```json\n{ \"history\": { \"count\": \"agentDispatches\", \"atLeast\": 5 } }\n```\n\n| Count | Incremented by |\n|---|---|\n| `agentDispatches` | A subagent dispatched through the Agent tool (under either of its names) |\n| `workflowLaunches` | A workflow started |\n| `backgroundCommands` | A shell command started in the background |\n| `releaseCommands` | A publish, a forge release-create, or an annotated version tag |\n| `writesOutsideRepo` | A file-writing tool call whose path lies outside the repository root |\n\nTwo rules about history, and both matter:\n\n- It is read by **onboard** and **refresh** only. The session-start check never touches it, because\n  these transcripts run to tens of megabytes and a check that costs a second at every session start\n  is a check somebody will remove.\n- A history read that hit its byte budget is a lower bound: a count already past its threshold is\n  true, and one short of it is unknown.\n- An absent history is **unknown**, not zero. A machine that has never opened this repository has\n  no evidence either way, and a skill must not be dropped for evidence that was never going to be\n  there. In an `anyOf`, an unknown signal simply does not contribute; in an `allOf`, it prevents\n  the match rather than falsifying it.\n\nBecause of the first rule, the profile's fingerprint is built from **repository signals only** —\nthe check has to be able to recompute it, and a fingerprint it cannot reproduce would report drift\nat every session start.\n\n## Writing a good fit\n\n- **Match the moment, not the topic.** A signal that is true in every repository recommends the\n  skill in every repository, which is the same as recommending nothing.\n- **Prefer a manifest field to a grep.** It is faster, it is exact, and it does not fire on a\n  comment.\n- **Use `allOf` when one signal alone would be noise.** A changelog alone says little; a changelog\n  *and* an authentication library together say something.\n- **Test both ways.** The pack's own test asserts each shipped fit against a fixture repository\n  that should match and one that should not. A fit with no negative case is a fit nobody has\n  checked.\n- **Keep `requestOnly` honest.** If a skill should only ever run because somebody asked for it by\n  name — anything that installs, publishes or changes a user's own configuration — that is the\n  kind it takes, whatever its signals would say.\n","bodyHtml":"<h2 id=\"fit-signals\">Fit signals</h2>\n<p>Every skill in this pack carries <code>references/fit.json</code>: where that skill fits, written so a script\ncan evaluate it against a repository. This file is the grammar, for anyone adding a skill or\nsharpening one that is matching too often or not often enough.</p>\n<p>A description is a guess a matcher might like. A fit is a claim about a repository that a fixture\ncan prove both ways — and <code>verify-skills</code> refuses a skill that does not carry one.</p>\n<h3 id=\"the-three-kinds\">The three kinds</h3>\n<pre><code class=\"language-json\">{ &quot;version&quot;: 1, &quot;kind&quot;: &quot;signals&quot;, &quot;useWhen&quot;: &quot;...&quot;, &quot;anyOf&quot;: [ ... ] }\n</code></pre>\n<table>\n<thead>\n<tr>\n<th><code>kind</code></th>\n<th>What it means</th>\n<th>Evaluated?</th>\n</tr>\n</thead>\n<tbody><tr>\n<td><code>signals</code></td>\n<td>Fits repositories that carry particular evidence</td>\n<td>Yes, against the repository</td>\n</tr>\n<tr>\n<td><code>general</code></td>\n<td>Fits nearly any repository; forms a small default set</td>\n<td>No — always offered</td>\n</tr>\n<tr>\n<td><code>requestOnly</code></td>\n<td>Invoked by name, never recommended by a scan</td>\n<td>No — never offered</td>\n</tr>\n</tbody></table>\n<p><code>useWhen</code> is required for all three. It is the line the generated routing file will carry, so write\nit as the <strong>moment</strong> a reader would recognise, not as a summary of the skill: <em>&quot;about to cut a\nrelease, bump a version, or write a CHANGELOG entry&quot;</em>, not <em>&quot;release management&quot;</em>.</p>\n<p><code>signals</code> fits need <code>anyOf</code> (one signal is enough) or <code>allOf</code> (every signal must hold).</p>\n<h3 id=\"repository-signals\">Repository signals</h3>\n<p>Read from the repository&#39;s files. Cheap enough to run at session start, which is why the check\nre-evaluates exactly these and nothing else.</p>\n<table>\n<thead>\n<tr>\n<th>Signal</th>\n<th>Shape</th>\n<th>True when</th>\n</tr>\n</thead>\n<tbody><tr>\n<td>exists</td>\n<td><code>{ &quot;repo&quot;: { &quot;exists&quot;: &quot;CHANGELOG.md&quot; } }</code></td>\n<td>A path matches. A named path is asked of the filesystem, so its case follows the volume&#39;s; a pattern with <code>*</code> or <code>?</code> is matched against the scan. A trailing <code>/</code> means a directory, with or without wildcards (<code>**/migrations/</code>); <code>*</code> stays inside one segment and <code>**</code> crosses them</td>\n</tr>\n<tr>\n<td>missing</td>\n<td><code>{ &quot;repo&quot;: { &quot;missing&quot;: &quot;README.md&quot; } }</code></td>\n<td>An exact path is <strong>not</strong> there, asked of the filesystem. No globs: &quot;nothing matched this pattern&quot; is a much weaker claim than &quot;this file is not here&quot;</td>\n</tr>\n<tr>\n<td>json</td>\n<td><code>{ &quot;repo&quot;: { &quot;json&quot;: &quot;package.json&quot;, &quot;field&quot;: &quot;version&quot; } }</code></td>\n<td>The file parses and the dotted field is present</td>\n</tr>\n<tr>\n<td>toml</td>\n<td><code>{ &quot;repo&quot;: { &quot;toml&quot;: &quot;Cargo.toml&quot;, &quot;field&quot;: &quot;package.version&quot; } }</code></td>\n<td>A <code>[section]</code> header and a <code>key = value</code> under it. Shallow by design</td>\n</tr>\n<tr>\n<td>yaml</td>\n<td><code>{ &quot;repo&quot;: { &quot;yaml&quot;: &quot;pubspec.yaml&quot;, &quot;field&quot;: &quot;environment.sdk&quot; } }</code></td>\n<td>Top-level and indented keys, two levels. Shallow by design</td>\n</tr>\n<tr>\n<td>grep</td>\n<td><code>{ &quot;repo&quot;: { &quot;grep&quot;: &quot;x-hub-signature&quot;, &quot;globs&quot;: [&quot;**/*.ts&quot;] } }</code></td>\n<td>A JavaScript regular expression matches inside a file the globs select. The scan stops at the first match and names that file as the evidence</td>\n</tr>\n</tbody></table>\n<p>The shallow readers are not an oversight. A fit signal asks whether a repository has a shape; a\nsignal that needs a real TOML or YAML parser is asking a question that belongs in the skill itself.</p>\n<p><code>grep</code> is bounded: a byte budget per file and in total, over the globs you name. A file too large\nto read is skipped, and a grep that finds nothing but skipped one is unknown. Name them\nnarrowly — <code>**/*</code> across a large repository is slow and matches things you did not mean.</p>\n<p><strong>A bound makes a signal unknown, never false.</strong> The scan walks at most twenty thousand files and\ntwelve levels, skipping dependency trees and tool-owned build output. When a glob or a grep finds\nnothing but the walk or the budget stopped before the end, the honest answer is &quot;not in the part\nthat was read&quot;, and the signal reads as unknown — it neither matches nor rules the skill out, and it\ndoes not move the evidence the session-start check compares.</p>\n<h3 id=\"history-signals\">History signals</h3>\n<p>Read from this machine&#39;s own session history for this repository. They answer questions no file in\nthe tree can: is implementation delegated here, does work run in the background, are releases cut\nfrom this directory.</p>\n<pre><code class=\"language-json\">{ &quot;history&quot;: { &quot;count&quot;: &quot;agentDispatches&quot;, &quot;atLeast&quot;: 5 } }\n</code></pre>\n<table>\n<thead>\n<tr>\n<th>Count</th>\n<th>Incremented by</th>\n</tr>\n</thead>\n<tbody><tr>\n<td><code>agentDispatches</code></td>\n<td>A subagent dispatched through the Agent tool (under either of its names)</td>\n</tr>\n<tr>\n<td><code>workflowLaunches</code></td>\n<td>A workflow started</td>\n</tr>\n<tr>\n<td><code>backgroundCommands</code></td>\n<td>A shell command started in the background</td>\n</tr>\n<tr>\n<td><code>releaseCommands</code></td>\n<td>A publish, a forge release-create, or an annotated version tag</td>\n</tr>\n<tr>\n<td><code>writesOutsideRepo</code></td>\n<td>A file-writing tool call whose path lies outside the repository root</td>\n</tr>\n</tbody></table>\n<p>Two rules about history, and both matter:</p>\n<ul>\n<li>It is read by <strong>onboard</strong> and <strong>refresh</strong> only. The session-start check never touches it, because\nthese transcripts run to tens of megabytes and a check that costs a second at every session start\nis a check somebody will remove.</li>\n<li>A history read that hit its byte budget is a lower bound: a count already past its threshold is\ntrue, and one short of it is unknown.</li>\n<li>An absent history is <strong>unknown</strong>, not zero. A machine that has never opened this repository has\nno evidence either way, and a skill must not be dropped for evidence that was never going to be\nthere. In an <code>anyOf</code>, an unknown signal simply does not contribute; in an <code>allOf</code>, it prevents\nthe match rather than falsifying it.</li>\n</ul>\n<p>Because of the first rule, the profile&#39;s fingerprint is built from <strong>repository signals only</strong> —\nthe check has to be able to recompute it, and a fingerprint it cannot reproduce would report drift\nat every session start.</p>\n<h3 id=\"writing-a-good-fit\">Writing a good fit</h3>\n<ul>\n<li><strong>Match the moment, not the topic.</strong> A signal that is true in every repository recommends the\nskill in every repository, which is the same as recommending nothing.</li>\n<li><strong>Prefer a manifest field to a grep.</strong> It is faster, it is exact, and it does not fire on a\ncomment.</li>\n<li><strong>Use <code>allOf</code> when one signal alone would be noise.</strong> A changelog alone says little; a changelog\n<em>and</em> an authentication library together say something.</li>\n<li><strong>Test both ways.</strong> The pack&#39;s own test asserts each shipped fit against a fixture repository\nthat should match and one that should not. A fit with no negative case is a fit nobody has\nchecked.</li>\n<li><strong>Keep <code>requestOnly</code> honest.</strong> If a skill should only ever run because somebody asked for it by\nname — anything that installs, publishes or changes a user&#39;s own configuration — that is the\nkind it takes, whatever its signals would say.</li>\n</ul>\n","words":1084},{"path":"references/what-gets-written.md","slug":"what-gets-written","title":"What gets written, and how to take it back","body":"# What gets written, and how to take it back\n\nEverything this skill can write, where it lands, and the undo. Nothing here happens without one\nexplicit yes, and every line of it is meant to be removable by somebody who has forgotten this\nskill exists.\n\n| What | Where | Written by | Undo |\n|---|---|---|---|\n| The project's skill list | `skills-profile.json` at the repository root (committed placement) | `apply --yes` | Delete it, or `git revert` |\n| The same list, kept out of the repository | `<agents dir>/project-profiles/<encoded repo path>-<hash>.json` (local placement) | `apply --yes` | Delete that file |\n| The routing every session loads | `.claude/rules/skill-routing.md` | `apply --yes` | Delete it, or `git revert` |\n| A git exclude line for that file | `.git/info/exclude`, or the shared one in a worktree (local placement only) — a row of its own in the change list | `apply --yes` | Remove the line |\n| The user's placement defaults | `<agents dir>/onboard-project.json` | You, by hand | Delete or edit it |\n| The session-start check | A `SessionStart` hook in the user's `settings.json` | `install-check-hook.mjs`, run by the user | `install-check-hook.mjs --remove` |\n| A one-time \"onboarding exists\" marker | `<agents dir>/project-profiles/<encoded repo path>-<hash>.json` | `check`, once per repository | Delete that file |\n\n`<agents dir>` is the Skills CLI's own directory under the user's home, where its global lock file\nalready lives.\n\nThe local file name is Claude Code's own project-directory encoding followed by a short hash of the\nfull path. The encoding alone collides — `work/foo-bar` and `work/foo/bar` are one name — and in\n1.0.0 it was the whole name, so two repositories could share one profile. A local profile also\nrecords the repository it belongs to, and one naming a different repository is never read.\n\nA 1.0.0 local profile at the old name is **not read**: it carries no repository, and its name is the\ncollision itself, so nothing can say which repository wrote it. A repository onboarded locally with\n1.0.0 is onboarded again, and the old file can be deleted.\n\nThe marker and a profile can live at the same name, and are told apart by content: a profile has a\nskill list, and the marker never does. Only the check reads the marker.\n\n## The profile\n\n```json\n{\n  \"version\": 1,\n  \"generatedBy\": \"onboard-project 1.1.0\",\n  \"scannedAt\": \"2026-09-14T23:50:00Z\",\n  \"placement\": \"committed\",\n  \"fingerprint\": \"sha256 over the repository signals that evaluated true\",\n  \"evidence\": {\n    \"release-notes\": {\n      \"signals\": [\"exists:.changeset/\", \"exists:CHANGELOG.md\", \"json:package.json#version\"],\n      \"true\": [\"json:package.json#version\"]\n    }\n  },\n  \"skills\": {\n    \"release-notes\": {\n      \"match\": \"strong\",\n      \"evidence\": [\"package.json has a version\"],\n      \"useWhen\": \"about to cut a release, bump a version, or write a CHANGELOG entry\",\n      \"required\": true,\n      \"scope\": \"project\"\n    },\n    \"request-answers\": {\n      \"match\": \"general\",\n      \"evidence\": [],\n      \"useWhen\": \"work is blocked on another person's judgement, sign-off or wording, and the questions need asking\",\n      \"required\": false,\n      \"scope\": \"project\"\n    }\n  },\n  \"adapted\": {\n    \"request-answers\": [\n      { \"name\": \"ask-the-owner\", \"entry\": \"SKILL.md\", \"ref\": \"v1.4.0\", \"tree\": \"the git tree of skills/request-answers at v1.4.0\" }\n    ]\n  },\n  \"declined\": {\n    \"github-webhooks\": { \"at\": \"2026-09-14\", \"fingerprint\": \"sha256 over that skill's own true signals\" }\n  }\n}\n```\n\n- `match` is `strong` (a declared fit matched), `weak` (a reader suggested it from its description\n  and said so), `general` (fits nearly any repository) or `adapted` (the scan did not match it, and\n  this repository holds an adapted copy of it, which is the evidence).\n- `required` is true for strong matches only. The check warns about a required skill that is\n  neither installed nor adapted here, and says nothing about the others.\n- `scope` records where the skill is installed, or where the plan would install it: `project` for a\n  committed placement, `global` for a local one. A skill with an adapted copy is `project`, because\n  the copy lives in this repository whatever the placement, unless the skill is also installed, when\n  it records where that install is.\n- `adapted` records every adapted copy in this repository, keyed by the skill it adapts. An adapted\n  copy is a folder under `.claude/skills/` or `.agents/skills/` whose `adapted.lock.json`, written\n  by `update-agent-skills`' composer, names the pack skill it adapts. No other folder is read, so a\n  copy composed elsewhere with the composer's `--skills-dir` does not stand in for its skill. Each\n  entry gives the copy's name, its `entry` (the skill's `SKILL.md`, or the one reference file of it\n  the copy adapts), and the pinned `ref` and `tree`. A skill with a copy here is present: the plan\n  offers no install for it, the check does not call it missing, and the routing names the copy. Two\n  copies can adapt one skill, each from its own entry, and both are listed. A copy of a skill this\n  catalogue does not carry is recorded and not routed, and the check compares the whole map, so a\n  catalogue update never reads as this repository changing. A copy stands in for nothing, and is\n  named in the plan, when its lock cannot be read, when its folder is not a skill name, when it has\n  no `SKILL.md` a session could load, or when a folder of the same name under `.claude/skills/` is\n  read first and its lock says something else\n  (the same copy in both places says nothing). A profile written before 1.1.0 has no `adapted` map,\n  and reads as one that recorded none.\n- `evidence` is what the session-start check compares: for each skill that was in the catalogue at\n  scan time, the repository signals it was evaluated on and the ones that were true. The check\n  compares only signals that both the profile and the installed fit define, and that it could read\n  this time — so a skill added to the catalogue, or a fit.json that edits a signal, never reads as\n  this repository changing. A profile from 1.0.0 has no `evidence` and gets no evidence check until\n  a refresh writes one.\n- `fingerprint` is the same information as one hash, kept for profiles written by 1.0.0.\n- `declined` remembers a \"don't ask again\" (`apply --decline <names>`) against the fingerprint of\n  **that skill's own** true signals and the names of its adapted copies, so it is offered again if\n  and only if its evidence changes: composing a copy of a declined skill lifts the decline, and a\n  re-pin does not. A skill with no copy fingerprints as it did before 1.1.0.\n- A skill the profile lists is never removed by a scan, with one exception. One whose evidence is\n  gone stays, shown as a `-` row, until `apply --drop <names>`; a weak one stays whether or not\n  `--weak` is passed again. The exception is a skill listed only as `adapted`: when its last copy\n  is gone it leaves the profile and the routing file, in a `-` row that says so, because kept it\n  would route every session to a skill this repository never installed, and nothing would say so.\n- Committed evidence carries counts and repository-relative paths only. Never an absolute path,\n  never a file's contents, never anything read out of session history beyond a number.\n\nThe lock file beside it — `skills-lock.json` — belongs to the Skills CLI and says what is\n*installed*. That is why the profile is a separate file: the CLI rewrites its lock, and anything\nadded to it can be dropped without warning.\n\n## The routing file\n\n```markdown\n<!-- Generated by onboard-project from skills-profile.json. Do not edit; change the profile and run refresh. -->\n# Skill routing for this project\n\nThese skills were chosen from evidence in this repository. Load one when the moment matches;\nnothing here is enforced.\n\nWhere a line names an adapted copy, load that copy rather than the skill it adapts: it carries\nthe skill's text, or only the file named after \"from\", together with this repository's values.\nWhere a line names more than one copy, load the one whose own description fits the task.\n\n- about to cut a release, bump a version, or write a CHANGELOG entry → `release-notes`\n- delegating to agents, or ending a turn with work still running in the background → `report-progress`\n- work is blocked on another person's judgement, sign-off or wording, and the questions need asking → `ask-the-owner`, this repository's adapted copy of `request-answers`\n```\n\nA skill with an adapted copy is routed to the copy by name, so a session does not depend on finding\nthe copy by a description that a long skill listing may drop, nor on passing over a generic copy\ninstalled beside it. When two copies adapt one skill, the line names both, joined by \"or\", and a\ncopy that adapts a reference file of the skill says which file: that copy carries the reference\nfile's text with the project's values, not the skill's `SKILL.md`. Each copy has a description of\nits own, so the session chooses between two by the task. The paragraph about adapted copies appears\nonly when a line names one, so a profile with none renders exactly as it did before 1.1.0.\n\nA rules file with no `paths` frontmatter loads at the start of every session at the same priority\nas the project CLAUDE.md. That is the entire mechanism this skill relies on: no forcing, no hook,\nno matcher — the right skills are simply in front of the agent before it goes looking.\n\nIt is rendered deterministically from the profile, which is what lets `check` tell a hand edit\nfrom a stale file. Evidence stays in the profile so that the always-loaded text is one line per\nskill.\n\n## The check hook\n\nOne entry per new-process matcher (`startup` and `resume`), each running:\n\n```text\n'<node>' '<skill folder>/scripts/onboard.mjs' check --hook\n```\n\nIt is recognised by that command rather than by its `describe` key, because Claude Code drops\n`describe` whenever it rewrites `settings.json` — an installer that recognises its own work by the\ndescribe stops recognising it, and orphaned hooks accumulate. A hook that merely *mentions* the\nscript is never taken: removing somebody else's hook is the one mistake here with no undo.\n\nIt prints **zero bytes** unless one of four things is true — a required skill is neither\ninstalled nor adapted here, the repository's evidence has moved, an adapted copy was added, removed\nor re-pinned since the profile was written, or the routing file no longer matches its profile — and\nthen exactly one line, wrapped in the `SessionStart` `additionalContext` envelope. It reads no\nsession history, only the repository's own files and each adapted copy's small lock, never blocks,\nand fails open: any error at all produces no output rather than a failed session start. A copy\ncomposed, removed or re-pinned without a refresh is reported until the refresh runs, so refresh in\nthe change that composes, removes or re-pins it.\n\nIt lives in the user's settings, so it applies to **every project on this machine**. That is why\nit is always its own row in the change list, always marked, and never installed by this skill on\nthe user's behalf.\n","bodyHtml":"<h2 id=\"what-gets-written-and-how-to-take-it-back\">What gets written, and how to take it back</h2>\n<p>Everything this skill can write, where it lands, and the undo. Nothing here happens without one\nexplicit yes, and every line of it is meant to be removable by somebody who has forgotten this\nskill exists.</p>\n<table>\n<thead>\n<tr>\n<th>What</th>\n<th>Where</th>\n<th>Written by</th>\n<th>Undo</th>\n</tr>\n</thead>\n<tbody><tr>\n<td>The project&#39;s skill list</td>\n<td><code>skills-profile.json</code> at the repository root (committed placement)</td>\n<td><code>apply --yes</code></td>\n<td>Delete it, or <code>git revert</code></td>\n</tr>\n<tr>\n<td>The same list, kept out of the repository</td>\n<td><code>&lt;agents dir&gt;/project-profiles/&lt;encoded repo path&gt;-&lt;hash&gt;.json</code> (local placement)</td>\n<td><code>apply --yes</code></td>\n<td>Delete that file</td>\n</tr>\n<tr>\n<td>The routing every session loads</td>\n<td><code>.claude/rules/skill-routing.md</code></td>\n<td><code>apply --yes</code></td>\n<td>Delete it, or <code>git revert</code></td>\n</tr>\n<tr>\n<td>A git exclude line for that file</td>\n<td><code>.git/info/exclude</code>, or the shared one in a worktree (local placement only) — a row of its own in the change list</td>\n<td><code>apply --yes</code></td>\n<td>Remove the line</td>\n</tr>\n<tr>\n<td>The user&#39;s placement defaults</td>\n<td><code>&lt;agents dir&gt;/onboard-project.json</code></td>\n<td>You, by hand</td>\n<td>Delete or edit it</td>\n</tr>\n<tr>\n<td>The session-start check</td>\n<td>A <code>SessionStart</code> hook in the user&#39;s <code>settings.json</code></td>\n<td><code>install-check-hook.mjs</code>, run by the user</td>\n<td><code>install-check-hook.mjs --remove</code></td>\n</tr>\n<tr>\n<td>A one-time &quot;onboarding exists&quot; marker</td>\n<td><code>&lt;agents dir&gt;/project-profiles/&lt;encoded repo path&gt;-&lt;hash&gt;.json</code></td>\n<td><code>check</code>, once per repository</td>\n<td>Delete that file</td>\n</tr>\n</tbody></table>\n<p><code>&lt;agents dir&gt;</code> is the Skills CLI&#39;s own directory under the user&#39;s home, where its global lock file\nalready lives.</p>\n<p>The local file name is Claude Code&#39;s own project-directory encoding followed by a short hash of the\nfull path. The encoding alone collides — <code>work/foo-bar</code> and <code>work/foo/bar</code> are one name — and in\n1.0.0 it was the whole name, so two repositories could share one profile. A local profile also\nrecords the repository it belongs to, and one naming a different repository is never read.</p>\n<p>A 1.0.0 local profile at the old name is <strong>not read</strong>: it carries no repository, and its name is the\ncollision itself, so nothing can say which repository wrote it. A repository onboarded locally with\n1.0.0 is onboarded again, and the old file can be deleted.</p>\n<p>The marker and a profile can live at the same name, and are told apart by content: a profile has a\nskill list, and the marker never does. Only the check reads the marker.</p>\n<h3 id=\"the-profile\">The profile</h3>\n<pre><code class=\"language-json\">{\n  &quot;version&quot;: 1,\n  &quot;generatedBy&quot;: &quot;onboard-project 1.1.0&quot;,\n  &quot;scannedAt&quot;: &quot;2026-09-14T23:50:00Z&quot;,\n  &quot;placement&quot;: &quot;committed&quot;,\n  &quot;fingerprint&quot;: &quot;sha256 over the repository signals that evaluated true&quot;,\n  &quot;evidence&quot;: {\n    &quot;release-notes&quot;: {\n      &quot;signals&quot;: [&quot;exists:.changeset/&quot;, &quot;exists:CHANGELOG.md&quot;, &quot;json:package.json#version&quot;],\n      &quot;true&quot;: [&quot;json:package.json#version&quot;]\n    }\n  },\n  &quot;skills&quot;: {\n    &quot;release-notes&quot;: {\n      &quot;match&quot;: &quot;strong&quot;,\n      &quot;evidence&quot;: [&quot;package.json has a version&quot;],\n      &quot;useWhen&quot;: &quot;about to cut a release, bump a version, or write a CHANGELOG entry&quot;,\n      &quot;required&quot;: true,\n      &quot;scope&quot;: &quot;project&quot;\n    },\n    &quot;request-answers&quot;: {\n      &quot;match&quot;: &quot;general&quot;,\n      &quot;evidence&quot;: [],\n      &quot;useWhen&quot;: &quot;work is blocked on another person&#39;s judgement, sign-off or wording, and the questions need asking&quot;,\n      &quot;required&quot;: false,\n      &quot;scope&quot;: &quot;project&quot;\n    }\n  },\n  &quot;adapted&quot;: {\n    &quot;request-answers&quot;: [\n      { &quot;name&quot;: &quot;ask-the-owner&quot;, &quot;entry&quot;: &quot;SKILL.md&quot;, &quot;ref&quot;: &quot;v1.4.0&quot;, &quot;tree&quot;: &quot;the git tree of skills/request-answers at v1.4.0&quot; }\n    ]\n  },\n  &quot;declined&quot;: {\n    &quot;github-webhooks&quot;: { &quot;at&quot;: &quot;2026-09-14&quot;, &quot;fingerprint&quot;: &quot;sha256 over that skill&#39;s own true signals&quot; }\n  }\n}\n</code></pre>\n<ul>\n<li><code>match</code> is <code>strong</code> (a declared fit matched), <code>weak</code> (a reader suggested it from its description\nand said so), <code>general</code> (fits nearly any repository) or <code>adapted</code> (the scan did not match it, and\nthis repository holds an adapted copy of it, which is the evidence).</li>\n<li><code>required</code> is true for strong matches only. The check warns about a required skill that is\nneither installed nor adapted here, and says nothing about the others.</li>\n<li><code>scope</code> records where the skill is installed, or where the plan would install it: <code>project</code> for a\ncommitted placement, <code>global</code> for a local one. A skill with an adapted copy is <code>project</code>, because\nthe copy lives in this repository whatever the placement, unless the skill is also installed, when\nit records where that install is.</li>\n<li><code>adapted</code> records every adapted copy in this repository, keyed by the skill it adapts. An adapted\ncopy is a folder under <code>.claude/skills/</code> or <code>.agents/skills/</code> whose <code>adapted.lock.json</code>, written\nby <code>update-agent-skills</code>&#39; composer, names the pack skill it adapts. No other folder is read, so a\ncopy composed elsewhere with the composer&#39;s <code>--skills-dir</code> does not stand in for its skill. Each\nentry gives the copy&#39;s name, its <code>entry</code> (the skill&#39;s <code>SKILL.md</code>, or the one reference file of it\nthe copy adapts), and the pinned <code>ref</code> and <code>tree</code>. A skill with a copy here is present: the plan\noffers no install for it, the check does not call it missing, and the routing names the copy. Two\ncopies can adapt one skill, each from its own entry, and both are listed. A copy of a skill this\ncatalogue does not carry is recorded and not routed, and the check compares the whole map, so a\ncatalogue update never reads as this repository changing. A copy stands in for nothing, and is\nnamed in the plan, when its lock cannot be read, when its folder is not a skill name, when it has\nno <code>SKILL.md</code> a session could load, or when a folder of the same name under <code>.claude/skills/</code> is\nread first and its lock says something else\n(the same copy in both places says nothing). A profile written before 1.1.0 has no <code>adapted</code> map,\nand reads as one that recorded none.</li>\n<li><code>evidence</code> is what the session-start check compares: for each skill that was in the catalogue at\nscan time, the repository signals it was evaluated on and the ones that were true. The check\ncompares only signals that both the profile and the installed fit define, and that it could read\nthis time — so a skill added to the catalogue, or a fit.json that edits a signal, never reads as\nthis repository changing. A profile from 1.0.0 has no <code>evidence</code> and gets no evidence check until\na refresh writes one.</li>\n<li><code>fingerprint</code> is the same information as one hash, kept for profiles written by 1.0.0.</li>\n<li><code>declined</code> remembers a &quot;don&#39;t ask again&quot; (<code>apply --decline &lt;names&gt;</code>) against the fingerprint of\n<strong>that skill&#39;s own</strong> true signals and the names of its adapted copies, so it is offered again if\nand only if its evidence changes: composing a copy of a declined skill lifts the decline, and a\nre-pin does not. A skill with no copy fingerprints as it did before 1.1.0.</li>\n<li>A skill the profile lists is never removed by a scan, with one exception. One whose evidence is\ngone stays, shown as a <code>-</code> row, until <code>apply --drop &lt;names&gt;</code>; a weak one stays whether or not\n<code>--weak</code> is passed again. The exception is a skill listed only as <code>adapted</code>: when its last copy\nis gone it leaves the profile and the routing file, in a <code>-</code> row that says so, because kept it\nwould route every session to a skill this repository never installed, and nothing would say so.</li>\n<li>Committed evidence carries counts and repository-relative paths only. Never an absolute path,\nnever a file&#39;s contents, never anything read out of session history beyond a number.</li>\n</ul>\n<p>The lock file beside it — <code>skills-lock.json</code> — belongs to the Skills CLI and says what is\n<em>installed</em>. That is why the profile is a separate file: the CLI rewrites its lock, and anything\nadded to it can be dropped without warning.</p>\n<h3 id=\"the-routing-file\">The routing file</h3>\n<pre><code class=\"language-markdown\">&lt;!-- Generated by onboard-project from skills-profile.json. Do not edit; change the profile and run refresh. --&gt;\n# Skill routing for this project\n\nThese skills were chosen from evidence in this repository. Load one when the moment matches;\nnothing here is enforced.\n\nWhere a line names an adapted copy, load that copy rather than the skill it adapts: it carries\nthe skill&#39;s text, or only the file named after &quot;from&quot;, together with this repository&#39;s values.\nWhere a line names more than one copy, load the one whose own description fits the task.\n\n- about to cut a release, bump a version, or write a CHANGELOG entry → `release-notes`\n- delegating to agents, or ending a turn with work still running in the background → `report-progress`\n- work is blocked on another person&#39;s judgement, sign-off or wording, and the questions need asking → `ask-the-owner`, this repository&#39;s adapted copy of `request-answers`\n</code></pre>\n<p>A skill with an adapted copy is routed to the copy by name, so a session does not depend on finding\nthe copy by a description that a long skill listing may drop, nor on passing over a generic copy\ninstalled beside it. When two copies adapt one skill, the line names both, joined by &quot;or&quot;, and a\ncopy that adapts a reference file of the skill says which file: that copy carries the reference\nfile&#39;s text with the project&#39;s values, not the skill&#39;s <code>SKILL.md</code>. Each copy has a description of\nits own, so the session chooses between two by the task. The paragraph about adapted copies appears\nonly when a line names one, so a profile with none renders exactly as it did before 1.1.0.</p>\n<p>A rules file with no <code>paths</code> frontmatter loads at the start of every session at the same priority\nas the project CLAUDE.md. That is the entire mechanism this skill relies on: no forcing, no hook,\nno matcher — the right skills are simply in front of the agent before it goes looking.</p>\n<p>It is rendered deterministically from the profile, which is what lets <code>check</code> tell a hand edit\nfrom a stale file. Evidence stays in the profile so that the always-loaded text is one line per\nskill.</p>\n<h3 id=\"the-check-hook\">The check hook</h3>\n<p>One entry per new-process matcher (<code>startup</code> and <code>resume</code>), each running:</p>\n<pre><code class=\"language-text\">&#39;&lt;node&gt;&#39; &#39;&lt;skill folder&gt;/scripts/onboard.mjs&#39; check --hook\n</code></pre>\n<p>It is recognised by that command rather than by its <code>describe</code> key, because Claude Code drops\n<code>describe</code> whenever it rewrites <code>settings.json</code> — an installer that recognises its own work by the\ndescribe stops recognising it, and orphaned hooks accumulate. A hook that merely <em>mentions</em> the\nscript is never taken: removing somebody else&#39;s hook is the one mistake here with no undo.</p>\n<p>It prints <strong>zero bytes</strong> unless one of four things is true — a required skill is neither\ninstalled nor adapted here, the repository&#39;s evidence has moved, an adapted copy was added, removed\nor re-pinned since the profile was written, or the routing file no longer matches its profile — and\nthen exactly one line, wrapped in the <code>SessionStart</code> <code>additionalContext</code> envelope. It reads no\nsession history, only the repository&#39;s own files and each adapted copy&#39;s small lock, never blocks,\nand fails open: any error at all produces no output rather than a failed session start. A copy\ncomposed, removed or re-pinned without a refresh is reported until the refresh runs, so refresh in\nthe change that composes, removes or re-pins it.</p>\n<p>It lives in the user&#39;s settings, so it applies to <strong>every project on this machine</strong>. That is why\nit is always its own row in the change list, always marked, and never installed by this skill on\nthe user&#39;s behalf.</p>\n","words":1823}],"body":"# Onboard a project's skills\n\nA skill loads when its description happens to match the task at hand, or when somebody types its\nname. That is the whole mechanism. There is no supported way to force-load a skill, and no field\nin a skill's frontmatter that makes one skill require another.\n\nIt works until the install base grows. On the machine this was built for, 201 skills were\ninstalled; the one a project actually depends on surfaced by luck. And enforcement does not fix\nit: a gate that demanded a progress report was satisfied, in real sessions, by an agent writing\nthe three headings from memory — the skill was never loaded, so everything it exists to carry was\nabsent. The gate got its shape. The reader got nothing.\n\nThe fix is not a bigger gate. It is a file every session already reads. This skill decides which\nskills a repository should use, from evidence in the repository and in how it is worked on, and\nwrites that decision into `.claude/rules/skill-routing.md` — a rules file with no `paths`\nfrontmatter, which loads at the start of every session at the same priority as the project\nCLAUDE.md. Nothing is forced; the right skills are simply in front of the agent before it has to\ngo looking.\n\n**One yes, and everything is shown first.** The change list names every skill, every file and\nevery hook, each with the evidence behind it and the undo that takes it back. Nothing is written\nbefore that yes, and nothing that is written is hard to remove.\n\n### What this skill does not own\n\n| The job | Whose it is | What this skill does with it |\n|---|---|---|\n| Installing and updating skills across scopes and agents | `update-agent-skills` | Prints the install commands and never runs one. **The user runs that skill; no skill may install it on their behalf.** |\n| Composing, checking and re-pinning a project's adapted copy of a pack skill | `update-agent-skills` | Reads each copy's `adapted.lock.json` to count the skill it adapts as present and to route to the copy. Never composes, edits or re-pins one. |\n| The context files agents load — CLAUDE.md, AGENTS.md and their generated kin | `derive-codebase-context` | Touches none of them. Its routing lives in a separate generated rules file, so a regeneration somebody else owns cannot clobber it. |\n| The documentation people read | `layer-repository-docs` | Writes none. The routing file is for agents and says so in its own header. |\n| Declared-catalog placement and inherited policy | `workspace-governance` | Reads the repository where it stands; decides nothing about where repositories belong. |\n| Which model runs which work | `model-routing` | Recommends the skill; makes no routing decision. |\n| The shape of a progress report, and the note for a release | `report-progress`, `release-notes` | Recommends them, and lists their gates as hooks you may arm. Those installers stay theirs. |\n| Authoring or releasing a skill | `publish-agent-skill` | Never authors one. A skill it cannot find is a skill it reports as missing. |\n\n## When to Use\n\nThree entry points, and the run **announces which one it picked before it reads anything**:\n\n- **onboard** — this repository has no profile. Scan, recommend, show the change list, apply on one\n  yes. Symptoms: *which skills should this project use*, *set this repo up for agents*, *onboard\n  this project*, *check the prerequisites here*.\n- **refresh** — it has one. Scan again and show only what changed. Symptoms: *we added a database,\n  re-check*, *this repo has moved on*, *the routing file looks stale*.\n- **check** — the quiet one, run by a hook at session start. Reads, says nothing unless something\n  is missing or has moved. You rarely invoke it by hand.\n\nWith no word at all, a repository with no profile gets **onboard** and one with a profile gets\n**refresh**.\n\nDo not use it to install skills — that is `update-agent-skills`, and the user runs it. Do not use\nit to write a project's context file. Do not use it to decide what a change should touch, or how\nwork should be reported; it recommends the skills that own those jobs and owns none of them.\n\n## Prerequisites\n\n1. **A repository to stand in.** Any directory; a git repository gets the committed option.\n   **Complete when:** the repository root is known — the scripts walk up to find it.\n2. **The pack checkout.** This skill's scripts read every pack skill's `references/fit.json`.\n   **Complete when:** `scripts/onboard.mjs plan` runs and lists skills.\n3. **Node 22 or newer,** and `npx` for the install commands the plan prints.\n   **Complete when:** `node --version` is 22 or above.\n4. **A placement answer, once per repository.** Committed, or kept local.\n   **Complete when:** the user has answered, or `commitOwners` in the user config already answers\n   for this repository's origin owner.\n\n## Procedure\n\n1. **Say which entry point you are running, and why.** \"No profile here, so this is onboard.\" A\n   run that starts scanning without naming its own mode leaves the reader unable to tell a first\n   onboarding from a re-check.\n   **Complete when:** the announcement names the entry point and the repository.\n\n2. **Settle placement before anything is written.** Committed means `skills-profile.json` lands in\n   the repository, so a teammate's checkout carries the same answer; local means it lives under\n   the user's agents directory and the repository stays clean. The plan pre-selects from the\n   user's `commitOwners`, and a repository with no git metadata can only be local. Ask once, and\n   only when the pre-selection could be wrong.\n   **Complete when:** the answer is recorded, and the user was not asked a second time.\n\n3. **Run the plan, which writes nothing.**\n\n   ```sh\n   node <skill-folder>/scripts/onboard.mjs plan --repo <repository>\n   ```\n\n   It evaluates every pack skill's declared fit against this repository's files, and — for onboard\n   and refresh only — against this machine's session history for this repository. History is read\n   here and **never** at session start.\n\n   **A skill this repository has adapted is already here.** An adapted copy is the one\n   `update-agent-skills` composes from a pinned pack skill and the project's overlay, under a name\n   of its own, and its `adapted.lock.json` names the skill it adapts. The plan counts that skill as\n   present: a `=` row naming the copy, no install command, and a routing line that names the copy\n   instead of the skill. A skill the scan did not match is listed anyway, as `adapted`, because the\n   copy is the evidence that the project uses it. Lines that open `adapted copy:` come in two kinds.\n   `<folder>: <problem>` names a copy that stands in for nothing, and its skill is planned as if no\n   copy were there: when the problem is a lock version this skill does not read, update\n   onboard-project; when it is a folder of the same name read first, rename or remove one of the\n   two; otherwise hand it to `update-agent-skills`, whose adapter `check` says what is wrong. Never\n   edit a lock by hand. `<copy> adapts <skill>, which this catalogue does not carry` names a copy of\n   a skill from elsewhere: it is recorded in the profile and gets no routing line.\n   **Complete when:** the change list exists, and no file in the repository has changed.\n\n4. **Add the weak matches yourself, if any.** The scan is deliberately narrow: it recommends only\n   what a declared fit matched. Skills installed on this machine that are *not* in the pack can\n   still fit, but only a reader can say so, from their descriptions and what the scan found. Pass\n   them with `--weak <names>`; they are listed as \"suggested from description, not checked\", never\n   marked required, and kept on every later apply until someone drops them.\n   **Complete when:** every weak suggestion names the description it came from, or there are none.\n\n5. **Show the whole change list and ask once.** Every row carries its undo:\n\n   ```text\n   + release-notes  (strong)  package.json has a version\n       install: npx skills add <source> --skill release-notes --project --yes\n       undo:    npx skills remove release-notes --project\n   = report-progress  (strong)  already installed (global)\n   = request-answers  (general)  adapted here as ask-the-owner at v1.4.0 — nothing to install; the routing names the adapted copy\n   ~ write skills-profile.json — in this repository\n       undo:    delete it, or git revert\n   ~ write .claude/rules/skill-routing.md — a new file\n       undo:    delete it, or git revert\n   ~ write .git/info/exclude — one line, /.claude/rules/skill-routing.md, so the routing file stays out of git status\n       undo:    remove that line\n   ! arm the session-start check — affects all projects on this machine, not only this one\n       command: node <skill-folder>/scripts/install-check-hook.mjs\n       undo:    node <skill-folder>/scripts/install-check-hook.mjs --remove\n   ```\n\n   The exclude row appears for a local placement in a git repository — including a worktree, where\n   the line goes to the repository's shared exclude file. A hook lives in the user's own settings,\n   so it is always its own row and always marked. Never fold it into a general yes about \"setting\n   the project up\".\n   **Complete when:** the user has seen every row, including the hook row, and answered.\n\n6. **Apply in order — files, installs, hooks — and stop at the first failure.**\n\n   ```sh\n   node <skill-folder>/scripts/onboard.mjs apply --repo <repository> --yes\n   ```\n\n   That writes the files and prints the install and hook commands. **Run them yourself, in order,\n   and stop at the first one that fails.** If a write fails, apply exits non-zero and prints no\n   commands at all — fix the failure and apply again before anything is installed or armed. The scripts run no installs: the network stays out of a\n   module the session-start check also loads, and every install stays where the user can see it.\n   **Complete when:** the report says what was applied and what was not, with nothing implied.\n\n7. **Record a no properly.** If the user declines a skill, write nothing unless they say \"don't\n   ask again\" — then apply with `--decline <names>`, which records that decision against the\n   fingerprint of that skill's own evidence, so it is offered again if and only if the evidence\n   changes. An adapted copy is part of that evidence: composing a copy of a declined skill lifts\n   the decline, and a decline of a skill with copies holds until a copy is added or removed.\n   **Complete when:** a declined skill is either absent from the profile or recorded with its\n   fingerprint.\n\n8. **Refresh shows differences only, and drops a listed skill only on request or with its\n   copy.** New matches; a `-` row for a listed skill whose evidence is gone, kept until the user\n   says `--drop <names>` — except a skill listed only as `adapted`, which leaves with its last\n   copy, in a `-` row that says so, because kept it would route every session to a skill this\n   repository never installed; a `?` row for one whose evidence cannot be read on this machine —\n   no session history here, or a scan that hit its bounds — which is kept without question; listed\n   skills that are not installed; and a routing file that no longer matches its profile, shown as\n   the lines that would change.\n   **Complete when:** the user sees only what changed since the last scan.\n\n9. **Arm the check only if the user asks for it.** It is off until then. It says one line when a\n   listed skill is neither installed nor adapted here, the evidence moved, an adapted copy was\n   added, removed or re-pinned, or the routing file drifted, and nothing at all otherwise; it reads\n   no history, never blocks, and fails open.\n   **Complete when:** the hook is armed with the user's explicit yes, or it is not armed.\n\nSee [what gets written](references/what-gets-written.md) for every file, its location and its undo,\nand [fit signals](references/fit-signals.md) for the grammar a skill declares its own fit in.\n\n## Usage Examples\n\n```text\nOnboard this project. Tell me which skills this repository should use and why, show me everything\nyou would write and everything you would install before you write any of it, and do not arm any\nhook without telling me it affects all my projects.\n```\n\n```text\nWe added migrations and a background worker since you last looked. Refresh the profile and show me\nonly what changed — do not rewrite the routing file if it has not moved.\n```\n\n```text\nCheck this repository quietly. If everything the profile lists is installed and the evidence has\nnot moved, say nothing at all.\n```\n\n```text\nKeep this one local: the repository is not mine to put tooling files in. Write the routing file,\nadd it to the git exclude, and keep the profile under my agents directory.\n```\n\n## Pitfalls\n\n- **Editing CLAUDE.md instead.** Roughly one repository in a large estate carries a hand-written\n  routing section, and the context files in several are generated by other tools with \"do not\n  edit\" at the top — an inserted section there survives exactly until the next regeneration. The\n  routing file is separate for that reason.\n- **Recommending from descriptions and calling it evidence.** A description match is a guess; it\n  belongs in the weak list, labelled, never marked required.\n- **A skill listed but never installed.** The profile is not an installer. A listed skill that is\n  not installed does nothing at all, which is why the check's first question is whether the\n  required ones are actually there.\n- **Sending a session to the generic skill when the repository has adapted it.** The generic copy\n  carries none of the project's values, and an install command for it puts a second copy beside the\n  adapted one. A skill with an adapted copy here is present: no install is offered, the check does\n  not call it missing, and the routing line names the copy.\n- **Arming a hook inside a project yes.** The hook is in user settings and applies to every\n  project on the machine. It gets its own row, its own mark, and its own yes.\n- **Reading history at session start.** These transcripts run to tens of megabytes. A check that\n  costs a second at every session start is a check that gets removed, and then nothing is watching\n  at all.\n- **Treating an absent history as evidence of nothing happening.** A machine that has never opened\n  this repository has no history for it. That is *unknown*, not zero — and a skill must not be\n  dropped because the evidence was never going to be here.\n- **Overwriting a hand-edited routing file.** It is generated, and a formatter or a person can\n  still have touched it. Refresh shows the diff and asks; it does not tidy.\n- **Committing tooling files into a repository that is not yours.** Placement is asked once per\n  repository and defaults to local for any origin owner the user has not listed.\n\n## Verification\n\n- [ ] The run announced its entry point before reading anything.\n- [ ] Placement was settled once, and matches the repository's origin owner or the user's answer.\n- [ ] Every recommended skill carries the evidence that justified it; weak ones are labelled.\n- [ ] The change list showed every skill, file and hook, each with its undo, before any write.\n- [ ] Nothing was written without one explicit yes.\n- [ ] Installs and hooks were run in order, stopping at the first failure, with the result naming\n      what was applied and what was not.\n- [ ] No CLAUDE.md, AGENTS.md or generated context file was touched.\n- [ ] A declined skill is either absent from the profile or recorded with its own fingerprint.\n- [ ] A skill this repository has adapted got no install command, and its routing line names the\n      adapted copy.\n- [ ] The hook, if armed, was armed on its own explicit yes and is marked as affecting all\n      projects.\n- [ ] `check` says nothing in a repository where everything agrees.\n\nThe project is onboarded when a new session in that repository sees the right skills without\nanybody remembering to mention them — and when the person who owns the repository can undo every\nline of it from the list they said yes to.\n","bodyHtml":"<h2 id=\"onboard-a-projects-skills\">Onboard a project&#39;s skills</h2>\n<p>A skill loads when its description happens to match the task at hand, or when somebody types its\nname. That is the whole mechanism. There is no supported way to force-load a skill, and no field\nin a skill&#39;s frontmatter that makes one skill require another.</p>\n<p>It works until the install base grows. On the machine this was built for, 201 skills were\ninstalled; the one a project actually depends on surfaced by luck. And enforcement does not fix\nit: a gate that demanded a progress report was satisfied, in real sessions, by an agent writing\nthe three headings from memory — the skill was never loaded, so everything it exists to carry was\nabsent. The gate got its shape. The reader got nothing.</p>\n<p>The fix is not a bigger gate. It is a file every session already reads. This skill decides which\nskills a repository should use, from evidence in the repository and in how it is worked on, and\nwrites that decision into <code>.claude/rules/skill-routing.md</code> — a rules file with no <code>paths</code>\nfrontmatter, which loads at the start of every session at the same priority as the project\nCLAUDE.md. Nothing is forced; the right skills are simply in front of the agent before it has to\ngo looking.</p>\n<p><strong>One yes, and everything is shown first.</strong> The change list names every skill, every file and\nevery hook, each with the evidence behind it and the undo that takes it back. Nothing is written\nbefore that yes, and nothing that is written is hard to remove.</p>\n<h4 id=\"what-this-skill-does-not-own\">What this skill does not own</h4>\n<table>\n<thead>\n<tr>\n<th>The job</th>\n<th>Whose it is</th>\n<th>What this skill does with it</th>\n</tr>\n</thead>\n<tbody><tr>\n<td>Installing and updating skills across scopes and agents</td>\n<td><code>update-agent-skills</code></td>\n<td>Prints the install commands and never runs one. <strong>The user runs that skill; no skill may install it on their behalf.</strong></td>\n</tr>\n<tr>\n<td>Composing, checking and re-pinning a project&#39;s adapted copy of a pack skill</td>\n<td><code>update-agent-skills</code></td>\n<td>Reads each copy&#39;s <code>adapted.lock.json</code> to count the skill it adapts as present and to route to the copy. Never composes, edits or re-pins one.</td>\n</tr>\n<tr>\n<td>The context files agents load — CLAUDE.md, AGENTS.md and their generated kin</td>\n<td><code>derive-codebase-context</code></td>\n<td>Touches none of them. Its routing lives in a separate generated rules file, so a regeneration somebody else owns cannot clobber it.</td>\n</tr>\n<tr>\n<td>The documentation people read</td>\n<td><code>layer-repository-docs</code></td>\n<td>Writes none. The routing file is for agents and says so in its own header.</td>\n</tr>\n<tr>\n<td>Declared-catalog placement and inherited policy</td>\n<td><code>workspace-governance</code></td>\n<td>Reads the repository where it stands; decides nothing about where repositories belong.</td>\n</tr>\n<tr>\n<td>Which model runs which work</td>\n<td><code>model-routing</code></td>\n<td>Recommends the skill; makes no routing decision.</td>\n</tr>\n<tr>\n<td>The shape of a progress report, and the note for a release</td>\n<td><code>report-progress</code>, <code>release-notes</code></td>\n<td>Recommends them, and lists their gates as hooks you may arm. Those installers stay theirs.</td>\n</tr>\n<tr>\n<td>Authoring or releasing a skill</td>\n<td><code>publish-agent-skill</code></td>\n<td>Never authors one. A skill it cannot find is a skill it reports as missing.</td>\n</tr>\n</tbody></table>\n<h3 id=\"when-to-use\">When to Use</h3>\n<p>Three entry points, and the run <strong>announces which one it picked before it reads anything</strong>:</p>\n<ul>\n<li><strong>onboard</strong> — this repository has no profile. Scan, recommend, show the change list, apply on one\nyes. Symptoms: <em>which skills should this project use</em>, <em>set this repo up for agents</em>, <em>onboard\nthis project</em>, <em>check the prerequisites here</em>.</li>\n<li><strong>refresh</strong> — it has one. Scan again and show only what changed. Symptoms: <em>we added a database,\nre-check</em>, <em>this repo has moved on</em>, <em>the routing file looks stale</em>.</li>\n<li><strong>check</strong> — the quiet one, run by a hook at session start. Reads, says nothing unless something\nis missing or has moved. You rarely invoke it by hand.</li>\n</ul>\n<p>With no word at all, a repository with no profile gets <strong>onboard</strong> and one with a profile gets\n<strong>refresh</strong>.</p>\n<p>Do not use it to install skills — that is <code>update-agent-skills</code>, and the user runs it. Do not use\nit to write a project&#39;s context file. Do not use it to decide what a change should touch, or how\nwork should be reported; it recommends the skills that own those jobs and owns none of them.</p>\n<h3 id=\"prerequisites\">Prerequisites</h3>\n<ol>\n<li><strong>A repository to stand in.</strong> Any directory; a git repository gets the committed option.\n<strong>Complete when:</strong> the repository root is known — the scripts walk up to find it.</li>\n<li><strong>The pack checkout.</strong> This skill&#39;s scripts read every pack skill&#39;s <code>references/fit.json</code>.\n<strong>Complete when:</strong> <code>scripts/onboard.mjs plan</code> runs and lists skills.</li>\n<li><strong>Node 22 or newer,</strong> and <code>npx</code> for the install commands the plan prints.\n<strong>Complete when:</strong> <code>node --version</code> is 22 or above.</li>\n<li><strong>A placement answer, once per repository.</strong> Committed, or kept local.\n<strong>Complete when:</strong> the user has answered, or <code>commitOwners</code> in the user config already answers\nfor this repository&#39;s origin owner.</li>\n</ol>\n<h3 id=\"procedure\">Procedure</h3>\n<ol>\n<li><p><strong>Say which entry point you are running, and why.</strong> &quot;No profile here, so this is onboard.&quot; A\nrun that starts scanning without naming its own mode leaves the reader unable to tell a first\nonboarding from a re-check.\n<strong>Complete when:</strong> the announcement names the entry point and the repository.</p>\n</li>\n<li><p><strong>Settle placement before anything is written.</strong> Committed means <code>skills-profile.json</code> lands in\nthe repository, so a teammate&#39;s checkout carries the same answer; local means it lives under\nthe user&#39;s agents directory and the repository stays clean. The plan pre-selects from the\nuser&#39;s <code>commitOwners</code>, and a repository with no git metadata can only be local. Ask once, and\nonly when the pre-selection could be wrong.\n<strong>Complete when:</strong> the answer is recorded, and the user was not asked a second time.</p>\n</li>\n<li><p><strong>Run the plan, which writes nothing.</strong></p>\n<pre><code class=\"language-sh\">node &lt;skill-folder&gt;/scripts/onboard.mjs plan --repo &lt;repository&gt;\n</code></pre>\n<p>It evaluates every pack skill&#39;s declared fit against this repository&#39;s files, and — for onboard\nand refresh only — against this machine&#39;s session history for this repository. History is read\nhere and <strong>never</strong> at session start.</p>\n<p><strong>A skill this repository has adapted is already here.</strong> An adapted copy is the one\n<code>update-agent-skills</code> composes from a pinned pack skill and the project&#39;s overlay, under a name\nof its own, and its <code>adapted.lock.json</code> names the skill it adapts. The plan counts that skill as\npresent: a <code>=</code> row naming the copy, no install command, and a routing line that names the copy\ninstead of the skill. A skill the scan did not match is listed anyway, as <code>adapted</code>, because the\ncopy is the evidence that the project uses it. Lines that open <code>adapted copy:</code> come in two kinds.\n<code>&lt;folder&gt;: &lt;problem&gt;</code> names a copy that stands in for nothing, and its skill is planned as if no\ncopy were there: when the problem is a lock version this skill does not read, update\nonboard-project; when it is a folder of the same name read first, rename or remove one of the\ntwo; otherwise hand it to <code>update-agent-skills</code>, whose adapter <code>check</code> says what is wrong. Never\nedit a lock by hand. <code>&lt;copy&gt; adapts &lt;skill&gt;, which this catalogue does not carry</code> names a copy of\na skill from elsewhere: it is recorded in the profile and gets no routing line.\n<strong>Complete when:</strong> the change list exists, and no file in the repository has changed.</p>\n</li>\n<li><p><strong>Add the weak matches yourself, if any.</strong> The scan is deliberately narrow: it recommends only\nwhat a declared fit matched. Skills installed on this machine that are <em>not</em> in the pack can\nstill fit, but only a reader can say so, from their descriptions and what the scan found. Pass\nthem with <code>--weak &lt;names&gt;</code>; they are listed as &quot;suggested from description, not checked&quot;, never\nmarked required, and kept on every later apply until someone drops them.\n<strong>Complete when:</strong> every weak suggestion names the description it came from, or there are none.</p>\n</li>\n<li><p><strong>Show the whole change list and ask once.</strong> Every row carries its undo:</p>\n<pre><code class=\"language-text\">+ release-notes  (strong)  package.json has a version\n    install: npx skills add &lt;source&gt; --skill release-notes --project --yes\n    undo:    npx skills remove release-notes --project\n= report-progress  (strong)  already installed (global)\n= request-answers  (general)  adapted here as ask-the-owner at v1.4.0 — nothing to install; the routing names the adapted copy\n~ write skills-profile.json — in this repository\n    undo:    delete it, or git revert\n~ write .claude/rules/skill-routing.md — a new file\n    undo:    delete it, or git revert\n~ write .git/info/exclude — one line, /.claude/rules/skill-routing.md, so the routing file stays out of git status\n    undo:    remove that line\n! arm the session-start check — affects all projects on this machine, not only this one\n    command: node &lt;skill-folder&gt;/scripts/install-check-hook.mjs\n    undo:    node &lt;skill-folder&gt;/scripts/install-check-hook.mjs --remove\n</code></pre>\n<p>The exclude row appears for a local placement in a git repository — including a worktree, where\nthe line goes to the repository&#39;s shared exclude file. A hook lives in the user&#39;s own settings,\nso it is always its own row and always marked. Never fold it into a general yes about &quot;setting\nthe project up&quot;.\n<strong>Complete when:</strong> the user has seen every row, including the hook row, and answered.</p>\n</li>\n<li><p><strong>Apply in order — files, installs, hooks — and stop at the first failure.</strong></p>\n<pre><code class=\"language-sh\">node &lt;skill-folder&gt;/scripts/onboard.mjs apply --repo &lt;repository&gt; --yes\n</code></pre>\n<p>That writes the files and prints the install and hook commands. <strong>Run them yourself, in order,\nand stop at the first one that fails.</strong> If a write fails, apply exits non-zero and prints no\ncommands at all — fix the failure and apply again before anything is installed or armed. The scripts run no installs: the network stays out of a\nmodule the session-start check also loads, and every install stays where the user can see it.\n<strong>Complete when:</strong> the report says what was applied and what was not, with nothing implied.</p>\n</li>\n<li><p><strong>Record a no properly.</strong> If the user declines a skill, write nothing unless they say &quot;don&#39;t\nask again&quot; — then apply with <code>--decline &lt;names&gt;</code>, which records that decision against the\nfingerprint of that skill&#39;s own evidence, so it is offered again if and only if the evidence\nchanges. An adapted copy is part of that evidence: composing a copy of a declined skill lifts\nthe decline, and a decline of a skill with copies holds until a copy is added or removed.\n<strong>Complete when:</strong> a declined skill is either absent from the profile or recorded with its\nfingerprint.</p>\n</li>\n<li><p><strong>Refresh shows differences only, and drops a listed skill only on request or with its\ncopy.</strong> New matches; a <code>-</code> row for a listed skill whose evidence is gone, kept until the user\nsays <code>--drop &lt;names&gt;</code> — except a skill listed only as <code>adapted</code>, which leaves with its last\ncopy, in a <code>-</code> row that says so, because kept it would route every session to a skill this\nrepository never installed; a <code>?</code> row for one whose evidence cannot be read on this machine —\nno session history here, or a scan that hit its bounds — which is kept without question; listed\nskills that are not installed; and a routing file that no longer matches its profile, shown as\nthe lines that would change.\n<strong>Complete when:</strong> the user sees only what changed since the last scan.</p>\n</li>\n<li><p><strong>Arm the check only if the user asks for it.</strong> It is off until then. It says one line when a\nlisted skill is neither installed nor adapted here, the evidence moved, an adapted copy was\nadded, removed or re-pinned, or the routing file drifted, and nothing at all otherwise; it reads\nno history, never blocks, and fails open.\n<strong>Complete when:</strong> the hook is armed with the user&#39;s explicit yes, or it is not armed.</p>\n</li>\n</ol>\n<p>See <a href=\"references/what-gets-written.md\">what gets written</a> for every file, its location and its undo,\nand <a href=\"references/fit-signals.md\">fit signals</a> for the grammar a skill declares its own fit in.</p>\n<h3 id=\"usage-examples\">Usage Examples</h3>\n<pre><code class=\"language-text\">Onboard this project. Tell me which skills this repository should use and why, show me everything\nyou would write and everything you would install before you write any of it, and do not arm any\nhook without telling me it affects all my projects.\n</code></pre>\n<pre><code class=\"language-text\">We added migrations and a background worker since you last looked. Refresh the profile and show me\nonly what changed — do not rewrite the routing file if it has not moved.\n</code></pre>\n<pre><code class=\"language-text\">Check this repository quietly. If everything the profile lists is installed and the evidence has\nnot moved, say nothing at all.\n</code></pre>\n<pre><code class=\"language-text\">Keep this one local: the repository is not mine to put tooling files in. Write the routing file,\nadd it to the git exclude, and keep the profile under my agents directory.\n</code></pre>\n<h3 id=\"pitfalls\">Pitfalls</h3>\n<ul>\n<li><strong>Editing CLAUDE.md instead.</strong> Roughly one repository in a large estate carries a hand-written\nrouting section, and the context files in several are generated by other tools with &quot;do not\nedit&quot; at the top — an inserted section there survives exactly until the next regeneration. The\nrouting file is separate for that reason.</li>\n<li><strong>Recommending from descriptions and calling it evidence.</strong> A description match is a guess; it\nbelongs in the weak list, labelled, never marked required.</li>\n<li><strong>A skill listed but never installed.</strong> The profile is not an installer. A listed skill that is\nnot installed does nothing at all, which is why the check&#39;s first question is whether the\nrequired ones are actually there.</li>\n<li><strong>Sending a session to the generic skill when the repository has adapted it.</strong> The generic copy\ncarries none of the project&#39;s values, and an install command for it puts a second copy beside the\nadapted one. A skill with an adapted copy here is present: no install is offered, the check does\nnot call it missing, and the routing line names the copy.</li>\n<li><strong>Arming a hook inside a project yes.</strong> The hook is in user settings and applies to every\nproject on the machine. It gets its own row, its own mark, and its own yes.</li>\n<li><strong>Reading history at session start.</strong> These transcripts run to tens of megabytes. A check that\ncosts a second at every session start is a check that gets removed, and then nothing is watching\nat all.</li>\n<li><strong>Treating an absent history as evidence of nothing happening.</strong> A machine that has never opened\nthis repository has no history for it. That is <em>unknown</em>, not zero — and a skill must not be\ndropped because the evidence was never going to be here.</li>\n<li><strong>Overwriting a hand-edited routing file.</strong> It is generated, and a formatter or a person can\nstill have touched it. Refresh shows the diff and asks; it does not tidy.</li>\n<li><strong>Committing tooling files into a repository that is not yours.</strong> Placement is asked once per\nrepository and defaults to local for any origin owner the user has not listed.</li>\n</ul>\n<h3 id=\"verification\">Verification</h3>\n<ul>\n<li><input disabled=\"\" type=\"checkbox\"> The run announced its entry point before reading anything.</li>\n<li><input disabled=\"\" type=\"checkbox\"> Placement was settled once, and matches the repository&#39;s origin owner or the user&#39;s answer.</li>\n<li><input disabled=\"\" type=\"checkbox\"> Every recommended skill carries the evidence that justified it; weak ones are labelled.</li>\n<li><input disabled=\"\" type=\"checkbox\"> The change list showed every skill, file and hook, each with its undo, before any write.</li>\n<li><input disabled=\"\" type=\"checkbox\"> Nothing was written without one explicit yes.</li>\n<li><input disabled=\"\" type=\"checkbox\"> Installs and hooks were run in order, stopping at the first failure, with the result naming\nwhat was applied and what was not.</li>\n<li><input disabled=\"\" type=\"checkbox\"> No CLAUDE.md, AGENTS.md or generated context file was touched.</li>\n<li><input disabled=\"\" type=\"checkbox\"> A declined skill is either absent from the profile or recorded with its own fingerprint.</li>\n<li><input disabled=\"\" type=\"checkbox\"> A skill this repository has adapted got no install command, and its routing line names the\nadapted copy.</li>\n<li><input disabled=\"\" type=\"checkbox\"> The hook, if armed, was armed on its own explicit yes and is marked as affecting all\nprojects.</li>\n<li><input disabled=\"\" type=\"checkbox\"> <code>check</code> says nothing in a repository where everything agrees.</li>\n</ul>\n<p>The project is onboarded when a new session in that repository sees the right skills without\nanybody remembering to mention them — and when the person who owns the repository can undo every\nline of it from the list they said yes to.</p>\n","outline":["When to Use","Prerequisites","Procedure","Usage Examples","Pitfalls","Verification"],"words":2679}
