rule

rule is a skill for Claude Code from guerlain-hitier/claude-warden. It costs 101 tokens per session (2,039 once invoked), scanned A, original, MIT.

A rule-writing assistant for turning ongoing preferences into instructions stored in CLAUDE.md, a file that tells Claude how to work in a project or across projects. It decides whether a rule should apply globally or only to one project.

In plain words
What is it for?
Adding, clarifying, sizing, and placing standing instructions such as always running tests before committing or formatting comments a certain way.
Why use it?
It prevents one-off requests from becoming permanent rules and keeps instructions correctly scoped and within a size limit. Strong rules can also be routed to a hook, an automatic action that runs at a defined time.

Skill for Claude Code

Written for Claude Code: $ARGUMENTS substitution. Also seen: reads .claude/ paths; mentions CLAUDE.md.

Part of the warden plugin — 1 skill shipped together

Good fit Adding, clarifying, sizing, and placing standing instructions such as always running tests before committing or formatting comments a certain way.

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

Made for: Claude Code.

Or install warden, the plugin that ships this one along with the rest of its 1 skill.

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 rule

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/guerlain-hitier/claude-warden/rule"><img src="https://agentmods.dev/badge/skills/guerlain-hitier/claude-warden/rule.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 101 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,039 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.00101 $0.02039
Opus 5 $0.00051 $0.01019
Sonnet 5 $0.00020 $0.00408
Haiku 4.5 $0.00010 $0.00204

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

Security

Grade A, and why

rule 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 10d 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.

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.

plugins/warden/skills/rule/SKILL.md · 185 lines

How it starts

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

Warden

You maintain CLAUDE.md and rules files. Your job is to turn a stated preference into a correctly-scoped, well-formed, appropriately-sized rule, never to write first and ask later.

When this fires

  • Passive: the user states a preference, correction, or standing instruction in normal conversation: "I want X done a certain way", "stop doing Y", "from now on always/never Z", "make sure you always...".
  • Explicit: the user runs /warden:rule <text>. Same protocol, just skip the passive-detection step.

Do not fire on a one-off request that isn't a standing preference ("fix this bug" is not a rule; "always run tests before committing" is).

Arguments

$ARGUMENTS

If that is empty, ask what rule they want to add. If it begins with --hard, strip the flag from the rule text and treat Step 3 as already decided in favour of a hard rule; still confirm placement and the line cap before writing.

Step 1: Understand the request

If the request is already unambiguous, narrow, and self-contained, skip to Step 2. Otherwise ask ONE clarifying question at a time (never a batch). Good questions to reach for, in rough order:

  1. Scope of the rule: does this apply everywhere, or only to a particular language/file type/situation?
  2. Exceptions: is there a case where the opposite is correct?
  3. The "why": if the user gives a reason, capture it; it's what lets a future reader judge edge cases the rule text doesn't cover.

When a request is genuinely ambiguous between two readings, don't guess. Offer a concrete example pair and let the user pick:

"So like this: // why: retried because upstream flakes, not like this: // increments the counter? Or did you mean something else?"

Keep asking until you could write the rule down and a stranger would implement it the same way you would. Then stop asking. Don't pad the exchange with confirmatory questions once it's actually unambiguous.

Step 2: Decide scope: global vs project

Default: the current project. Most rule requests mid-session are about this codebase, not a durable personal preference.

Read the full file on GitHub · 185 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. 10d ago First seen · 185 lines · 101 tokens per session scan A 59e0ac4a7c3e

Subscribe to this mod's changes

rule is a skill published in the GitHub repository guerlain-hitier/claude-warden (1 stars, last pushed 1mo ago), licensed MIT. It adds 101 tokens to every session and 2,039 once invoked, about $0.0005 per session on Opus 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.