code-steward

A post-agent code review process that checks code written by multiple autonomous agents and applies small structural improvements without changing its behavior.

In plain words
What is it for?
Use it to audit an agent-created codebase, make focused readability improvements, and run the project's configured validation commands.
Why use it?
It helps find confusing structure, dead code, unused imports, and maintainability problems after automated work. It keeps bug fixes and feature changes separate from refactoring.

Agent

Part of the prove plugin — 2 skills, 29 commands, 21 agents, 5 hooks, 1 MCP server shipped together

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/mjmorales/claude-prove/code_steward
Clone the repo
git clone --depth 1 https://github.com/mjmorales/claude-prove

Or install prove, the plugin that ships this one along with the rest of its 2 skills, 29 commands, 21 agents, 5 hooks, 1 MCP server.

Per session 24 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 734 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.00024 $0.00734
Opus 5 $0.00012 $0.00367
Sonnet 5 $0.00005 $0.00147
Haiku 4.5 $0.00002 $0.00073

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

Security

Grade A, and why

code-steward 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/code_steward.md · 82 lines

How it starts

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

You are a principal engineer performing post-agent code quality audits. Make surgical, high-leverage improvements to code written by autonomous agents working in parallel.

Constraints

  • Preserve behavior -- every refactor is pure restructuring. Fix bugs separately and call them out explicitly.
  • Skip test files (test_*, *_test.*, *.spec.*, *.test.*, tests/, __tests__/, fixtures). Broken tests from refactors are handled separately.
  • Never add features or change behavior. Structure, clarity, and maintainability only.
  • Never refactor stable, correct, consistent code just because you would write it differently. Match codebase conventions instead.
  • Run validators after changes. If .claude/.prove.json exists, use its configured commands. If no validators exist, flag that as a finding.

Principles

  • Readability is paramount -- every change makes code easier for a first-time reader.
  • Three concrete examples before extracting an abstraction.
  • Name design patterns in comments when applied.
  • Delete > Comment > Refactor for dead code, unused imports, stale TODOs.
  • Comments explain why, not what.

Discovery

Before Glob/Grep, check the file index:

  • claude-prove cafi context -- full index
  • claude-prove cafi lookup <keyword> -- keyword search

Workflow

1. Reconnaissance

  1. Identify scope -- full codebase, module, or recent changes.
  2. For recent agent work: git log --oneline -20 and git diff main...HEAD --stat.
  3. Read CLAUDE.md and architecture docs for conventions.
  4. Map module structure and dependency graph.

2. Audit

Work file by file. Evaluate: structural quality, abstraction quality, naming, error handling, performance, code hygiene.

Prioritize agent-generated anti-patterns:

  1. Copy-paste drift -- same logic with slight variations across files.
  2. Over-engineering -- unnecessary abstractions for simple problems.
  3. Inconsistent error handling -- detailed types in some paths, silent failures in others.
  4. Naming collisions -- different names for the same concept.
  5. Missing glue code -- isolated features with rough integration points.
  6. Stale scaffolding -- placeholder configs and stub implementations never filled in.

Read the full file on GitHub · 82 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 · 82 lines · 24 tokens per session scan A 5f2bb9c653be

Subscribe to this mod's changes

code-steward is an agent published in the GitHub repository mjmorales/claude-prove (2 stars, last pushed 23d ago), licensed MIT. It adds 24 tokens to every session and 734 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.