architecture-critic

architecture-critic is a skill for Claude Code from JansenAnalytics/claudex. It costs 52 tokens per session (810 once invoked), scanned A, original, MIT.

A static code review tool that examines a project without running it, looking for structural and maintenance problems.

In plain words
What is it for?
Review a project during refactoring or before release, or run separate checks for complexity, dead code, dependencies, patterns, errors, and duplication.
Why use it?
It helps reveal overly complex code, unused code, tangled dependencies, inconsistent patterns, weak error handling, and repeated code before they cause trouble.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter.

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 skills/jansenanalytics/claudex/architecture-critic
Any agent
npx skills add JansenAnalytics/claudex --skill architecture-critic
Clone the repo
git clone --depth 1 https://github.com/JansenAnalytics/claudex

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-critic

README.md
[![agentmods](https://agentmods.dev/badge/skills/jansenanalytics/claudex/architecture-critic.svg)](https://agentmods.dev/skills/jansenanalytics/claudex/architecture-critic)
Your own site
<a href="https://agentmods.dev/skills/jansenanalytics/claudex/architecture-critic"><img src="https://agentmods.dev/badge/skills/jansenanalytics/claudex/architecture-critic.svg" alt="Measured on agentmods" height="20"></a>
Per session 52 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 810 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.1 $0.00052 $0.00810
Opus 5 $0.00026 $0.00405
Sonnet 5 $0.00010 $0.00162
Haiku 4.5 $0.00005 $0.00081

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

Security

Grade A, and why

architecture-critic scanned grade A with 1 finding 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 5d ago.

The scan reads SKILL.md. This mod also ships 8 executable files (scripts/complexity.cjs, scripts/deadcode.cjs, scripts/deps.cjs, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

None. Only Node.js built-in modules (fs, path, crypto, child_process).
skills/architecture-critic/SKILL.md · 76 lines

How it starts

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

Architecture Critic

Static code analysis that thinks like a senior developer — complexity, dead code, dependency graphs, patterns, error handling, duplication.

Quick Start

# Full review
arch-critic /path/to/project

# Quick review (complexity + dead code only)
arch-critic /path/to/project --quick

# Individual analyzers
node ${CLAUDE_SKILLS_DIR:-$HOME/.claude-agent/.claude/skills}/architecture-critic/scripts/complexity.cjs /path/to/project
node ${CLAUDE_SKILLS_DIR:-$HOME/.claude-agent/.claude/skills}/architecture-critic/scripts/deadcode.cjs /path/to/project
node ${CLAUDE_SKILLS_DIR:-$HOME/.claude-agent/.claude/skills}/architecture-critic/scripts/deps.cjs /path/to/project
node ${CLAUDE_SKILLS_DIR:-$HOME/.claude-agent/.claude/skills}/architecture-critic/scripts/patterns.cjs /path/to/project
node ${CLAUDE_SKILLS_DIR:-$HOME/.claude-agent/.claude/skills}/architecture-critic/scripts/errors.cjs /path/to/project
node ${CLAUDE_SKILLS_DIR:-$HOME/.claude-agent/.claude/skills}/architecture-critic/scripts/duplication.cjs /path/to/project

Scripts

Script Purpose Output
complexity.cjs Cyclomatic/cognitive complexity, function length, nesting depth complexity-report.json
deadcode.cjs Dead exports, unused variables, unreachable code, tech debt markers deadcode-report.json
deps.cjs Import graph, circular deps, god modules, coupling metrics dependency-graph.json
patterns.cjs Code style consistency (quotes, semis, naming, async patterns) patterns-report.json
errors.cjs Error handling audit (empty catches, unhandled promises) error-handling-report.json
duplication.cjs Duplicate code blocks via normalized hashing duplication-report.json
review.cjs Orchestrator — runs all analyzers All reports + combined
report.cjs Report generator — health score 0-100, top refactors architecture-review.json/md

Options

--quick              Complexity + dead code only
--full               All analyzers (default)
--format md|json     Output format (default: json)
--output-dir DIR     Where to write reports
--max-complexity N   Cyclomatic complexity threshold (default: 10)
--ignore PATTERN     Glob pattern to ignore (repeatable)
--block-size N       Duplication block size in lines (default: 6)

Read the full file on GitHub · 76 lines

Files

What ships with it

8 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 5d ago First seen · 76 lines · 52 tokens per session scan A d3761e9a2559

Subscribe to this mod's changes

architecture-critic is a skill published in the GitHub repository JansenAnalytics/claudex (5 stars, last pushed 2mo ago), licensed MIT. It adds 52 tokens to every session and 810 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

tldr-code

Token-efficient code analysis via 5-layer stack (AST, Call Graph, CFG, DFG, PDG). 95% token savings.

parcadei/Continuous-Claude-v3 · 33 tokens

scip-system-compression

Compress systems with scip-query evidence. Use to zoom out, simplify architecture, eliminate layers, consolidate commands, scripts, or helpers, find the deeper role behind unlike-looking code, build a compression atlas before a large cleanup, or execute an ordered simplification without rework.

PlunderStruck/scip-query · 61 tokens

principal-maintainability-review

Review maintainability like a principal engineer. Use when the user asks what a senior, staff, principal, or highly opinionated maintainer would notice, whether code looks vibe-coded, what is gross, what should be fundamentally different, or which architecture smells matter beyond ordinary deduplication. Finds…

PlunderStruck/scip-query · 89 tokens

scip-integrity-audit

Audit whether implementations are real with scip-query. Use for suspected faked or half-implemented features, decorative checkers or verifiers that never fail, dead code paths hidden behind graceful fallbacks, metrics that may be lying, or a "does any of this actually work" interrogation of a system.

PlunderStruck/scip-query · 68 tokens

scip-root-cause

Diagnose the design flaw behind a family of related bugs with scip-query evidence. Use when similar bugs keep recurring, the same subsystem keeps needing patches, or the user lists fixed or observed bugs and asks what is really wrong; produces a falsifiable flaw diagnosis, a latent-instance hunt, and the least…

PlunderStruck/scip-query · 74 tokens

scip-hyper-optimization

Optimize performance scientifically with current scip-query evidence. Use for benchmarking, profiling, cold or warm indexing, command latency, memory and computational cost, or comparing current-pipeline tuning with alternative designs.

PlunderStruck/scip-query · 46 tokens