scope-rules

scope-rules is a skill for Claude Code from avanturer/claude-bestpractice. It costs 53 tokens per session (1,334 once invoked), scanned A, original, MIT.

A workflow for moving coding instruction files closer to the files they govern. It distinguishes rules needed in every session from rules needed only when certain paths or file types are being changed.

In plain words
What is it for?
Use it to review CLAUDE.md and other rule files, plan their scope, move them safely in a branch and worktree, and verify the result.
Why use it?
It reduces unrelated instructions loaded into every coding session and helps prevent rules from being missed or applied in the wrong scope. It also checks that the remaining rules still load.

Skill for Claude Code

Written for Claude Code: disable-model-invocation in frontmatter. Also seen: reads .claude/ paths; mentions CLAUDE.md; mentions Claude Code.

Part of the bestpractice plugin — 3 skills, 3 commands, 2 agents, 10 hooks, 2 MCP servers shipped together

Good fit Use it to review CLAUDE.md and other rule files, plan their scope, move them safely in a branch and worktree, and verify the result.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/avanturer/claude-bestpractice/scope-rules
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add avanturer/claude-bestpractice --skill scope-rules
Clone the repo
git clone --depth 1 https://github.com/avanturer/claude-bestpractice

Made for: Claude Code.

Or install bestpractice, the plugin that ships this one along with the rest of its 3 skills, 3 commands, 2 agents, 10 hooks, 2 MCP servers.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for scope-rules

README.md
[![agentmods](https://agentmods.dev/badge/skills/avanturer/claude-bestpractice/scope-rules/github.svg)](https://agentmods.dev/skills/avanturer/claude-bestpractice/scope-rules)
Your own site
<a href="https://agentmods.dev/skills/avanturer/claude-bestpractice/scope-rules"><img src="https://agentmods.dev/badge/skills/avanturer/claude-bestpractice/scope-rules/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for scope-rules

Your own site · 80×15
<a href="https://agentmods.dev/skills/avanturer/claude-bestpractice/scope-rules"><img src="https://agentmods.dev/badge/skills/avanturer/claude-bestpractice/scope-rules.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 53 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,334 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00053 $0.01334
Opus 5.5 $0.00021 $0.00534
Sonnet 5.5 $0.00011 $0.00267
Haiku 4.5 $0.00005 $0.00133

Measured yesterday against content hash b8a554c40701, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

scope-rules scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugin/skills/scope-rules/SKILL.md · 103 lines

How it starts

The opening of the file, as written. The whole thing — 103 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Scope the instruction layer

The founder asked for this by running it: that ask is the consent decision 0114 requires before their instruction files are touched. Nothing else in this plugin rewrites them.

What is being fixed. CLAUDE.md and every rule without paths: load into every turn of every session. A rule that only matters beside some files (design beside screens, releasing beside the store config) costs the same in a backend session as in a UI one, and every rule loaded at once is followed less. A rule with paths: loads when a session reads, writes or edits a matching file; this plugin's gate (decision 0113) asks for it before a new file or a command it governs.

0. Baseline

  1. A card for this on the ledger, then a branch and a worktree, as for any change.
  2. BASE=$(git rev-parse HEAD), and keep it: every later check is against it.
  3. claude-bp rules. Note the always-on total and the files largest first. Fix every PROBLEM it lists that is not about to be moved anyway, and say what it was.

1. Plan, before writing

For each always-on file, and for each section of the large ones (##/###), decide one of. Past 8,000 tokens claude-bp rules lists the largest sections of the largest files with their tokens: start from the top of that list, where one decision moves the most.

  • stays — needed before any file is opened, in every session, or must survive compaction: prohibitions (secrets, production, pushes), how work is done (worktrees, PR flow, parallel sessions), how to search, how memory is used.
  • scoped — about one area of the code: paths: naming that area's files, from where the rule's own text points and from git log --format= --name-only of the commits that changed the rule. Prefer a directory glob (mobile/**) to a list of files.
  • command — about an act on no file (a release, a deploy, SQL on production): paths: for the files it does have, plus commands: with regular expressions of those commands (make mobile-ota, eas (build|submit), ssh .*prod). Claude Code ignores commands:; this plugin asks for the rule before such a command.
  • skill — a long procedure read only while doing it (deploy steps, a release checklist): .claude/skills/<name>/SKILL.md, with a description that says when.

Read the full file on GitHub · 103 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday Changed · +2 lines b8a554c40701
  2. 6d ago First seen · 101 lines · 53 tokens per session scan A a28851c19c53

Subscribe to this mod's changes

scope-rules is a skill published in the GitHub repository avanturer/claude-bestpractice (2 stars, last pushed yesterday), licensed MIT. It adds 53 tokens to every session and 1,334 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-11-24.

Related

scope-rules compared with skills from other repositories

scope-rules next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
scope-rulesavanturer/claude-bestpracticeSkill2yesterdayMITA53Claude Code
request-progressthedotmack/claude-memSkill121ktodayApache-2.0A97Claude Code
handoffthedotmack/claude-memSkill121ktodayApache-2.0A66Claude Code
smart-exploreFlorianBruniaux/claude-code-ultimate-guideSkill7.5kyesterdayCC-BY-SA-4.0A75Claude Code
rtk-optimizerFlorianBruniaux/claude-code-ultimate-guideSkill7.5kyesterdayCC-BY-SA-4.0A44Claude Code
session-saveFlorianBruniaux/claude-code-ultimate-guideSkill7.5kyesterdayCC-BY-SA-4.0A31Claude Code
handoff-createFlorianBruniaux/claude-code-ultimate-guideSkill7.5kyesterdayCC-BY-SA-4.0A53Claude Code