analyze

A codebase inspection tool that reviews code quality, complexity, recurring patterns, security, dependencies, and test coverage gaps.

In plain words
What is it for?
Use it to scan a whole project or a selected path and produce findings, metrics, detected patterns, and suggested fixes.
Why use it?
It helps locate risky, duplicated, overly complicated, or weakly tested code without manually inspecting every file.

Skill for Claude CodeCodex

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/softspark/ai-toolkit/analyze
Any agent
npx skills add softspark/ai-toolkit --skill analyze
Clone the repo
git clone --depth 1 https://github.com/softspark/ai-toolkit

Made for: Claude Code, Codex.

Per session 30 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 985 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.00030 $0.00985
Opus 5 $0.00015 $0.00492
Sonnet 5 $0.00006 $0.00197
Haiku 4.5 $0.00003 $0.00098

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

Security

Grade A, and why

analyze 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.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/complexity.py), 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.

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.

app/skills/analyze/SKILL.md · 128 lines

How it starts

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

Code Analysis

$ARGUMENTS

Analyze code quality, complexity, and patterns.

Usage

/analyze [path] [--type=<type>]

What This Command Does

  1. Scans codebase or specific path
  2. Analyzes code quality metrics
  3. Identifies patterns and anti-patterns
  4. Reports findings with recommendations

Analysis Types

Type Description
quality Code quality metrics (default)
security Security vulnerability scan
complexity Cyclomatic complexity
dependencies Dependency analysis
coverage Test coverage gaps

Output Format

## Code Analysis Report

### Summary
- **Files Analyzed**: [count]
- **Issues Found**: [count]
- **Quality Score**: [score]/100

### Metrics
| Metric | Value | Threshold |
|--------|-------|-----------|
| Complexity | [avg] | <10 |
| Duplication | [%] | <5% |
| Coverage | [%] | >70% |

### Issues by Severity
- Critical: [count]
- High: [count]
- Medium: [count]
- Low: [count]

### Top Issues
1. **[Issue]** - [file:line]
   - [Description]
   - Fix: [Recommendation]

### Patterns Detected
- [Pattern 1]: [locations]
- [Pattern 2]: [locations]

### Recommendations
1. [Recommendation with priority]

Automated Complexity Analysis

Run the bundled script for a quick complexity report:

python3 ${CLAUDE_SKILL_DIR}/scripts/complexity.py .

Reports file counts by type, largest files, TODO/FIXME counts, and total code lines.

Common Rationalizations

Excuse Why It's Wrong
"The linter is green, the code is fine" Linters catch syntax, not design flaws — analysis covers architecture and patterns
"We know where the problems are" Intuition misses systemic issues — data-driven analysis reveals hidden hotspots
"Analysis takes too long" A 5-minute scan prevents weeks of debugging — front-load the investment
"It's legacy code, analysis won't help" Legacy code benefits most — find the critical paths before they break

Read the full file on GitHub · 128 lines

Files

What ships with it

1 file 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. 3d ago First seen · 128 lines · 30 tokens per session scan A 38182af72f2c

Subscribe to this mod's changes

analyze is a skill published in the GitHub repository softspark/ai-toolkit (167 stars, last pushed 4d ago), licensed Apache-2.0. It adds 30 tokens to every session and 985 once invoked, about $0.0002 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-30.