update-rules

update-rules is a command for Claude Code from neuromechanist/research-skills. It costs 16 tokens per session (898 once invoked), scanned A, original, BSD-3-Clause.

A command for comparing and updating project instruction files such as AGENTS.md, CLAUDE.md, and .rules/ from newer templates.

In plain words
What is it for?
Use it when a project’s agent instructions or rule files need to be checked against the latest templates and updated.
Why use it?
It keeps shared coding rules current while preserving custom changes. It also separates project-wide updates from user-level setup.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions CLAUDE.md; mentions AGENTS.md.

Part of the project plugin — 15 skills, 5 commands, 3 agents shipped together

Good fit Use it when a project’s agent instructions or rule files need to be checked against the latest templates and updated.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/neuromechanist/research-skills/update-rules
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.

Clone the repo
git clone --depth 1 https://github.com/neuromechanist/research-skills

Made for: Claude Code.

Or install project, the plugin that ships this one along with the rest of its 15 skills, 5 commands, 3 agents.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/commands/neuromechanist/research-skills/update-rules"><img src="https://agentmods.dev/badge/commands/neuromechanist/research-skills/update-rules.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 16 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 898 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.00016 $0.00898
Opus 5 $0.00008 $0.00449
Sonnet 5 $0.00003 $0.00180
Haiku 4.5 $0.00002 $0.00090

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

Security

Grade A, and why

update-rules 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 11d 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/project/commands/update-rules.md · 91 lines

How it starts

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

Update Rules and Configuration

Update existing AGENTS.md/CLAUDE.md and .rules/ files from the latest plugin templates without overwriting user customizations. Load the project:update-rules skill for the full comparison strategy and non-destructive guarantees.

Setup Process:

1. Parse Arguments

Determine the level from $ARGUMENTS:

  • user -> load project:install-user-instructions, ask which supported systems to configure, and follow that skill instead of this command
  • project -> update ./AGENTS.md + Claude adapter ./CLAUDE.md + .rules/

If $ARGUMENTS is empty or not one of user/project, ask the user which level to update.

2. Run Comparison

!project-diff-rules $ARGUMENTS

Run this comparison only for project. For user, do not run the legacy Claude-only comparison script; transfer control to project:install-user-instructions.

If the above command failed or the output does not contain STATUS=complete as the final line, the script terminated prematurely. Report the error to the user and stop. Do not proceed with remaining steps.

3. Analyze Results

For PROJECT level:

Missing rules (RULE_MISSING):

  • Read the first 20 lines of the missing rule file from templates to understand its purpose
  • Determine if the rule is relevant to this project (e.g., skip python.md for a JS-only project)
  • Present each missing rule with a brief description and ask which to add

Changed rules (RULE_CHANGED):

  • For each changed rule, show a unified diff: !diff --unified "$(project-templates-path)/claude/rules/" ".rules/"
  • Analyze: are the differences template improvements or user customizations?
  • Present options: (a) accept template version, (b) merge specific changes, (c) skip

Current rules (RULE_CURRENT):

  • Report as up to date (no action needed)

Custom rules (RULE_CUSTOM):

  • Report as user-created (preserved, no action needed)

AGENTS.md section comparison:

  • Read template AGENTS.md and the project AGENTS.md in full
  • Compare H2 sections: identify sections in template missing from project
  • For matching sections, compare content for improvements
  • Respect project-specific content (replaced placeholders, architecture maps, custom guidelines)
  • If the project only has CLAUDE.md, offer to migrate shared content into AGENTS.md and replace CLAUDE.md with the @AGENTS.md adapter plus Claude-only additions

Read the full file on GitHub · 91 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. 11d ago First seen · 91 lines · 16 tokens per session scan A 23499be799df

Subscribe to this mod's changes

update-rules is a command published in the GitHub repository neuromechanist/research-skills (45 stars, last pushed 8d ago), licensed BSD-3-Clause. It adds 16 tokens to every session and 898 once invoked, about $0.0001 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-30.