quality-check

A command that examines source code for design problems, difficult logic, duplication, and other maintainability issues.

In plain words
What is it for?
Use it to detect code smells, analyze cyclomatic and cognitive complexity, and get refactoring recommendations for JavaScript, TypeScript, or Python projects.
Why use it?
It gives you concrete findings instead of relying only on manual review, and lets you filter results by analysis type and severity.

Command

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 commands/armanzeroeight/fastagent-plugins/quality-check
Clone the repo
git clone --depth 1 https://github.com/armanzeroeight/fastagent-plugins
Per session 16 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 772 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.00016 $0.00772
Opus 5 $0.00008 $0.00386
Sonnet 5 $0.00003 $0.00154
Haiku 4.5 $0.00002 $0.00077

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

Security

Grade A, and why

quality-check 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 2d 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/code-quality-toolkit/commands/quality-check.md · 108 lines

How it starts

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

Quality Check

Context

  • Project type: !ls package.json 2>/dev/null && echo "node" || (ls setup.py pyproject.toml 2>/dev/null && echo "python" || echo "unknown")
  • File count: !find src -type f \( -name "*.js" -o -name "*.ts" -o -name "*.py" \) 2>/dev/null | wc -l

Your Task

Analyze code quality and provide actionable recommendations for improvement.

Arguments

  • $1: Analysis type (optional, default: "all")
    • smells - Detect code smells only
    • complexity - Analyze complexity only
    • all - Run all analyses
  • $2: Severity threshold (optional, default: "medium")
    • low - Report all issues
    • medium - Report medium and high severity
    • high - Report only high severity issues

Steps

  1. Detect project type and locate source files

  2. Based on analysis type ($1):

    For code smells:

    • Scan for long methods (>50 lines)
    • Identify god classes (>20 methods)
    • Detect duplicated code
    • Find magic numbers
    • Check for deep nesting (>4 levels)

    For complexity:

    • Calculate cyclomatic complexity
    • Identify functions with complexity >10
    • Analyze cognitive complexity
    • Find deeply nested code
  3. Categorize findings by severity

  4. Filter by threshold ($2)

  5. Provide refactoring recommendations

Output Format

# Code Quality Report

**Project:** [name]
**Files Analyzed:** [count]
**Issues Found:** [count]

## Summary

| Severity | Code Smells | Complexity | Total |
|----------|-------------|------------|-------|
| High     | X           | X          | X     |
| Medium   | X           | X          | X     |
| Low      | X           | X          | X     |

## High Priority Issues

### God Class: UserManager (src/services/UserManager.js)
- **Problem:** 523 lines, 18 methods, too many responsibilities
- **Impact:** Hard to maintain, test, and understand
- **Recommendation:** Split into UserService, AuthService, EmailService
- **Effort:** Medium (2-3 days)

### High Complexity: processOrder() (src/orders/processor.js:45)
- **Problem:** Cyclomatic complexity 28, cognitive complexity 35
- **Impact:** Error-prone, hard to test
- **Recommendation:** Extract validation, calculation, persistence
- **Effort:** Low (4-6 hours)

## Recommendations

1. **Immediate:** Refactor processOrder() - high complexity, high risk
2. **This Sprint:** Split UserManager god class
3. **Next Sprint:** Address duplicated code in payment processing

Read the full file on GitHub · 108 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. 2d ago First seen · 108 lines · 16 tokens per session scan A b8b6480f04f6

Subscribe to this mod's changes

quality-check is a command published in the GitHub repository armanzeroeight/fastagent-plugins (29 stars, last pushed 1mo ago), licensed MIT. It adds 16 tokens to every session and 772 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-30.