/pythonista:python-scanfrom pythonista
Run deterministic, read-only Python code analyzers — complexity, maintainability, documentation/type-hint coverage, code smells, over-engineering, dead code, unpythonic patterns, coupling, and duplication — and produce one structured JSON report. No judgment, no mutation. Use as the evidence baseline before any review, cleanup, or refactor pass, or to decide whether a downstream stage is even worth running.
Ships in pythonista. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Layer 0 of the pythonista pipeline: deterministic analysis only, zero judgment, zero mutation. Every other skill in this plugin either reads this skill's output or produces something this skill can later re-measure.
scripts/analyze_all.py <path> --format json fans out to 8 analyzers and merges the results into one report:
| Analyzer | Detects |
|---|---|
analyze_multi_metrics.py | Cyclomatic + cognitive complexity, maintainability index (radon + complexipy) |
check_documentation.py | Missing docstrings, missing type hints, missing module docstring |
find_code_smells.py | Magic numbers, bare excepts, god classes, data classes, long parameter lists |
find_overengineering.py | Unused abstractions, YAGNI violations |
find_dead_code.py | Unused imports and functions |
find_unpythonic.py | range(len(x)), == True, and similar non-idiomatic constructs |
find_coupling_issues.py | Feature envy, message chains |
find_duplicates.py | AST-based duplicate code |
Each analyzer also runs standalone: scripts/<name>.py <path> --format json (or --format text for a human-readable report). analyze_all.py accepts --skip-duplicates for large trees where duplicate detection is slow, and --output <file> to write the report instead of printing it.
type()-comparison checks — ruff already flags these (B006, E721); see python-quality-tools.python-quality-tools.python-review, python-patterns, python-architecture.Pass/warn/fail bands, tuned by python-refactor and shared here as the marketplace-wide default:
| Metric | Pass | Warn | Fail |
|---|---|---|---|
| Cyclomatic complexity | < 10 | ≥ 15 | ≥ 20 |
| Cognitive complexity | < 15 | ≥ 20 | ≥ 25 |
| Docstring coverage (public items) | ≥ 80% | — | < 80% |
| Type-hint coverage (public params) | ≥ 90% | — | < 90% |
{
"meta": {"analyzed_path": "...", "timestamp": "...", "analyzers_run": ["..."]},
"summary": {"total_issues": 0, "by_severity": {"high": 0, "medium": 0, "low": 0}, "by_category": {}},
"categories": {"<analyzer>": {"issues": [...], "count": 0}}
}
Every issue carries at least file, line, severity, and a type field (issue_type, smell_type, or pattern_type depending on which analyzer produced it) — code consuming the report should fall back across those keys rather than assume one name. Running analyze_multi_metrics.py or check_documentation.py standalone (not through analyze_all.py) additionally returns the full per-file metrics (files/coverage, thresholds) behind the flattened issue list.
Read-only, always. Never mutates a file and never proposes a fix — that judgment belongs to every other skill downstream of this one.
scripts/analyze_all.py ../../fixtures/smelly_module.py --format json
Expect ~48 findings, mostly in documentation, dead_code, unpythonic, code_smells,
coupling, and duplicates. complexity and overengineering may read 0 depending on whether
complexipy/radon are installed locally — that's expected, not a failure.
scripts/analyze_all.py (opens in a new tab)scripts/analyze_multi_metrics.py (opens in a new tab)scripts/check_documentation.py (opens in a new tab)scripts/find_code_smells.py (opens in a new tab)scripts/find_coupling_issues.py (opens in a new tab)scripts/find_dead_code.py (opens in a new tab)scripts/find_duplicates.py (opens in a new tab)scripts/find_overengineering.py (opens in a new tab)scripts/find_unpythonic.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub takfes/indie-marketplace --plugin pythonista12 skills in this plugin
/python-architectureWhole-module structural critique using deep-module design vocabulary: is a module's interface small relative to what it hides (deep) or nearly as complex as its implementation (shallow), does it survive the deletion test, and does its seam sit in the right place. Emits structured findings, never an HTML report or a mutation. Explicit call only, or reachable through python-workflow's critique recipe recommending it by name.
/python-documentAdd missing module summaries, docstrings, type annotations, and why-comments to Python code -- additive only, never changing behavior or rewording existing documentation. Use when the user asks to document, add docstrings/type hints/comments to, or improve documentation coverage of Python code, or as the documentation stage of a ship pipeline./python-