sk-create-repo-rule
Author, revise or retire a repo rule from a user's request, with the decision tests that refuse most of them.
от MichelKerkmeester★ 40 звёзд на GitHub
Установить sk-create-repo-rule в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
create-repo-rule
create-repo-rule is the repo-rule authoring workflow packet of the sk-doc family. It
turns a user's request — a behaviour they want, or a failure they keep hitting — into a
file in the target repository's rules directory (.skilled/repo-rules/ where a .skilled
source root exists, repo-rules/ otherwise), wired into its REPO RULES.md router.
Most requests should not become a rule. The four decision tests in
references/decision-tests.md refuse more than they admit, and running them first is the
cheap order. Authoring a rule that then fails a test is the expensive one.
A repo rule supplements the harness. It sits below AGENTS.md and below a live
operator instruction, it can be changed when it stops matching the work, and it can be
removed when it stops earning its load. This mode owns all three.
1. WHEN TO USE
Activation Triggers
- Someone asks for a repo rule, a project rule, or a convention that should bind before an action.
- Someone describes a recurring failure and asks how to stop it happening again.
- An existing rule needs changing because it no longer matches how the work is done.
- A rule needs retiring because nothing it prevents still happens.
- A repository needs a rule router because it has none.
Keyword triggers: create repo rule, /create:repo-rule, repo rule, project rule, REPO RULES.md, repo-rules, add a rule, retire a rule, revise a rule, trigger table, rule router.
When NOT to Use
- It teaches how to do something. A skill is capability, a rule is constraint. Route to the skill-authoring mode.
- It must bind on every turn. Content that holds when no trigger fires belongs in the always-loaded document, not behind a trigger. This is decision test 1 and the most common refusal.
- It is routing. Which skill, which command, which agent, which flags. The always-loaded document and the skills it routes to own that.
- It is one line, not a cluster. A single row is a section inside an existing rule.
- A sibling mode already produces it. README, changelog, command, catalog, playbook and diagram all have owners.
2. SMART ROUTING
sk-doc routes repo-rule authoring here: the request names a repo rule, a project rule, REPO RULES.md or /create:repo-rule.
The hub's mode signal selects this packet.
Four operations route here: create, revise, retire and router.
The operation decides which resources load, and the decision tests decide whether anything should be authored at all.
references/decision-tests.md loads first on every path, including retire, because whether a rule should exist and whether it should still exist are the same four questions.
references/README.md routes the rest.
Read ROUTER.md before selecting skill-local resources; open only the matched files.
3. HOW IT WORKS
Create
Run the four decision tests. Always-loaded, scope boundary, four-part refusal, restraint.
On refusal, name the test that failed and where the content goes instead — the tests' section 6 maps every refusal to a destination. Stop here. This is the common outcome.
Check the destination exists. No
REPO RULES.mdin the target repository means no rule can load; emit the router fromassets/repo-rules-router-template.mdfirst.Fill
assets/repo-rule-template.md. Ten fixed elements, open numbered body, aim under 160 lines.Run
references/creation-standards.mdagainst the draft. Structure is checkable and is not the bar; a rule can pass every assertion and be worth nobody's context.Wire it: a trigger row and an index row in the router, and a pointer from the
AGENTS.mdsection it governs.Verify by running the checker, not by eye:
node .skilled/skills/sk-doc/sk-create-repo-rule/scripts/check-repo-rules.cjs. It exits non-zero on any failure, and it asserts:- count parity across the rule files and both router tables.
- row coverage with link resolution.
- trigger-phrase uniqueness, the line ceiling, frontmatter keys, divider parity and rule links.
- fires-when sections.
- that every index summary matches its rule's own description.
- that every Fires-when bullet has a counterpart in its router row.
- that every committed rule card still matches the card its rule renders.
A hand check of the same properties is how every one of them drifted before the checker existed. What it cannot judge is whether the rule is worth loading at all, which is
references/creation-standards.mdand still needs a reader.
Revise
Run the decision tests again first — a rule that no longer passes them should be retired,
not patched. Then edit, and if the change alters when the rule fires, change the trigger
row in the same edit or the router lies silently. Bump version. Full ordering and the
version convention: references/agents-md-integration.md §5.
To learn whether a revision changed behaviour, measur
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
- 01
Read - 02
Write - 03
Edit - 04
Bash - 05
Grep - 06
Glob
Вложенные файлы
- README.md
- ROUTER.md
- assets/repo-rule-template.md
- assets/repo-rules-router-template.md
- changelog/v1.0.0.0.md
- changelog/v1.1.0.0.md
- changelog/v1.1.1.0.md
- changelog/v1.1.2.0.md
- changelog/v1.1.3.0.md
- changelog/v1.1.4.0.md
- changelog/v1.1.5.0.md
- changelog/v1.1.6.0.md
- changelog/v1.1.7.0.md
- changelog/v1.1.8.0.md
- manual-testing-playbook/lifecycle-and-wiring/router-bootstrap.md
- manual-testing-playbook/lifecycle-and-wiring/rule-retirement.md
- manual-testing-playbook/lifecycle-and-wiring/scope-boundary-halt.md
- manual-testing-playbook/manual-testing-playbook.md
- manual-testing-playbook/rule-authoring/full-rule-authoring.md
- manual-testing-playbook/rule-authoring/standards-gate-rejection.md
- manual-testing-playbook/rule-authoring/trigger-phrase-collision.md
- manual-testing-playbook/rule-decision/always-loaded-refusal.md
- manual-testing-playbook/rule-decision/existing-owner-refusal.md
- manual-testing-playbook/rule-decision/no-observed-failure-refusal-conversation.md
- manual-testing-playbook/rule-decision/no-observed-failure-refusal.md
- manual-testing-playbook/rule-decision/routing-refusal.md
- manual-testing-playbook/rule-loading-experiments/card-arm-run.md
- manual-testing-playbook/rule-loading-experiments/card-generator-sync.md
- manual-testing-playbook/rule-loading-experiments/executor-failure-triage.md
- manual-testing-playbook/rule-loading-experiments/experiment-environment-build.md
- manual-testing-playbook/rule-loading-experiments/table-wording-run.md
- references/README.md
- references/agents-md-integration.md
- references/creation-standards.md
- references/decision-tests.md
- references/rule-anatomy.md
- scripts/build-rule-cards.cjs
- scripts/check-repo-rules.cjs
- scripts/measure-rule-compliance.py
- scripts/rule-experiment-fixture/README.md
FAQ
Что делает скилл sk-create-repo-rule?
Author, revise or retire a repo rule from a user's request, with the decision tests that refuse most of them.
Как установить скилл sk-create-repo-rule?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл sk-create-repo-rule запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
theme-factory
AnthropicToolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
access
AnthropicManage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
configure
AnthropicSet up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
access
AnthropicManage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…