rules-stocktake

rules-stocktake is a skill for Claude Code from shimo4228/claude-harness. It costs 57 tokens per session (3,557 once invoked), scanned A, original, MIT.

A review process for auditing always-loaded Claude rule files and deciding whether each one should stay, change, move, combine, or be removed.

In plain words
What is it for?
Inspect files under ~/.claude/rules, check their usefulness and references, and assign a Keep, Improve, Update, Merge, Demote, Dissolve, or Retire decision.
Why use it?
Rules are read in every session, so outdated, repeated, or misplaced instructions add ongoing context cost and can dilute more useful guidance.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter. Also seen: reads .claude/ paths; mentions CLAUDE.md; mentions Claude Code.

Good fit Inspect files under ~/.claude/rules, check their usefulness and references, and assign a Keep, Improve, Update, Merge, Demote, Dissolve, or Retire decision.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/shimo4228/claude-harness/rules-stocktake
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 shimo4228/claude-harness --skill rules-stocktake
Clone the repo
git clone --depth 1 https://github.com/shimo4228/claude-harness

Made for: Claude Code.

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 rules-stocktake

README.md
[![agentmods](https://agentmods.dev/badge/skills/shimo4228/claude-harness/rules-stocktake/github.svg)](https://agentmods.dev/skills/shimo4228/claude-harness/rules-stocktake)
Your own site
<a href="https://agentmods.dev/skills/shimo4228/claude-harness/rules-stocktake"><img src="https://agentmods.dev/badge/skills/shimo4228/claude-harness/rules-stocktake/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 rules-stocktake

Your own site · 80×15
<a href="https://agentmods.dev/skills/shimo4228/claude-harness/rules-stocktake"><img src="https://agentmods.dev/badge/skills/shimo4228/claude-harness/rules-stocktake.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 57 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,557 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.00057 $0.03557
Opus 5.5 $0.00023 $0.01423
Sonnet 5.5 $0.00011 $0.00711
Haiku 4.5 $0.00006 $0.00356

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

Security

Grade A, and why

rules-stocktake 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 16d ago.

The scan reads SKILL.md. This mod also ships 3 executable files (scripts/__init__.py, scripts/transfer_probe.py, tests/test_transfer_probe.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

skills/rules-stocktake/SKILL.md · 240 lines

How it starts

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

rules-stocktake — Rules Quality Audit

Evaluate every rule file under <harness>/rules/ holistically, all in one context, and assign each a verdict: Keep / Improve / Update / Merge / Demote to skill / Dissolve / Retire. The audit unit is the file; the cost unit is the line — rules load into every session unconditionally, so each line is a per-session token tax plus instruction dilution.

Design note: this is skill-stocktake's sibling with the cost model inverted. A skill's cost is trigger pollution (it fires probabilistically and degrades selection); a rule's cost is residency (it loads always, whether or not it changes behavior). So there is no usage axis — nothing measures "rule invocations", and the concept doesn't apply to unconditional loading. The replacements are static: residency density (is each line worth reading every session?) and substrate absorption (does the harness or the conversation already do this without the rule?).

Design note 2: unlike skill-stocktake, this skill does apply approved Improve/Update/ Merge edits itself instead of handing off. There is no improvement-engine skill for rules (skill-writer's counterpart doesn't exist), and rule files are short — delegation would be overengineering. The handoff exception is Demote (creating a new skill is skill-writer's job).

Roots. <harness> below is the harness this audit covers: ~/.claude by default, or a repository's .claude/ when skill harness-stocktake runs in project mode (its Roots section maps the paths, names the evidence that is n/a there, and says which convention checks apply). The ledger <ledger> belongs to that harness: ${CLAUDE_SKILL_DIR}/results.json when this skill's directory is inside <harness> (the harness carries its own copy of the skill), else <harness>/stocktake/rules-stocktake.json (an installed plugin, or project mode). Either way it is committed with the harness's other changes on the apply branch.

Modes ($ARGUMENTS)

Read the full file on GitHub · 240 lines

Files

What ships with it

5 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 16d ago Changed · -3 lines d09ba24636a4
  2. 22d ago Changed 3c63771382c1
  3. 29d ago Changed · +12 lines · +18 tokens per session 8875983d7a6e
  4. 1mo ago Changed · +4 lines 8c4723ac85bf
  5. 1mo ago Changed · +2 lines 053aaaae9ecf
  6. 1mo ago Changed · -58 tokens per session 4a08be407a16
  7. 1mo ago Changed · -16 lines · -101 tokens per session 60274b9070dc
  8. 2mo ago Changed · -7 tokens per session 7e2054ae03ad
  9. 2mo ago Changed · +22 tokens per session 5dc6e4b1abb2
  10. 2mo ago First seen · 241 lines · 183 tokens per session scan A ca6fe678dd22

Subscribe to this mod's changes

rules-stocktake is a skill published in the GitHub repository shimo4228/claude-harness (4 stars, last pushed 7d ago), licensed MIT. It adds 57 tokens to every session and 3,557 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-08-31.

Related

rules-stocktake compared with skills from other repositories

rules-stocktake next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
rules-stocktakeshimo4228/claude-harnessSkill47d agoMITA57Claude Code
agent-adoption-triageshimo4228/agent-adoption-triageSkill21mo agoMITA143Claude Code
git-commitadongwanai/learn-workbuddySkill5631mo agoMITA0Claude Code, Codex
pi-triagesky-valley/piSkill94yesterdayMITA57Claude Code
pi-parity-reviewsky-valley/piSkill94yesterdayMITA54Claude Code
zodanivar/zod-skillSkill24yesterdayMITA217Claude Code, Codex
trailhead-chartToRvaLDz/trailheadSkill37yesterdayMITA138Claude Code