Repo Skill Creator
Create and maintain repository skills with intent-specific workflows. Validation is read-only with respect to Git state; creation, finalization, staging, and runtime installation are separate actions.
Trigger Rules
- Classify the request as
create,finalize-path,validate, orfinalize-and-stagebefore running a command. - If the user provides a
skills/*path and indicates the skill is already generated/copied, run path-finalize mode directly without additional confirmation. - A request to check, audit, or validate existing skills runs validation only. It must not create a skill or modify the Git index.
- Run auto-discover finalize-and-stage only when the user explicitly asks to prepare newly added skills for commit or to stage them.
- A bare invocation with no path or action defaults to validation. If exactly one new
skills/<slug>/SKILL.mdis discoverable, report it as the likely finalize target, but do not stage or create anything implicitly.
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
For the selected finalize-path action, run from the current repository root. Relative and absolute targets must resolve to a direct child of this repository's skills/ directory:
pnpm skills:finalize -- <skill-path>
Examples:
pnpm skills:finalize -- skills/code-inspector-init
REPO_ROOT="$(git rev-parse --show-toplevel)"
pnpm skills:finalize -- "$REPO_ROOT/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
This mode does not stage files.
Mode C: Validate Existing Skills
Use for “check”, “audit”, “validate”, or a bare invocation without a requested creation/finalize action:
pnpm skills:validate
When source changes already exist and generated index freshness is part of the check, also run:
pnpm skills:index
git diff --check
Do not call skills:new, skills:finalize:new, or git add in this mode.
Mode D: Auto Discover + Finalize + Stage
Run only when the user explicitly asks to finalize and stage newly added skills:
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-lite.json apps/web/src/generated/skills-detail-index.jsonfor whichever generated index files changed
- If no new skill is discovered:
- report that no new skill was found
- do not create a skill unless the user also requested creation
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 stage in create, finalize-path, or validate mode. Staging requires an explicit
finalize-and-stage/commit-preparation request. - 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, with
nonewhen the selected mode does not stage. - 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.