Create and maintain repository skills with a triple workflow: creation mode, path-finalize mode, and auto-discover finalize mode.
Trigger Rules
- If the user provides a
skills/*path and indicates the skill is already generated/copied, run path-finalize mode directly without additional confirmation. - If the user invokes this skill directly without providing a path, run auto-discover finalize mode (
skills:finalize:new) first. - If no new skill can be discovered during auto-discover mode, fall back to creation mode (
skills:new) and then continue finalize.
Mode A: Create New Skill
Primary command (recommended):
pnpm skills:new
Manual creation commands:
pnpm skills:init <skill-name> --path skills --resources scripts,references
pnpm skills:finalize -- skills/<skill-name>
Mode B: Finalize Existing Skill by Path
When the user pastes a path under skills/*, run:
pnpm skills:finalize -- <skill-path>
Examples:
pnpm skills:finalize -- skills/code-inspector-init
pnpm skills:finalize -- /Users/adonis/coding/adonis-skills2/skills/code-inspector-init/
Finalize pipeline is fixed and must run in order:
pnpm skills:quick-validate skills/<skill-slug>pnpm skills:validatepnpm skills:index
Mode C: Auto Discover + Finalize + Stage
When user does not pass a skills/* path, run:
pnpm skills:finalize:new
Behavior contract:
- Discover newly added skill candidates from
git status --short --untracked-files=all:- include
A(index-added) and??(untracked) - only accept slugs where
skills/<slug>/SKILL.mditself is inAor??
- include
- Finalize each discovered slug in stable sorted order:
pnpm skills:finalize -- skills/<slug>- stop immediately on first failure
- Stage only related files after all finalize runs succeed:
git add skills/<slug>for each processed sluggit add apps/web/src/generated/skills-index.jsonwhen changed
- If no new skill is discovered:
- auto-run
pnpm skills:new - re-scan for newly added skills and continue this mode
- auto-run
Scope Boundaries
- Do not auto-run
pnpm skills:openai-yamlunless explicitly requested. - Do not auto-run local install/sync (
skills:install:local,skills:test:local) unless explicitly requested. - Do not use
git add -A; only stage skill-related files from this workflow.
Output Contract
When executing this skill, always return:
- Commands executed (or planned commands in dry-run).
- Success/failure status.
- Detected/processed skill slugs and staged file paths.
- Next-step suggestion only when useful (for example, local agent testing via
pnpm skills:test:local).
Skill Rules
- Use lowercase hyphen-case skill names.
- Keep
SKILL.mdfrontmatter valid with non-emptynameanddescription. frontmatter.descriptionmust be English-only (ASCII characters only), and should clearly include when to use the skill.- Add optional directories (
scripts/,references/,assets/) only when needed. - Re-run validation and index generation after updates and before commit.