skill-governor
Installation
SKILL.md
Skill Governor
Use this skill as the primary interface for skill governance. Execute through bin/skill-governor; do not mutate provider files directly.
What this skill does
- Discover skills from
codex,cursor, andclaude - Normalize skills across
userandworkspacescopes - Audit governance health and inventory distribution
- Detect duplicate skills and suggest primary or secondary outcomes
- Cluster skills by domain and useful keywords
- Generate governance plans with
conservative,balanced, oraggressivepolicies - Apply a stored governance plan
- Roll back to the latest or a named snapshot
- Activate an existing governance profile
- Generate Markdown or JSON reports
Working rules
- Treat the repository-root
SKILL.mdas the user-facing entrypoint. - Always call
bin/skill-governoras the execution engine. - Prefer
--format jsonso results are stable and easy to summarize. - Pass
--providerand--source-scopewhen the user narrows the target set. - Pass
--scope user|workspaceor--store-root <path>for state-changing commands. - Use
optimizeto generate or review a plan beforeapply. - Keep the user-facing explanation skill-first even when the actual work happens in the CLI.
Command mapping
Map one user intent to one allowlisted CLI command.
- "治理一下我的 skill"
bin/skill-governor optimize --policy conservative --format json
- "看看有哪些重复 skill"
bin/skill-governor dedupe --format json
- "列出所有 skill"
bin/skill-governor list --format json
- "列出 workspace 的 codex skill"
bin/skill-governor list --provider codex --source-scope workspace --format json
- "审计一下当前 skill 状态"
bin/skill-governor audit --format json
- "切换到 minimal 模式"
bin/skill-governor profile use minimal --scope workspace --format json
- "应用 plan-123"
bin/skill-governor apply --plan plan-123 --scope workspace --format json
- "回滚上一次治理"
bin/skill-governor rollback --scope workspace --format json
Workflow
- Parse the user request into one governance intent.
- Decide whether the request is read-only or state-changing.
- Choose the narrowest useful scope and provider filters.
- For mutating requests, preview or inspect first whenever possible.
- Run the mapped
bin/skill-governorcommand and read the JSON result. - Summarize the outcome in natural language.
- Before
apply, require explicit confirmation.
Safety
- Never edit raw provider
SKILL.mdfiles directly. - All write actions must flow through the CLI.
- Treat raw provider skill files as read-only inputs.
- Default to dry-run behavior for optimization and plan review.
- Require explicit confirmation before
apply. - Use
rollbackinstead of manual file recovery. - If scope is ambiguous, clarify whether governance should target
userorworkspace.
Example
User:
/skill-governor 将我本地的全局 skill 治理一下
Assistant:
- Run
bin/skill-governor optimize --policy conservative --format json - Summarize duplicate groups, changed skill count, and profile drafts
- Ask whether to run
bin/skill-governor apply --plan <plan-id> --scope workspace --format json
Response guidance
- Prefer concise summaries backed by JSON output.
- Mention duplicate groups, changed skill count, active profile, and snapshot id when relevant.
- If a command fails, surface the structured error code and message.
For extended usage examples and operator guidance, see USAGE.md.