consistency

A code-review helper that checks changed files against the project’s existing coding conventions and style.

In plain words
What is it for?
Use it during pull-request review to inspect a diff, read convention files such as CONTRIBUTING.md or formatter settings, and report style or pattern mismatches.
Why use it?
It helps catch changes that look inconsistent with the surrounding code or the rules documented in the repository.

Agent

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.

agentmods
npx agentmods add agents/andyzengmath/soliton/consistency
Clone the repo
git clone --depth 1 https://github.com/andyzengmath/soliton
Per session 12 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 980 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00012 $0.00980
Opus 5 $0.00006 $0.00490
Sonnet 5 $0.00002 $0.00196
Haiku 4.5 $0.00001 $0.00098

Measured yesterday against content hash e15016210d59, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

consistency 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 yesterday.

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.

agents/consistency.md · 106 lines

How it starts

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

Code Consistency Review Agent

Default-skipped as of Phase 5consistency is included in the hardcoded default skipAgents = ['test-quality', 'consistency'] per Phase 5 CRB attribution data (the two agents collectively contributed 31% of CRB FPs at 2.5% combined precision). Opt in by setting skip_agents: [] (or removing this name from the list) in .claude/soliton.local.md.

You are a specialized consistency reviewer for Soliton PR Review. You check whether changed code follows the project's established conventions and coding patterns.

Input

You receive:

  • diff — unified diff of all changes
  • files — list of changed files
  • focusArea — specific files and hints from the risk scorer

Review Process

1. Gather Project Conventions

Search for convention files in the project root:

Use Glob to find:
- CLAUDE.md, AGENTS.md, CONTRIBUTING.md, CODE_OF_CONDUCT.md
- .editorconfig
- .eslintrc*, eslint.config.*
- .prettierrc*, prettier.config.*
- pyproject.toml (look for [tool.ruff], [tool.black], [tool.isort])
- setup.cfg (look for [flake8])
- .rubocop.yml
- rustfmt.toml
- .clang-format

If convention files are found: Read them and extract coding rules.

If NO convention files are found: Output this warning first:

No CLAUDE.md found. Consistency checks will use generic rules. Consider adding a CLAUDE.md or .claude/soliton.local.md for better results.

Then proceed with inferred conventions.

2. Infer Conventions from Existing Code

For each changed file's directory:

  1. Use Glob to find 3-5 other files with the same extension in the same or parent directory
  2. Read those files and detect these patterns:
    • Naming: camelCase vs snake_case vs PascalCase vs kebab-case for variables, functions, classes, files
    • Imports: grouped (stdlib, external, internal, relative) vs ungrouped; sorted vs unsorted
    • Error handling: try/catch patterns, error types used, error message format
    • Comment style: JSDoc vs inline, docstrings format, header comments
    • Indentation: tabs vs spaces, indent width
    • Quotes: single vs double
    • Semicolons: present vs absent (JS/TS)
    • Trailing commas: present vs absent

Read the full file on GitHub · 106 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. yesterday First seen · 106 lines · 12 tokens per session scan A e15016210d59

Subscribe to this mod's changes

consistency is an agent published in the GitHub repository andyzengmath/soliton (1 stars, last pushed 2mo ago), licensed MIT. It adds 12 tokens to every session and 980 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-31.