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 health-checkgit 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/health-check)<a href="https://agentmods.dev/skills/ludo-technologies/pyscn/health-check"><img src="https://agentmods.dev/badge/skills/ludo-technologies/pyscn/health-check/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/health-check"><img src="https://agentmods.dev/badge/skills/ludo-technologies/pyscn/health-check.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector warn
SkillSpector: 2 findings, 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 11 uvx/uv tool run commands without ==version create a rug-pull risk.Fix: Pin the version: uvx package-name==1.2.3
- medium MCP Rug Pull · line 20 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.00049 | $0.00419 |
| Opus 5 | $0.00024 | $0.00210 |
| Sonnet 5 | $0.00010 | $0.00084 |
| Haiku 4.5 | $0.00005 | $0.00042 |
Grade A, and why
health-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 11d 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.
What it actually says
Python Code Health Check with pyscn
Run the pyscn CLI to give a quick, quantified picture of code quality. No install needed:
uvx pyscn@latest analyze <path>
The summary output includes a health score (0-100), a letter grade (A-F), and per-category metrics.
Commands
| User Request | Command |
|---|---|
| "How healthy is this code?" | uvx pyscn@latest analyze <path> |
| "Give me a quality overview" | Same command; walk through the category breakdown |
| "Did my refactoring improve quality?" | Run before and after, compare scores |
For machine-readable detail add --json. Report files are NOT written to stdout. They go to .pyscn/reports/ under the current working directory and the path is printed on completion; read that file.
Interpreting Results
- Score 0-100 with letter grade; category breakdowns cover complexity, dead code, duplication, coupling (CBO), cohesion (LCOM), dependencies, and architecture.
- Lead with the grade and the weakest categories, then name the top offenders (files/functions) driving them.
- For deeper follow-up, hand off to the focused skills: refactoring targets →
refactoring, module structure →architecture-review.
Always explain the score in plain terms and suggest the highest-impact next step.
MCP Alternative
If the pyscn-mcp MCP server is connected, you can use its tools instead of the CLI: get_health_score (score + grade) or analyze_code (output_mode: "summary" gives the health score plus high-level metrics per category). Results are returned inline with no report files.
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.
- 11d ago First seen · 37 lines · 49 tokens per session scan A a55a96cd62de
health-check is a skill published in the GitHub repository ludo-technologies/pyscn (1,056 stars, last pushed yesterday), licensed MIT. It adds 49 tokens to every session and 419 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.
Other skills, from other repositories
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.
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.
developing-with-streamlit
Use for ALL Streamlit tasks: creating, editing, debugging, beautifying, styling, theming, optimizing, or deploying Streamlit apps. Also custom components, st.components.v2, HTML/JS/CSS work. Discovers and loads version-matched reference docs from the user's installed Streamlit (>=1.57). Triggers: streamlit, st.…
python-code-quality
Code quality checks, linting, formatting, and type checking commands for the Agent Framework Python codebase. Use this when running checks, fixing lint errors, or troubleshooting CI failures.
eve
Build durable backend AI agents with the eve framework. Use when creating, editing, or debugging an eve project — agent instructions, skills, tools, connections, channels, sandboxes, subagents, schedules, or evals.