rules
БесплатноЗапускает вложенные скриптыНе проверенSyncs KNOWLEDGE.jsonl or session learnings to project rules. Triggers: rules, knowledge sync, extract rules.
от kochetkov-ma★ 41 звезда на GitHubОб этом скилле
rules Skill
TARGET: Project
.claude/rules/only. NEVER~/.claude/rules/
Prompt contract
$ARGUMENTS is one free-form RU/EN prompt; mode tokens and flags may sit anywhere in it.
- Mode: an explicit mode token wins outright; else the most distinct whole-word keyword hits
(table below). Tie with a destructive mode ->
AskUserQuestion; withstatus->status; of two mutating modes -> the keyword that comes first. No hit or empty ->status. - Scope: prose that is not a mode/id/path is still input: take the id, path or target from it.
- Ask: bundle material unresolved write decisions in ONE
AskUserQuestion(max 4 questions), before work. Use prompt/history answers; never repeat resolved questions or routine approval calls. Read-only asks nothing except an explicitly requested menu.
Print once, before the first action (labels and plan values English, INPUT verbatim):
PLAN — brewcode:rules
INPUT: <arguments verbatim, or "(empty)">
MODE: <resolved> — <explicit | matched keyword: X | default>
SCOPE: <resolved paths / target / level / flags>
DO: <2-5 imperative bullets>
RESULT: <what the user ends up holding>
Constants
| Const | Value |
|---|---|
| SPECIALIST | brewcode:bc-rules-organizer |
| LIST_CMD | bash "${CLAUDE_SKILL_DIR}/scripts/rules.sh" list |
Step 1 — Input gate
Empty -> status; explicit menu request -> Step 3; else Step 2.
Step 2 — Auto-mode selection
Classify the prompt + recent context into ONE mode:
| Mode | EN keywords | RU keywords | Mutates? |
|---|---|---|---|
status |
(empty), status, show me, health, overview |
статус, что есть, состояние |
no |
list |
list |
список, перечисли |
no |
create |
create, new, scaffold, add |
создай, добавь |
yes |
improve |
improve, refactor, fix |
улучши, почини |
yes |
review |
review, validate |
ревью, проверь корректность |
no |
improve also matches a bare existing rule name/path. Plural, "все"/"all" or several names/paths ->
batch: one specialist spawn per item. Print the PLAN, then Step 4.
Step 3 — Menu (explicit request only)
One AskUserQuestion, two questions, 2-4 options each (tool cap; "Other" is automatic):
- Q1
What do you want to do with rules?:Status (rules)(Recommended),Create new rules,Improve existing rules,Review rules - Q2
Variant?:As chosen(Recommended),Status (all: agents+rules+skills),List (plain); a non-default Q2 replaces Q1
Dismissed or cancel via Other -> stop. Else take target and params from the choice plus prompt/history, no follow-up: safe
gap -> stated default; write-critical gap -> report the missing decision before writing. Print PLAN,
then Step 4.
Delegation (every Agent spawn)
Main owns every spawn; delegates return results, never nest or accept their own output. One subagent = one bounded unit: one knowledge source -> its avoid/best-practice pair (cross-file dedup needs both), ~<=5 files, ~<=10 steps; bigger work splits into N tasks spawned in one message.
Every spawn brief carries six labeled fields, since a subagent starts with an empty context: GOAL (task + why), ROLE (owns, must not touch), SCOPE (paths/commands in and out), CONTEXT (done, by whom, in parallel), CONSUMER (who uses the result + its shape), DONE (acceptance + return: verdict first, evidence, bounded; long output to a file, path returned).
A bare one-line task is never enough.
Step 4 — Dispatch
status/Status (all)-> Step 5 (all: one collector for agents + rules + skills).list-> runLIST_CMD, print its inventory, STOP.create/improve-> resolve targets and params; spawnSPECIALIST, one per item, a batch in one message.review-> the project's reviewer agent from.claude/agents/, elsegeneral-purpose: review -> double-check findings -> report.- Then medium-optimize exactly the written rule files, only when the
brewtools:text-optimizeskill is available in this session (--allow-dirty: this run just wrote them):Skill(skill="brewtools:text-optimize", args="<written rule paths> medium --allow-dirty preserve every table row, frontmatter key, name, number, negation and scope"). It owns snapshot,RUN_DIR, one optimizer per file and its verify gate; then runrules.sh validate. Delegates never spawn optimizers.Skill unavailable (
brewtoolsnot installed) -> skip the pass and report the skip, not a blocker; the rules stay as written, with their validation evidence.
Step 5 — Real status (NOT a flat list)
One Explore/Bash subagent collects; main assembles:
- Inventory: plugin / project (
.claude/) / global (~/.claude/): counts, names, load path. - State: enabled/disabled (setup config or
<name>.disabledparking); legacy_SKILL.md/_<name>.mdmarkers; model. - Overlaps: same name across scopes (shadowing), duplicate tri
Установить rules в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
ReadWriteEditGlobGrepBashAgentAskUserQuestionSkillВложенные файлы
FAQ
Что делает скилл rules?
Syncs KNOWLEDGE.jsonl or session learnings to project rules. Triggers: rules, knowledge sync, extract rules.
Как установить скилл rules?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл rules запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set 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…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic