analyze-quality

analyze-quality is a command for Claude Code from MartyBonacci/specswarm. It costs 9 tokens per session (3,704 once invoked), scanned A, original, MIT.

A codebase review command that looks for testing gaps, design problems, missing documentation, performance concerns, security issues, and type or dead-code problems.

In plain words
What is it for?
Use it to assess an entire repository, identify modules without tests, detect issues in TypeScript projects, and produce improvement recommendations.
Why use it?
It replaces a scattered manual health check with a prioritized view of where the code needs attention.

Command for Claude Code

Written for Claude Code: effort in frontmatter. Also seen: mentions Claude Code.

Part of the ss plugin — 10 skills, 34 commands, 6 agents, 4 hooks shipped together

Good fit Use it to assess an entire repository, identify modules without tests, detect issues in TypeScript projects, and produce improvement recommendations.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/martybonacci/specswarm/analyze-quality
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/MartyBonacci/specswarm

Made for: Claude Code.

Or install ss, the plugin that ships this one along with the rest of its 10 skills, 34 commands, 6 agents, 4 hooks.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/commands/martybonacci/specswarm/analyze-quality"><img src="https://agentmods.dev/badge/commands/martybonacci/specswarm/analyze-quality.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 9 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,704 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.00009 $0.03704
Opus 5.5 $0.00004 $0.01482
Sonnet 5.5 $0.00002 $0.00741
Haiku 4.5 $0.00001 $0.00370

Measured 3mo ago against content hash cde9c78b9939, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

analyze-quality 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 3mo 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.

plugins/ss/commands/analyze-quality.md · 519 lines

How it starts

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

User Input

$ARGUMENTS

You MUST consider the user input before proceeding (if not empty).

Goal

Perform comprehensive codebase quality analysis to identify improvement opportunities and generate prioritized recommendations.

Key Capabilities:

  1. Test Coverage Gaps: Find files without tests
  2. Architecture Issues: Detect anti-patterns and violations
  3. Missing Documentation: Identify undocumented code
  4. Performance Issues: Find optimization opportunities
  5. Security Issues: Detect vulnerabilities
  6. Quality Scoring: Calculate module-level quality scores
  7. LSP Analysis (v3.8.0+): Language-aware analysis using LSP tools

Coverage: Provides holistic codebase health assessment

LSP Integration (Claude Code 2.1.0+): When --lsp flag is provided or TypeScript project is detected:

  • Semantic analysis of unused imports/exports
  • Dead code detection via reference analysis
  • Type error detection
  • Symbol resolution for accurate metrics

Execution Steps

1. Initialize Analysis Context

YOU MUST NOW initialize the analysis using the Bash tool:

  1. Get repository root:

    git rev-parse --show-toplevel 2>/dev/null || pwd
    

    Store as REPO_ROOT.

  2. Display analysis banner:

    📊 Codebase Quality Analysis
    ============================
    
    Analyzing: {REPO_ROOT}
    Started: {TIMESTAMP}
    
  3. Detect project type by reading package.json:

    • Framework: Vite, Next.js, Remix, CRA, or Generic
    • Language: JavaScript, TypeScript, Python, Go, etc.
    • Test framework: Vitest, Jest, Pytest, etc.

1.5. LSP-Based Analysis (Enhanced)

IF --lsp flag is provided OR TypeScript project detected, use LSP for semantic analysis:

Read the full file on GitHub · 519 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. 3mo ago First seen · 519 lines · 9 tokens per session scan A cde9c78b9939

Subscribe to this mod's changes

analyze-quality is a command published in the GitHub repository MartyBonacci/specswarm (67 stars, last pushed yesterday), licensed MIT. It adds 9 tokens to every session and 3,704 once invoked, about $0.0000 per session on Opus 5.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.

Related

analyze-quality compared with commands from other repositories

analyze-quality next to 6 commands from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
analyze-qualityMartyBonacci/specswarmCommand67yesterdayMITA9Claude Code
review-branchdamusix/atomic-claudeCommand1172d agoMITA35Claude Code
diff-reviewcoco-research/cocoCommand3232d agoApache-2.0A11Claude Code
spec-trace-requirementsrjmurillo/ai-agentsCommand50todayApache-2.0A0GitHub Copilot
merge-conflict-analysisrjmurillo/ai-agentsCommand50todayApache-2.0A0GitHub Copilot
initazrtydxb/procoderCommand21222d agoApache-2.0A16Claude Code
refactorRchGrav/claudeboxCommand1.2k2mo agoMITA9Claude Code