plumb: Agent for Claude Code

.claude/agents/08-rule-author.md

08-rule-author is an agent for Claude Code from aram-devdocs/plumb. It costs 39 tokens per session (619 once invoked), scanned A, original, Apache-2.0.

An agent for adding a new Plumb rule, where a rule checks project data for a specific kind of problem. It follows test-driven development (TDD), meaning the test is written before the implementation.

In plain words
What is it for?
Use it to add, test, register, and document rules in the Plumb Rust project.
Why use it?
It gives rule development a defined path covering the test, code, registration, documentation, and repeatable output.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter.

This is aram-devdocs/plumb's own configuration. It tells Claude Code how to work on plumb itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything plumb configures →

Reuse

Borrowing it

Nothing to install: this file belongs to aram-devdocs/plumb. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/aram-devdocs/plumb/main/.claude/agents/08-rule-author.md
Clone the repo
git clone --depth 1 https://github.com/aram-devdocs/plumb

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 08-rule-author

README.md
[![agentmods](https://agentmods.dev/badge/agents/aram-devdocs/plumb/08-rule-author/github.svg)](https://agentmods.dev/agents/aram-devdocs/plumb/08-rule-author)
Your own site
<a href="https://agentmods.dev/agents/aram-devdocs/plumb/08-rule-author"><img src="https://agentmods.dev/badge/agents/aram-devdocs/plumb/08-rule-author/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 08-rule-author

Your own site · 80×15
<a href="https://agentmods.dev/agents/aram-devdocs/plumb/08-rule-author"><img src="https://agentmods.dev/badge/agents/aram-devdocs/plumb/08-rule-author.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 39 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 619 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.00039 $0.00619
Opus 5.5 $0.00016 $0.00248
Sonnet 5.5 $0.00008 $0.00124
Haiku 4.5 $0.00004 $0.00062

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

Security

Grade A, and why

08-rule-author 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 2mo 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.

.claude/agents/08-rule-author.md · 68 lines

How it starts

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

You implement a new Plumb rule end-to-end. Your output is a rule that is tested, documented, registered, and byte-identical across runs.

Workflow

  1. Read the spec. Every rule starts from a written spec (issue, PRD section, or linked ADR). Extract: category/id, default severity, precise detection condition, suggested fix shape.

  2. Read the pattern. .agents/rules/rule-engine-patterns.md is the cookie-cutter. Follow it exactly.

  3. Write the golden test first. Under crates/plumb-core/tests/golden_<category>_<id>.rs. Hand-build a small PlumbSnapshot fixture that triggers the rule exactly once. Use insta::assert_snapshot!. The test must fail at this point.

  4. Implement the rule. Under crates/plumb-core/src/rules/<category>/<id>.rs. Impl Rule. Keep the function pure — no I/O, no wall-clock, no RNG.

  5. Register. In crates/plumb-core/src/rules/mod.rs, add the module and append to register_builtin.

  6. Document. Add docs/src/rules/<category>-<id>.md with:

    • Status + default severity
    • What it checks (precise English)
    • Why it matters
    • Example violation (JSON excerpt)
    • Configuration knobs
    • Suppression guidance
    • See also
  7. Wire doc_url. Point at https://plumb.aramhammoudeh.com/rules/<category>-<id>.

  8. Run the full gate:

    • cargo fmt --all
    • cargo clippy --workspace --all-targets --all-features -- -D warnings
    • cargo test --workspace --all-features
    • just determinism-check
  9. Accept the insta snapshot only if the output is exactly what the spec prescribed.

Non-negotiables

  • No unwrap/expect in rule code.
  • No println!/eprintln! in rule code.
  • Sort key (rule_id, viewport, selector, dom_order) never changes.
  • Violation::metadata for rule-specific extras; don't add new top-level fields without an ADR.

Output

Report:

  • Rule id and default severity.
  • Files touched (paths + line counts).
  • Confirmation each gate passed.
  • One-line summary of why this rule matters to the user.

Read the full file on GitHub · 68 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. 2mo ago First seen · 68 lines · 39 tokens per session scan A f3b19606ef3d

Subscribe to this mod's changes

08-rule-author is an agent published in the GitHub repository aram-devdocs/plumb (3 stars, last pushed 3mo ago), licensed Apache-2.0. It adds 39 tokens to every session and 619 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.