pyscn is a Python code-quality analyzer that examines dead code, duplication, complexity, hotspots, architecture, dependencies, and class design, then reports which areas need attention. It is used to maintain and refactor codebases, including AI-generated code, and provides agent skills for health checks, architecture reviews, refactoring, and CI reports.
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.
npx skills add ludo-technologies/pyscn --skill cli-analysisgit clone --depth 1 https://github.com/ludo-technologies/pyscnWrote 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.
[](https://agentmods.dev/skills/ludo-technologies/pyscn/cli-analysis)<a href="https://agentmods.dev/skills/ludo-technologies/pyscn/cli-analysis"><img src="https://agentmods.dev/badge/skills/ludo-technologies/pyscn/cli-analysis/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.
<a href="https://agentmods.dev/skills/ludo-technologies/pyscn/cli-analysis"><img src="https://agentmods.dev/badge/skills/ludo-technologies/pyscn/cli-analysis.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector warn
SkillSpector: 1 finding, up to medium
These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →
- medium MCP Rug Pull · line 10 uvx/uv tool run commands without ==version create a rug-pull risk.Fix: Pin the version: uvx package-name==1.2.3
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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00059 | $0.00836 |
| Opus 5.5 | $0.00024 | $0.00334 |
| Sonnet 5.5 | $0.00012 | $0.00167 |
| Haiku 4.5 | $0.00006 | $0.00084 |
Grade A, and why
cli-analysis 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 1mo 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.
How it starts
The opening of the file, as written. The whole thing — 61 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Python Code Quality Analysis with the pyscn CLI
Use the pyscn command-line tool when the task needs report files, CI integration, or project configuration.
No install needed: uvx pyscn@latest <command> (or pip install pyscn for a permanent install).
Commands
| Command | Purpose |
|---|---|
pyscn analyze <path> |
Comprehensive analysis: complexity, dead code, clones, coupling (CBO), cohesion (LCOM), dependencies, architecture |
pyscn check <path> |
Fast pass/fail quality gate for CI with predefined thresholds |
pyscn init |
Generate a .pyscn.toml config file |
analyze — full analysis and reports
pyscn analyze . # human-readable summary + health score
pyscn analyze --json src/ # also write a JSON report file
pyscn analyze --html src/ # interactive HTML report
pyscn analyze --select complexity,deadcode src/ # only specific analyses
pyscn analyze --skip-clones src/ # clones are the slowest analysis
pyscn analyze --min-complexity 10 --min-severity critical src/
Key flags:
--json/--html/--csv/--yaml: generate a report file--select:complexity,deadcode,clones,cbo,lcom,deps,communities--skip-clones,--skip-cbo,--skip-deps, ...: skip individual analyses--clone-threshold(default 0.65),--min-complexity(default 5),--min-cbo--no-open: don't auto-open HTML reports in a browser (use in scripts)
Report files are NOT written to stdout. They go to .pyscn/reports/ under the current working directory with timestamped names like analyze_20260702_221139.json, and the path is printed on completion. To consume results programmatically: run with --json, capture the printed path (or take the newest file in .pyscn/reports/), then read that file.
check — CI quality gate
pyscn check . # complexity + deadcode + clones
pyscn check --select complexity --max-complexity 10 src/
pyscn check --select deps src/ # fail on circular dependencies
pyscn check --allow-dead-code --skip-clones src/
pyscn check -q . # quiet: output only on issues
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.
- 1mo ago First seen · 61 lines · 59 tokens per session scan A 7aa649afd374
cli-analysis is a skill published in the GitHub repository ludo-technologies/pyscn (1,095 stars, last pushed today), licensed MIT. It adds 59 tokens to every session and 836 once invoked, about $0.0002 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.
Other skills, from other repositories
enola
Use Enola when investigating architecture, dependencies, blast radius, cross-repository relationships, structural regressions, or what a code change did to the system.
erase
Guided cleanup of CodeEraser findings — read the reports, verify every candidate against the actual code, delete safely, and prove convergence with ce check. Invoke when the user asks to clean up duplication, dead code, or act on CodeEraser findings.
mypy
Skill "mypy" from bobmatnyc/claude-mpm-skills, covering mypy - static type checking for python, basic mypy, with common type stubs, for fastapi projects and for django projects.
setup
Install or verify the Enola CLI required by this plugin. Use when Enola was just installed, its MCP server cannot start, or the enola command is missing.
code-quality
Python code-quality anti-patterns and review checks: exception-hierarchy correctness, singleton identity comparison, narrow exception handling, wildcard-import avoidance, magic-number naming, and dead-local removal. Use when reviewing or self-reviewing Python code for correctness and readability defects that linters…
mypy
Skill "mypy" from bobmatnyc/claude-mpm, covering mypy - static type checking for python, basic mypy, with common type stubs, for fastapi projects and for django projects.