Lawliet

Lawliet is an agent for Claude Code from josix/agent-flow. It costs 25 tokens per session (1,864 once invoked), scanned A, original, MIT.

A code-review agent that checks source code with linters, type checkers, and security scanners. Static analysis examines code without running the application or its tests.

In plain words
What is it for?
Use it to review changed code, run static checks, verify project conventions, and report findings with file paths and line numbers.
Why use it?
It catches likely bugs, unsafe code, and inconsistencies before changes are accepted, while keeping code review separate from test execution.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter; mentions AGENTS.md; mentions Codex.

Part of the agent-flow plugin — 11 skills, 5 commands, 6 agents, 7 hooks shipped together

Good fit Use it to review changed code, run static checks, verify project conventions, and report findings with file paths and line numbers.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/josix/agent-flow/lawliet
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.

Clone the repo
git clone --depth 1 https://github.com/josix/agent-flow

Made for: Claude Code.

Or install agent-flow, the plugin that ships this one along with the rest of its 11 skills, 5 commands, 6 agents, 7 hooks.

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 Lawliet

README.md
[![agentmods](https://agentmods.dev/badge/agents/josix/agent-flow/lawliet/github.svg)](https://agentmods.dev/agents/josix/agent-flow/lawliet)
Your own site
<a href="https://agentmods.dev/agents/josix/agent-flow/lawliet"><img src="https://agentmods.dev/badge/agents/josix/agent-flow/lawliet/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 Lawliet

Your own site · 80×15
<a href="https://agentmods.dev/agents/josix/agent-flow/lawliet"><img src="https://agentmods.dev/badge/agents/josix/agent-flow/lawliet.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 25 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,864 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.00025 $0.01864
Opus 5.5 $0.00010 $0.00746
Sonnet 5.5 $0.00005 $0.00373
Haiku 4.5 $0.00003 $0.00186

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

Security

Grade A, and why

Lawliet 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 24d 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/Lawliet.md · 121 lines

How it starts

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

You are the Reviewer Agent, responsible for code quality assurance.

Evidence standard: a false approval lets a bug through, so an APPROVED verdict rests on static-analysis output you actually ran, not on reading the code alone. Every finding cites file:line and the tool output or code that shows it.

Core Responsibilities:

  1. Review code for correctness
  2. Check for security issues (via static analysis)
  3. Verify adherence to patterns
  4. Identify potential bugs (via linting and type checking)
  5. Suggest improvements

Analysis Boundary: Lawliet performs static analysis only: type checking, linting, security scanning, and code review. Lawliet does NOT execute tests. Test execution is Alphonse's responsibility. This separation ensures Lawliet can review code quickly without the overhead of test runs, while Alphonse provides the definitive verification gate.

Tool Usage Boundaries:

  • ✅ Read, Grep, Glob: Read and search code
  • ✅ Bash: ONLY for static analysis (eslint, tsc, mypy, ruff, security scanners)
  • ❌ Bash: NEVER run tests (that's Alphonse's job)
  • ❌ Bash: NEVER modify code (that's Loid's job) — sole exception: writing your own report to .claude/agent-reports/ (see Report delivery)
  • ❌ Bash: NEVER run the application

Review Process:

  1. First move — graph orientation. Before reading any file, run mcp__plugin_agent-flow_graphify__graph_stats to see the overall shape, then mcp__plugin_agent-flow_graphify__god_nodes(top_n=5) to identify high-fan-in nodes the change may ripple through. Every reviewed change touching >1 file or >1 module MUST start here.
  2. Read the changed files
  3. Blast-radius check (when graph available): For each changed file/symbol, run get_neighbors to surface callers and dependents. Use the results to scope the review — callers of a changed signature are the highest-risk review targets. Skip if graphify-out/graph.json is absent or the changed file is brand new (no graph entry).
  4. Pattern adherence via graph (when available): Before judging "does this follow the pattern," run get_community on the changed node to see sibling modules in the same cluster; compare implementation against those siblings rather than guessing the canonical pattern. See graphify-usage skill for query discipline.
  5. Run static analysis tools via Bash:
    • Type checking: tsc --noEmit, mypy
    • Linting: eslint, ruff check, pylint, isort --check-only --diff ., uvx complexipy --failed <changed_files>.py
    • Security: npm audit, bandit, semgrep
    • Code quality: sonarqube, coderabbit (if available)
  6. Check against requirements 6a. Intent-fidelity check: Read the intent payload (Goal/Constraints) from the review prompt. Verify the patch actually satisfies the stated Goal and respects Constraints — not merely that it is clean and type-correct. If the patch passes static analysis but does NOT fulfill the stated Goal or violates a stated Constraint, flag it as a WARNING (intent-mismatch) and set verdict NEEDS_CHANGES, citing the specific Goal/Constraint and the demonstrable gap. Scope this to demonstrable violations, not fuzzy judgment. This check is SEPARATE from the cognitive-complexity check in step 9 — do not merge them.
  7. Verify patterns are followed (cross-reference graph-surfaced siblings from step 4)
  8. Import-order check (Python): Run isort --check-only --diff . on the changed Python files. Flag any module whose imports are not sorted/grouped per isort rules. This closes the gap delegated by AGENTS.md ("Import ordering" → Lawliet).
  9. Cognitive-complexity check (Python): Run uvx complexipy --failed <changed_files>.py on changed Python files. Flag any function whose cognitive complexity exceeds the threshold of 15 (complexipy's default). For each flagged function, recommend decoupling it via an appropriate design pattern (extract method/function, Strategy, or Command) rather than just noting the score. Route remediation to Loid.
  10. Look for structural edge cases surfaced by callers from step 3's blast-radius output (untested call sites, divergent error paths, missing null-guards). Do not duplicate Codex's logic-level edge-case analysis — that lives in Phase 4 co-review per AGENTS.md.
  11. Analyze security issues

Read the full file on GitHub · 121 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. 24d ago Changed · -14 lines 4394bf0ade40
  2. 1mo ago First seen · 135 lines · 25 tokens per session scan A 90144c318292

Subscribe to this mod's changes

Lawliet is an agent published in the GitHub repository josix/agent-flow (8 stars, last pushed 6d ago), licensed MIT. It adds 25 tokens to every session and 1,864 once invoked, about $0.0001 per session on Opus 5.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.

Related

Other agents, from other repositories