/rules-as-files:rules-as-filesfrom rules-as-files
Manages agent and team rules as one markdown file per rule with short index lines in CLAUDE.md or AGENTS.md. Handles rule intake, slimming bloated files, resolving conflicts, logging declined decisions, and documenting no-go verdicts.
Ships in rules-as-files. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
A working method for rules that a human, their assistants and their AI agents all follow. Each rule is one markdown file; the always-loaded layer carries only a short pointer to it. The full specification is in SPEC.md; fill-in templates are in templates/.
This skill is instructions only. It reads and writes markdown files in the user's own project and never runs programs or sends data anywhere.
CLAUDE.md / AGENTS.md has grown into full prose rules and needs slimming.Ask the routing questions in order (SPEC section 4):
Create one file from templates/rule-template.md.
Fill the frontmatter: title, type, date_established (today, from the
clock), status: active, origin (who stated it), authored_by, audience.
Always write the Why section.
Add exactly one index line to the always-loaded file:
## <Trigger: when this fires>
<Essence in 1-3 sentences.>
Canon: `<rule-file-name>`
Link at least one related rule in both directions.
Name the door: the skill, command, hook or scheduled job that will invoke the rule (SPEC section 9). If none exists yet, add the rule to a short list of doorless rules with the reason.
Report back where the rule lives and where its index line went. Do not postpone the intake because the index file is large; report its size instead (SPEC section 10).
Test before saying done: would a parallel session that never saw this chat pick the rule up by itself? If not, it is not captured.
supersedes wins.origin: owner beats an agent-inferred rule, whatever the dates.date_established beats older on the same topic.status: superseded, add a
forward link, keep the file. History is data.Revisit if condition holds, or as an explicit trade-off quoting the
original decline.OVERTURNED <date> with a pointer to the new
decision; the old text stays.For a decision worth recording, use templates/decision-memo-template.md: recall what is already known first, then options, decision, boundaries, risks and next steps.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub tonydzi/claude-bible --plugin rules-as-filesOther plugins' skills for the same job