Mechanical rename produced by scripts/msd-rename.cjs: gsd/Gsd/GSD -> msd/Msd/MSD across contents and paths, upstream package/repo coordinates -> @golem15/msd-core and golem15com/msd-core. Deep links into upstream history, sibling upstream packages, the GSD-2 import feature, CHANGELOG.md and .changeset/ are kept as-is. Hand edits on top: MSD block-letter banner and logos, LICENSE copyright line, package/plugin identity, regenerated lockfile, install-tree fixtures, derived registries and benchmark baseline; migration checksum baseline re-locked (MSD keeps its own install state, so no install had applied the old sums); sort-order and regex-escaped expectations in tests adjusted.
2.4 KiB
2.4 KiB
Skill Discovery Contract
Canonical rules for scanning, inventorying, and rendering MSD skills.
Root Categories
Project Roots
Scan these roots relative to the project root:
.claude/skills/.agents/skills/.cursor/skills/.github/skills/./.codex/skills/
These roots are used for project-specific skills and for the project CLAUDE.md skills section.
Managed Global Roots
Scan these roots relative to the user home directory:
~/.claude/skills/~/.codex/skills/
These roots are used for managed runtime installs and inventory reporting.
Deprecated Import-Only Root
~/.claude/msd-core/skills/
This root is kept for legacy migration only. Inventory code may report it, but new installs should not write here.
Legacy Claude Commands
~/.claude/commands/msd/
This is not a skills root. Discovery code only checks whether it exists so inventory can report legacy Claude installs.
Normalization Rules
- Scan only subdirectories that contain
SKILL.md. - Read
nameanddescriptionfrom YAML frontmatter. - Use the directory name when
nameis missing. - Extract trigger hints from body lines that match
TRIGGER when: .... - Treat
msd-*directories as installed framework skills. - Treat
~/.claude/msd-core/skills/entries as deprecated/import-only. - Treat
~/.claude/commands/msd/as legacy command installation metadata, not skills.
Scanner Behavior
src/profile-output.cts
- Builds the project
CLAUDE.mdskills section. - Scans project roots only.
- Skips
msd-*directories so the project section stays focused on user/project skills. - Adds
.codex/skills/to the project discovery set.
src/init.cts
- Generates the skill inventory object for
skill-manifest. - Reports
skills,roots,installation, andcounts. - Marks
msd_skills_installedwhen any discovered skill name starts withmsd-. - Marks
legacy_claude_commands_installedwhen~/.claude/commands/msd/contains.mdcommand files.
Inventory Shape
skill-manifest returns a JSON object with:
skills: normalized skill entriesroots: the canonical roots that were checkedinstallation: summary booleans for installed MSD skills and legacy Claude commandscounts: small inventory counts for downstream consumers
Each skill entry includes:
namedescriptiontriggerspathfile_pathrootscopeinstalleddeprecated