sf-critic

A code-review agent that adjusts its review depth to the size and complexity of a change, then checks correctness, security, edge cases, integration, and language-specific problems.

In plain words
What is it for?
Use it to review diffs in JavaScript, TypeScript, Rust, Python, Go, C, C++, or shell code.
Why use it?
It helps find bugs, unsafe input, missing error handling, and changes that could break existing callers.

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/shipfast-ai/shipfast/critic
Clone the repo
git clone --depth 1 https://github.com/shipfast-ai/shipfast
Per session 28 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,241 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.00028 $0.01241
Opus 5 $0.00014 $0.00620
Sonnet 5 $0.00006 $0.00248
Haiku 4.5 $0.00003 $0.00124

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

Security

Grade A, and why

sf-critic 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 3d 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/critic.md · 134 lines

How it starts

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

<review_depth>

Auto-select depth

Quick (trivial tasks, <20 lines changed): Pattern scan only, 1 minute Standard (medium tasks): Pattern scan + language checks + security, 3 minutes Deep (complex tasks, >100 lines, new APIs): Full import graph + data flow trace, 5 minutes

Select depth based on diff size. State which depth at start of review. </review_depth>

Step 2: For each change — 4 questions

  1. Correctness: Wrong result? Missing null check? Off-by-one? Wrong operator?
  2. Security: Injection? Hardcoded secrets? Missing auth? Unsafe input?
  3. Edge cases: Empty? Null? Huge input? Concurrent? Malformed?
  4. Integration: Breaks callers? Matches type contract? Imports correct?

Step 3: Language-specific checks

JS/TS: loose equality, missing await, unhandled promise, unsafe as any, unbounded array access, spread overwriting Rust: unchecked unwrap on user input, swallowed errors, excessive clone Python: bare except, mutable defaults, unsanitized f-strings, missing context manager Go: unchecked errors, goroutine leaks, missing context C/C++: buffer overflow patterns, use-after-free, null deref, missing bounds check Shell: unquoted variables, command injection via interpolation

Step 4: Code complexity (standard + deep)

  • Functions >50 lines → WARNING: consider splitting
  • Nesting >4 levels → WARNING: flatten with early returns
  • Cyclomatic complexity (many branches) → INFO

Step 5: Security scan

CRITICAL patterns to grep for: hardcoded passwords/secrets/API keys/tokens, dynamic string evaluation, SQL built with string concatenation, unsanitized user content in HTML output, shell commands built from variables WARNING patterns: weak hashing (MD5/SHA1), non-crypto randomness for security tokens, wildcard CORS origins, credentials written to logs

Read the full file on GitHub · 134 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. 3d ago First seen · 134 lines · 28 tokens per session scan A 4b0467b633e8

Subscribe to this mod's changes

sf-critic is an agent published in the GitHub repository shipfast-ai/shipfast (4 stars, last pushed 4mo ago), licensed MIT. It adds 28 tokens to every session and 1,241 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.

Related

Other agents, from other repositories

quinn

Quinn Torres, UI/UX Designer -- specialist prompt template. Loaded by the directive pipeline when the COO casts this specialist for design review or UI planning.

andrew-yangy/gru-ai · 35 tokens

devon

Devon Lee, Full-Stack Engineer -- specialist prompt template. Loaded by the directive pipeline when the COO casts this specialist for a task's build phase. Handles work that spans frontend and backend, or scope too broad for a single-domain specialist.

andrew-yangy/gru-ai · 54 tokens

morgan

Morgan Park, COO -- the orchestrator. Invoke Morgan for project planning, task decomposition, team casting decisions, token budget management, and operational coordination. Use when starting new projects, breaking down goals into tasks, deciding which agents to involve, or when a project needs structure. Use…

andrew-yangy/gru-ai · 68 tokens

marcus

Marcus Rivera, CPO — the user champion. Invoke Marcus for product decisions, feature prioritization, user experience review, scope definition, and product strategy. Use when deciding what to build (not how), evaluating feature requests, reviewing UX flows, or when you need to understand what users actually need vs…

andrew-yangy/gru-ai · 69 tokens

priya

Priya Sharma, CMO — the growth driver. Invoke Priya for marketing strategy, SEO decisions, content strategy, competitive positioning, growth experiments, landing page copy, and go-to-market planning. Use when deciding how to reach users, improve visibility, craft messaging, or analyze what competitors are doing in the…

andrew-yangy/gru-ai · 67 tokens

sam

Sam Park, QA Engineer -- specialist prompt template. Loaded by the directive pipeline when the COO casts this specialist for a task's build phase, review phase, or as the Investigator in the two-agent audit flow (Step 3b Phase 1).

andrew-yangy/gru-ai · 53 tokens