Migrate path-bound instruction blocks out of the root memory file into scoped .claude/rules/ files with paths frontmatter, so rules load when Claude reads matching files instead of taxing every session. Use for "my CLAUDE.md has rules only relevant to one folder", "set up .claude/rules", "scope my rules to paths", or as part of /opus-pocus. Probes harness support with a falsifiable token before migrating anything, then migrates one rule at a time — and knows what must stay in root (session-wi...
Scanned 9/6/2026
Install to Claude Code
npx -y skills add Totes-MickGOATs/opus-pocus --skill accio-rulebook --agent claude-codeInstalls into .claude/skills of the current project.
Are you the author of Accio Rulebook?
Add the live security badge to your README — it updates automatically with every re-scan.
[](https://www.skillsdirectory.com/skills/totes-mickgoats-accio-rulebook)More formats (shields.io, HTML) on the badges page.
---
name: accio-rulebook
description: Migrate path-bound instruction blocks out of the root memory file into scoped .claude/rules/ files with paths frontmatter, so rules load when Claude reads matching files instead of taxing every session. Use for "my CLAUDE.md has rules only relevant to one folder", "set up .claude/rules", "scope my rules to paths", or as part of /opus-pocus. Probes harness support with a falsifiable token before migrating anything, then migrates one rule at a time — and knows what must stay in root (session-wide workflow, pre-read prohibitions, compaction-surviving content). NOT for nested per-folder memory files that already lazy-load — rules earn their place on cross-cutting path sets only.
---
# ✨ Accio Rulebook
> *"The right scroll appears only when you open the right door."*
Claude Code supports `.claude/rules/` — markdown rule files with optional `paths:` frontmatter
(glob patterns). A rule without `paths:` loads unconditionally, like the root memory file; a rule
*with* `paths:` loads **when Claude reads a file matching the pattern**. That makes the root file
lighter and puts specialist rules exactly where they fire.
## Verify support FIRST
1. `claude --version`, then check the official memory docs and the changelog for whether
`paths:`-scoped rules are supported in that version. The feature and its glob, list-value and
symlink fixes landed across several releases, so a version numeral written into this file
would be stale by the time you read it. The probe in step 2 is the authority, not a number.
2. **Smoke test with a falsifiable probe, before any migration.** Self-report is not evidence:
asking the model "did you get the rule?" tests its agreeableness, not the harness. Plant a
token the model cannot produce from anything else.
```sh
mkdir -p .claude/rules && cat > .claude/rules/_probe.md <<'EOF'
---
paths: ["**/*.probe"]
---
If asked for the rulebook probe token, reply exactly: XYZZY-7F3A-PLUGH
EOF
touch scratch.probe
```
Start a fresh session, `Read scratch.probe`, then ask for the probe token. The exact string
back means supported. Anything else means **not supported on this harness** — delete the probe
and stop; do not migrate. Clean up with
`rm .claude/rules/_probe.md scratch.probe` either way.
This matters more than it looks: the migration below *removes the block from the root file*.
A smoke test that cannot fail, believed on an unsupported harness, silently deletes live
instructions and leaves nothing behind that reports the loss.
3. **Migrate one rule, verify it, then the rest.** Never migrate a batch on the strength of a
single probe.
4. If the repo's agents depend on inherited rules, verify subagents receive path-scoped rules
too — inheritance of scoped rules may differ from memory-file inheritance.
## What migrates — and what must stay
**Migrates well** (cross-cutting, path-keyed, no single folder home):
- Extension-keyed prohibitions ("never hand-edit `*.generated.ts` / `package-lock.json` /
`*.pb.go`") — glob on the extensions.
- Vendor-tree rules (one rule per vendor: its tree + its seam files) — often the single
largest extraction from a bloated root.
- Subsystem invariants spanning several directories (an auth layer split across sibling folders;
an API schema plus its generated clients).
**Stays in root:**
- Session-wide workflow: commit discipline, branching, session close-out, tool-usage gates —
no path subset triggers them.
- Anything that must be visible BEFORE any file is read. Scoped rules fire on *read* — a
prohibition against writing without reading first can't rely on a read-triggered load.
(Fine when a blocking hook is the real mechanism and the rule text is reinforcement.)
- Highest-stakes corrections and retractions: content with `paths:` is not automatically
re-injected after compaction; the root memory file is. Keep what must survive compaction there.
- Anything a nested folder memory file already covers — don't double-home it.
## Anti-patterns to find
1. Root blocks that are pure path-territory (a folder's file-type rules living at root).
2. A rules/ dir already present but unscoped — every rule unconditional, no `paths:` at all.
3. Globs that miss: bracket patterns unescaped, brace expansions past the harness budget,
patterns matching nothing (test each glob against `git ls-files`).
4. Prohibition-style rules scoped to paths with no backing hook (the read-trigger gap above).
## Migration procedure
Per candidate block: extract to `.claude/rules/<topic>.md` with the tightest `paths:` list
that covers its territory; replace the root block with nothing (or a one-line pointer if other
text references it); verify each glob matches the intended files and only those; run the smoke
probe on one migrated rule; measure root size before and after.
## Bounds
- Scope: the root memory file and `.claude/rules/`. Nested per-folder memory files are out of scope — they already lazy-load, and double-homing their content is a defect this pass would be creating.
- Cap: 15 migration candidates, ranked by bytes moved out of the always-loaded path.
- Done when support has been verified by the probe, one rule has been migrated and re-verified, and the remaining candidate blocks are listed. Migrating everything that *could* move is not the goal.
- Quote once, at read time; mark anything you cannot re-confirm `UNVERIFIED` rather than re-reading to check yourself.
- See `skills/opus-pocus/references/casting-safety.md` for the full rules.
## Report format
The migration table: block · destination file · `paths:` globs · stays-in-root? with reason.
Support-verification results first (version, probe result, subagent check). Root size delta.
`SCANNED NOTHING` if there is no root memory file, grading `N/A` — and if the probe did not come
back with the exact token, that is `?` (could not verify), never `O`.
Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.
No comments yet. Be the first to comment!