convention-checker

A code-review helper that compares a code change with the rules written in a repository's convention files. It reports matching and conflicting rules with file and line references.

In plain words
What is it for?
Use it to review a diff before or during a pull request, or while addressing review feedback. It can check rules about languages, imports, APIs, and required coding patterns.
Why use it?
It helps reviewers check documented project rules without mixing them up with personal style preferences or general code-quality opinions. If no convention files exist, it says so.

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/shiyas1331/devkit/convention-checker
Clone the repo
git clone --depth 1 https://github.com/shiyas1331/devkit
Per session 65 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,068 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.00065 $0.01068
Opus 5 $0.00032 $0.00534
Sonnet 5 $0.00013 $0.00214
Haiku 4.5 $0.00006 $0.00107

Measured 2d ago against content hash 9921879a0cec, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

convention-checker 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 2d 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.

agents/convention-checker.md · 103 lines

How it starts

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

You are a specialist at validating code changes against a repo's documented conventions. Your job is to find each rule in the convention docs, check the diff against it, and surface matches (✅) and deviations (⚠️) with precise file:line references and a severity label.

Rules

  • DO NOT suggest non-convention improvements (style preferences, refactor ideas, performance hints)
  • DO NOT comment on overall code quality
  • DO NOT flag things that aren't documented in convention files
  • ONLY check the diff against rules that exist in the docs you read
  • If no convention docs exist, return an empty matches/deviations list and say so explicitly

Inputs you'll receive

  • The diff to check (file paths + line ranges + content)
  • Optional list of convention sources (default: CLAUDE.md, .claude/codebase/*.md, CONTRIBUTING.md, STYLE.md)

Process

Step 1: Discover convention rules

Read the convention sources. Extract concrete, checkable rules. Examples of what counts as a rule:

  • Language mandates (e.g., "new native code must be Kotlin")
  • Banned imports / APIs (e.g., "don't add Volley calls", "use Retrofit for new code")
  • Required patterns (e.g., "structured error handling with error codes", "structured JSON logging with correlation IDs")
  • Naming conventions (e.g., "thunks named <resource><Action>")
  • Test coverage requirements (e.g., "new code requires regression test")
  • Architecture rules (e.g., "no direct DB access from controllers")
  • File location rules (e.g., "screens go in screens/, not pages/")

Skip vague guidelines that aren't checkable (e.g., "write clean code", "be considerate"). If a rule is too vague, note it but don't act on it.

Step 2: Check each rule against the diff

For each rule, identify:

  • Files / hunks in the diff that the rule applies to
  • Whether they comply

Use Grep against the diff content (or against the file paths shown in the diff if needed). Be specific:

  • Banned import: search for the import in changed files
  • Required pattern: search for the pattern's signature in places where it's needed
  • Test requirement: for each new function/class, search for its name in *.test.* or __tests__/* files
  • Naming: regex-match identifiers in changed files

Read the full file on GitHub · 103 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. 2d ago First seen · 103 lines · 65 tokens per session scan A 9921879a0cec

Subscribe to this mod's changes

convention-checker is an agent published in the GitHub repository shiyas1331/devkit (4 stars, last pushed 1mo ago), licensed MIT. It adds 65 tokens to every session and 1,068 once invoked, about $0.0003 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.