architecture-review

architecture-review is a command for Claude Code from alifanov/darkflow. It costs 23 tokens per session (1,659 once invoked), scanned A, original, MIT.

A proposal-only audit of a codebase's architecture and code health. Architecture here means how modules are separated and depend on one another; the extra code-health scan covers TypeScript and JavaScript.

In plain words
What is it for?
Use it for a weekly structural review and to create tasks for findings such as dead code, duplication, dependency cycles, or high complexity.
Why use it?
It finds boundaries, coupling, layering problems, and selected code issues without changing files itself.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: reads .claude/ paths.

Good fit Use it for a weekly structural review and to create tasks for findings such as dead code, duplication, dependency cycles, or high complexity.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/alifanov/darkflow/architecture-review
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/alifanov/darkflow

Made for: Claude Code.

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 architecture-review

README.md
[![agentmods](https://agentmods.dev/badge/commands/alifanov/darkflow/architecture-review/github.svg)](https://agentmods.dev/commands/alifanov/darkflow/architecture-review)
Your own site
<a href="https://agentmods.dev/commands/alifanov/darkflow/architecture-review"><img src="https://agentmods.dev/badge/commands/alifanov/darkflow/architecture-review/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 architecture-review

Your own site · 80×15
<a href="https://agentmods.dev/commands/alifanov/darkflow/architecture-review"><img src="https://agentmods.dev/badge/commands/alifanov/darkflow/architecture-review.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 23 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,659 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.00023 $0.01659
Opus 5 $0.00012 $0.00830
Sonnet 5 $0.00005 $0.00332
Haiku 4.5 $0.00002 $0.00166

Measured 8d ago against content hash c37195473f8d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

architecture-review 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 8d 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.

templates/.claude/commands/darkflow/architecture-review.md · 175 lines

How it starts

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

Weekly structural pass, in two parts. The review reads the codebase for module boundaries, coupling and layering — it works on any language. The fallow step adds deterministic TS/JS findings (dead code, duplication, cycles, complexity) on top; it is optional precisely because it only covers TS/JS while the rest of the review does not.

Proposal-only. It identifies problems and files tasks. It changes nothing itself — that is a human / fix-issues decision.

Step 1 — Read project config

Load the project config (contract in .darkflow.d/claude.mdProject config). Uses: language.

Step 2 — Architecture review

/improve-codebase-architecture

Step 3 — Code health (TS/JS only — skip otherwise)

Skip this step unless the project is TypeScript/JavaScript (package.json plus tsconfig.json or .ts/.tsx/.js files). A Python or Go repo goes straight to Step 4 with the review's findings alone — that is a normal outcome, not a degraded run, and it needs no note anywhere.

The fallow skill (~/.claude/skills/fallow) teaches the exact commands, flags, JSON shape and gotchas — follow it. The entry point is the aggregated audit:

npx fallow audit --json

If npx fallow is unavailable, cargo install fallow-cli once, or skip the step. Never guess findings — this half is only worth running while it stays deterministic.

Collect at minimum: dead code (unused exports, files, unreachable code) · duplication · circular dependencies and boundary violations · complexity hotspots · dependency hygiene.

Read the actions array; each finding carries an auto_fixable flag. auto_fixable does not mean "safe to delete" — that judgement is Step 4.

Step 4 — Triage (never trust the tool blindly)

fallow is deterministic but context-blind, and the review can over-reach. Filter first:

  • Dead code that is actually live: public API surface (exports/main/types), framework entry points (page.tsx, route.ts, layout.tsx, app/**, pages/**), dynamically referenced symbols (string-keyed lookups, DI, reflection), test fixtures, generated files, type-only re-exports consumed downstream. The skill's gotchas reference has the full list.
  • Duplication that is intentional: generated code, vendored snapshots, deliberately decoupled copies. Propose extraction only when the blocks are genuinely the same concern.
  • Complexity that is inherent: a parser or a state machine is legitimately complex. Propose a refactor only where the complexity is accidental and the file changes often (cross-check git log churn).
  • Style preferences are not findings. Actionable structural problems only.

Read the full file on GitHub · 175 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. 8d ago First seen · 175 lines · 23 tokens per session scan A c37195473f8d

Subscribe to this mod's changes

architecture-review is a command published in the GitHub repository alifanov/darkflow (3 stars, last pushed 9d ago), licensed MIT. It adds 23 tokens to every session and 1,659 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.