audit-complexity

audit-complexity is a skill for Claude Code, Codex from JHostalek/dotclaude. It costs 29 tokens per session (2,673 once invoked), scanned A, original, CC0-1.0.

A code-review workflow for reducing unnecessary complexity while keeping the intended user-visible behaviour. Complexity includes the effort needed to understand, change, operate, and remove code.

In plain words
What is it for?
It examines the system's behaviour, architecture, dependencies, state changes, and operational constraints before proposing simplifications.
Why use it?
It finds confusing ownership, duplicated decisions, tangled dependencies, and other design problems that increase maintenance risk.

Skill for Claude CodeCodex

Part of the jhostalek-skills plugin — 32 skills, 12 agents 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 skills/jhostalek/dotclaude/audit-complexity
Any agent
npx skills add JHostalek/dotclaude --skill audit-complexity
Clone the repo
git clone --depth 1 https://github.com/JHostalek/dotclaude

Made for: Claude Code, Codex.

Or install jhostalek-skills, the plugin that ships this one along with the rest of its 32 skills, 12 agents.

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 audit-complexity

README.md
[![agentmods](https://agentmods.dev/badge/skills/jhostalek/dotclaude/audit-complexity.svg)](https://agentmods.dev/skills/jhostalek/dotclaude/audit-complexity)
Your own site
<a href="https://agentmods.dev/skills/jhostalek/dotclaude/audit-complexity"><img src="https://agentmods.dev/badge/skills/jhostalek/dotclaude/audit-complexity.svg" alt="Measured on agentmods" height="20"></a>
Per session 29 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,673 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.00029 $0.02673
Opus 5 $0.00015 $0.01337
Sonnet 5 $0.00006 $0.00535
Haiku 4.5 $0.00003 $0.00267

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

Security

Grade A, and why

audit-complexity 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 4d 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.

skills/audit-complexity/SKILL.md · 141 lines

How it starts

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

!cat "${CLAUDE_SKILL_DIR}/../shared/audit-workflow.md"

Run as the complexity dimension. Reduce the effort and risk required to understand, change, operate, and remove the scoped system while preserving its legitimate behavior. Net LOC reduction is useful evidence, not the objective: a smaller diff can still make state, coupling, or failure behavior harder to reason about.

Work top-down

Reconstruct what the system must do before deciding what is unnecessary:

  1. Identify intended behavior, users and callers, domain invariants, public and internal contracts, trust and ownership boundaries, state transitions, lifecycle paths, operational constraints, and failure consequences from code, configuration, schemas, manifests, tests, docs, and history.
  2. Map the architecture and change surface: components, dependencies, data/control flow, sources of truth, extension mechanisms, generated or reflective behavior, concurrency, deployment modes, and where one concept is represented or decided more than once.
  3. Find architecture-wide complexity first: unclear ownership, scattered policy, duplicated state, cyclic or long dependency paths, leaky layers, mode interactions, and special cases whose combined behavior cannot be predicted locally. Then trace representative end-to-end paths, including failure, retry, startup, shutdown, migration, rollback, and compatibility paths when relevant.
  4. Apply the baseline to every applicable component and boundary. Derive extra probes for the actual domain rather than forcing the system into the named examples.

Do not infer simplicity or necessity from a framework, familiar pattern, abstraction name, helper, test presence, static reference count, file size, or superficially concise construct. Verify the exact call path, runtime registration, configuration, lifecycle, and consequence. Conversely, do not remove an abstraction merely because it has one implementation: it may encode a real boundary, policy, substitution seam, generated contract, or ownership constraint.

Read the full file on GitHub · 141 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. 4d ago First seen · 141 lines · 29 tokens per session scan A 9258025d000f

Subscribe to this mod's changes

audit-complexity is a skill published in the GitHub repository JHostalek/dotclaude (11 stars, last pushed 1mo ago), licensed CC0-1.0. It adds 29 tokens to every session and 2,673 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.