rulens: Command for Claude Code

.claude/commands/review-and-improve-docs.md

review-and-improve-docs is a command for Claude Code from MH4GF/rulens. It costs 0 tokens per session (292 once invoked), scanned A, original, MIT.

A review command for learning from a coding session and improving its CLAUDE.md guidance. CLAUDE.md is a project file that tells coding agents how to work in that repository.

In plain words
What is it for?
Use it to examine user interventions and rule violations, identify their causes, document solutions, and update CLAUDE.md with project-specific working practices.
Why use it?
It turns user corrections, misunderstandings, and repeated problems into clearer project instructions for future sessions.

Command for Claude Code

Written for Claude Code: installed under .claude/. Also seen: mentions CLAUDE.md.

This is MH4GF/rulens's own configuration. It tells Claude Code how to work on rulens 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 rulens configures →

Reuse

Borrowing it

Nothing to install: this file belongs to MH4GF/rulens. 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/MH4GF/rulens/main/.claude/commands/review-and-improve-docs.md
Clone the repo
git clone --depth 1 https://github.com/MH4GF/rulens

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 review-and-improve-docs

README.md
[![agentmods](https://agentmods.dev/badge/commands/mh4gf/rulens/review-and-improve-docs/github.svg)](https://agentmods.dev/commands/mh4gf/rulens/review-and-improve-docs)
Your own site
<a href="https://agentmods.dev/commands/mh4gf/rulens/review-and-improve-docs"><img src="https://agentmods.dev/badge/commands/mh4gf/rulens/review-and-improve-docs/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 review-and-improve-docs

Your own site · 80×15
<a href="https://agentmods.dev/commands/mh4gf/rulens/review-and-improve-docs"><img src="https://agentmods.dev/badge/commands/mh4gf/rulens/review-and-improve-docs.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 292 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.00000 $0.00292
Opus 5 $0.00000 $0.00146
Sonnet 5 $0.00000 $0.00058
Haiku 4.5 $0.00000 $0.00029

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

Security

Grade A, and why

review-and-improve-docs 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.

.claude/commands/review-and-improve-docs.md · 31 lines

What it actually says

Please conduct a detailed review of the work session, focusing particularly on the interaction patterns with the user, and improve the CLAUDE.md document.

Focus your analysis on the following points:

  1. User Intervention Pattern Identification

    • Locations where the user provided correction instructions and their reasons
    • Specific situations where the user intervened with phrases like 'wait' or 'that's not right' during code generation
    • Instances where project rules or coding conventions were violated
  2. Learning from Behavioral Constraints and Redirections

    • Constraints set by the user and the intentions behind them
    • Parts of the initial implementation approach that were changed by the user
    • Project-specific rules and patterns that must be adhered to
  3. Meta-Analysis for Improvement

    • Patterns in areas where the user repeatedly intervened
    • Root causes of misunderstandings or incorrect assumptions
    • Additional information needed to deepen understanding of the project

Based on the above analysis, enhance CLAUDE.md in the following ways:

  • Clear documentation of challenges faced and their solutions
  • Detailed explanation of project-specific rules and how to apply them
  • Guidelines to reduce miscommunication in future sessions
  • Notes on precautions during code generation and verification methods
  • Improvement points from an engineering perspective with specific implementation advice

Please ensure the document is practical and aligned with the engineer's workflow and expectations, with emphasis on concrete measures to prevent the same issues from recurring.

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 · 31 lines · 0 tokens per session scan A eebf518ad599

Subscribe to this mod's changes

review-and-improve-docs is a command published in the GitHub repository MH4GF/rulens (11 stars, last pushed 1y ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 292 tokens. 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.