manage-rules

manage-rules is a command for Claude Code from juntossomosmais/pommel. It costs 17 tokens per session (699 once invoked), scanned C, original, MIT.

A command for managing project rules, including ordinary rules and rules that activate only under certain conditions. It covers how to design triggers, add citations, and run a basic check.

In plain words
What is it for?
Use it to create or update Claude Code memory files, conditional rule files, activation criteria, triggers, and rule checks.
Why use it?
It helps keep developer instructions focused, enforceable, and applied in the right situations. It first determines which rule format is being managed before making changes.

Command for Claude Code

Written for Claude Code: ${CLAUDE_PLUGIN_ROOT} variable. Also seen: mentions CLAUDE.md; mentions subagents; mentions Claude Code.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the conditional-rules-plugin plugin — 1 command, 3 hooks shipped together

Good fit Use it to create or update Claude Code memory files, conditional rule files, activation criteria, triggers, and rule checks.

Compare 6 commands from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add juntossomosmais/pommel
Claude Code
/plugin install conditional-rules-plugin

Made for: Claude Code.

Or install conditional-rules-plugin, the plugin that ships this one along with the rest of its 1 command, 3 hooks.

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

README.md
[![agentmods](https://agentmods.dev/badge/commands/juntossomosmais/pommel/manage-rules.svg)](https://agentmods.dev/commands/juntossomosmais/pommel/manage-rules)
Your own site
<a href="https://agentmods.dev/commands/juntossomosmais/pommel/manage-rules"><img src="https://agentmods.dev/badge/commands/juntossomosmais/pommel/manage-rules.svg" alt="Measured on agentmods" height="20"></a>
Per session 17 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 699 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 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.00017 $0.00699
Opus 5 $0.00009 $0.00349
Sonnet 5 $0.00003 $0.00140
Haiku 4.5 $0.00002 $0.00070

Measured 8d ago against content hash 1e9a3c2dd139, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade C, and why

manage-rules scanned grade C 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 8d 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.

Downloads and executes remote codehighSupply chain

curl | sh runs whatever the server returns today, which is not necessarily what it returned when this was reviewed.

curl -s https://api.github.com/repos/<owner>/<repo>/releases/latest | python3 -c "import sys, json; print(json.load(sys.stdin)['tag_name'])"

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -s https://api.github.com/repos/<owner>/<repo>/releases/latest | python3 -c "import sys, json; print(json.load(sys.stdin)['tag_name'])"
plugins/conditional-rules-plugin/commands/manage-rules.md · 50 lines

How it starts

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

Rules

Classify first, then edit

Conventional (native Claude Code memory) — skip the conditional docs entirely and edit the file:

  • the target is any CLAUDE.md, or any path under .claude/rules/
  • the user says "conventional"

Conditional — read ${CLAUDE_PLUGIN_ROOT}/hooks/conditional_rules/CONDITIONAL_RULES.md for predicate / combinator / event mechanics before writing. Not found: ask the user where it lives. Project-level conditional rules live in .claude/conditional_rules/rules.json (always applied for that repo; activation_criteria is ignored there); plugin rule packs keep theirs in rules/rules.json.

Neither is stated and no path gives it away — ask which. For conventional, the claude-code-guide subagent (if available) covers best practices.

Writing a rule

  • A rule must state things as imperative (describe what the developer should do) and not as descriptive (describe what the code does).
  • Rules should be concise and focused on specific conditions or patterns to enforce.
  • Rules should be easily understandable and maintainable by developers.
  • Rules should be designed to prevent common mistakes and ensure code quality.
  • Rules should be short—very short—and as pragmatic as possible.
  • Rules should not reference other rules because they are loaded progressively.
  • When a rule content requires an external link, prefer GitHub repositories links.

/blob/main/... links rot silently. Pin to a stable ref:

  • Semver tags/blob/<vX.Y.Z>/path. Find latest:
    curl -s https://api.github.com/repos/<owner>/<repo>/releases/latest | python3 -c "import sys, json; print(json.load(sys.stdin)['tag_name'])"
    
  • Date tags (e.g. opentelemetry.io) → /blob/<YYYY.MM>/path. Find latest:
    curl -s 'https://api.github.com/repos/<owner>/<repo>/tags?per_page=5' | python3 -c "import sys, json; print([t['name'] for t in json.load(sys.stdin)])"
    
  • Neither → commit SHA. Find latest for a specific file:
    curl -s 'https://api.github.com/repos/<owner>/<repo>/commits?path=<filepath>&per_page=1' | python3 -c "import sys, json; print(json.load(sys.stdin)[0]['sha'])"
    

Read the full file on GitHub · 50 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. 8d ago First seen · 50 lines · 17 tokens per session scan C 1e9a3c2dd139

Subscribe to this mod's changes

manage-rules is a command published in the GitHub repository juntossomosmais/pommel (5 stars, last pushed 20d ago), licensed MIT. It adds 17 tokens to every session and 699 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it C with 2 findings (downloads and executes remote code, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.