# Rule Calibrate

> Dry-run your CLAUDE.md rules against your recent commits and see which are noisy, vague or never fire, before you enforce them.

Rule Calibrate is a free AI agent skill on Agensi by Ruchit Das, in Code Quality & Review. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: Free
- Creator: [Ruchit Das](https://www.agensi.io/creators/ruchit-das)
- Category: [Code Quality & Review](https://www.agensi.io/skills/code-quality-review)
- Uses: 2
- Version: 1.0
- Last updated: 2026-10-09
- Security: scan passed (2026-10-09); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/rule-calibrate
- Tags: code-review, git, python, llm-ops, prompt-engineering

## About this skill

Hey! Before you let any tool block your edits for breaking a project rule, find out which of your rules are actually any good.

This skill is a dry run for your rulebook. It takes the "never / always / must" bullets from your `CLAUDE.md` (or `AGENTS.md`), replays your recent commits against each one, and tells you how often every rule would have fired.

### What you get

One line per rule: `fired/hunks  median  max  verdict  rule`, with a verdict:

- **noisy**: fires on 60% or more of real changes. Reword or narrow it before you enforce it.
- **weak**: never decisive. Make the rule concrete.
- **quiet**: never came close to firing. Either the code follows it, or the rule is too vague to notice.
- **decisive**: separates violations from clean changes.
- **skipped**: fewer than 5 changes could be judged.

### What it reads

- **Rules:** imperative bullets ("never", "always", "must", "do not", "avoid") from `CLAUDE.md`, `AGENTS.md` and `.claude/rules/*.md` in the folder you run it from. Up to 20 rules. Prose paragraphs are ignored, and `~/.claude/CLAUDE.md` is never read.
- **Changes:** the diffs of your last N non-merge commits, code files only (docs, JSON, lock files and images are skipped, as are secret-looking file names), each capped at 8,000 characters.

### Your code leaves your machine

This one needs a model, and every judged change is sent to it. That is up to 8,000 characters of a real commit diff each, to `api.codiv.ai` (free Codiv OpenJev key in `OPENJEV_API_KEY`) or to a loopback address for a local model set up with `jev-tools-setup`. Secret-shaped strings are redacted first and the key is only ever sent to those hosts. At 20 rules, expect about 5,000 input tokens per change, so 30 changes is roughly 150,000 tokens. Don't run it on private history you aren't willing to send.

### What you need

Python 3.10+ and `git`. Standard library only, nothing to install. It cannot run offline: with no key and no local model it exits with a message.

### Honest limits

- The evidence is thin. The author replayed 20 rules over 24 real changes from one other project, and no rule fired above 0.35, so every rule read "quiet". That is what a good rulebook on clean history looks like, and also what a blind rulebook looks like. **Zero fires is not proof of a good rulebook.**
- Shallow clones have one commit. Run `git fetch --deepen=40` first.
- It appends one small line per model call (timestamp, number of questions, milliseconds, tokens, or an error type) to `~/.jev-tools/log.jsonl`, or to the path in `JEV_LOG`. Diff content and keys are never logged.

### Part of jev-tools

One of several skills from the free, MIT-licensed jev-tools project. The full plugin adds the optional rule-enforcement hook this skill helps you tune, which is not included in this listing: github.com/Rcidshacker/jev-tools

## Requires

- Python

## Known limitations

Needs Python 3.10+, git and a model (free Codiv OpenJev key or a small local model). Cannot run offline. Reads at most 20 rules (imperative bullets from CLAUDE.md, AGENTS.md or .claude/rules in the current folder) and judges code changes only. Needs at least 5 judged changes per rule for a verdict. Shallow clones have one commit, so run git fetch --deepen=40 first. Only lightly tested; zero fires is not proof of a good rulebook. Tested by the author on Windows only.

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the Rule Calibrate skill from Agensi" and describe your task.
3. Your agent loads the skill from Agensi when it needs it. Nothing is downloaded.

## Frequently asked questions

### What does Rule Calibrate do?

It reads the "never / always / must" bullets in your CLAUDE.md or AGENTS.md, asks a model whether each of your recent code changes would have broken each rule, and prints one line per rule: how many changes it fired on, the median and max score, and a verdict (decisive, noisy, weak, quiet or skipped). Use it before you turn rule enforcement on, so you know which rules are worth enforcing.

### What do the verdicts mean?

Noisy: fires on 60% or more of real changes, so reword or narrow it before enforcing. Weak: never decisive, so make the rule concrete. Quiet: never came close to firing, so either the code follows it or the rule is too vague to notice. Decisive: separates violations from clean changes. Skipped: fewer than 5 changes could be judged. A rule counts as firing at a score of 0.80 by default (JEV_THRESHOLD changes it).

### Does it need an API key, and what does it send?

It needs a model: a free Codiv OpenJev API key in OPENJEV_API_KEY, or a small local model set up with jev-tools-setup. It cannot judge changes offline. Every judged change, up to 8,000 characters of a real commit diff, is sent to api.codiv.ai (or to a loopback address for a local model). Secret-shaped strings are redacted first and secret-looking file names are skipped, but that is a safety net, not a guarantee. Don't run it on history you would not share.

### How much does a run cost?

At 20 rules, roughly 5,000 input tokens per judged change, so the default 30 changes is about 150,000 tokens. Fewer rules or fewer changes (--commits and --hunks) cost less. The Codiv free tier is large enough for many runs, but check your own dashboard, since there is no usage API.

### How reliable is it?

Treat it as a first look. The author replayed 20 rules over 24 real changes from one other project and no rule fired above 0.35, so every rule read "quiet". That is what a good rulebook on clean history looks like, and also what a blind rulebook looks like, so zero fires is not proof of a good rulebook. Check a quiet rule by hand on one commit before trusting it.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
