rules-stocktake

rules-stocktake is a skill for Claude Code from shimo4228/claude-harness. It costs 185 tokens per session (3,773 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.

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 185 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,773 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 2 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.00185 $0.03773
Opus 5 $0.00093 $0.01886
Sonnet 5 $0.00037 $0.00755
Haiku 4.5 $0.00018 $0.00377

Measured 4d ago against content hash 071d3453f9e6, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

rules-stocktake scanned grade A with 2 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 4d ago.

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.

Reads agent configuration directorieslowAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

find ~/.claude/rules -name "*.md" -newermt "$(jq -r .evaluated_at ~/.claude/skills/rules-stocktake/results.json)"

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

Enumerates other installed skillslowAgent snooping

Other skills' SKILL.md files reveal prompts, capabilities and secrets that should be invisible to peers.

find ~/.claude/rules -name "*.md" -newermt "$(jq -r .evaluated_at ~/.claude/skills/rules-stocktake/results.json)"

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

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

How it starts

The opening of the file, as written. The whole thing — 236 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 ~/.claude/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-creator's counterpart doesn't exist), and rule files average ~60 lines — delegation would be overengineering. The handoff exception is Demote (creating a new skill is skill-creator's job).

Modes ($ARGUMENTS)

Argument Behavior
none / full Read and evaluate every rule (default)
changed Re-evaluate only rules whose mtime is newer than results.json's evaluated_at; carry the rest forward from the ledger

changed detects changes inline (no script):

find ~/.claude/rules -name "*.md" -newermt "$(jq -r .evaluated_at ~/.claude/skills/rules-stocktake/results.json)"

Correction that keeps changed mode honest: cross-reference breakage is invisible to rule mtimes — retiring a skill silently breaks a See skill: pointer in an unmodified rule. So the Phase 1 integrity checks always run over the full set (they are grep, seconds of work), and any rule with a newly broken reference is promoted into the re-evaluation set even if its mtime is old.

Read the full file on GitHub · 236 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. 4d ago Changed · -2 lines 071d3453f9e6
  2. 9d ago First seen · 238 lines · 185 tokens per session scan A 10b3b3358b7a

Subscribe to this mod's changes

rules-stocktake is a skill published in the GitHub repository shimo4228/claude-harness (2 stars, last pushed 3d ago), licensed MIT. It adds 185 tokens to every session and 3,773 once invoked, about $0.0009 per session on Opus 5. A static security scan graded it A with 2 findings (reads agent configuration directories, enumerates other installed skills). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

agent-adoption-triage

Five-question triage for routing AI work to the right architecture — script, algorithmic search, LLM workflow, or autonomous agentic loop — before any agent is built. Use when someone says "let's build an agent for X", when deciding whether a use case actually needs an autonomous agent, when reviewing an agent…

shimo4228/agent-adoption-triage · 143 tokens

job-description-skill

A job-description analysis skill that turns a vacancy listing and a candidate’s background into an HTML report about fit, gaps, interview topics, and application strategy.

yanliudesign/offer-toolkit-skill · 150 tokens

offer-compare-skill

A decision assistant for comparing two or more job offers across pay, growth, company strength, team risk, promotion, AI exposure, and lifestyle. Total compensation means the combined value of salary, bonuses, shares, and sign-on payments.

yanliudesign/offer-toolkit-skill · 231 tokens

offer-toolkit-skill

A set of job-search tools covering the path from finding a vacancy to accepting an offer. It includes separate tools for job searches, job-description analysis, tailored resumes, behavioral interviews, offer comparisons, and salary negotiation.

yanliudesign/offer-toolkit-skill · 168 tokens

bq-skill

A coaching workflow for building a reusable library of truthful stories for behavioral job interviews. It uses structures such as STAR—Situation, Task, Action, Result—and can connect stories to a job description and résumé.

yanliudesign/offer-toolkit-skill · 166 tokens

linkedin-job-search-skill

A job-search assistant that uses a sample job description and your resume to find and rank similar public LinkedIn Jobs listings. LinkedIn Jobs is LinkedIn’s section for advertised employment positions.

yanliudesign/offer-toolkit-skill · 136 tokens