cli-analysis

A command-line guide for pyscn, a Python code-quality analysis tool. It covers full analysis, pass-or-fail checks for continuous integration, reports, and project configuration.

In plain words
What is it for?
Use it to analyse a Python project, create HTML, JSON, CSV, or YAML reports, add quality checks to CI, or generate a .pyscn.toml configuration file.
Why use it?
It helps detect issues such as overly complex code, unused code, duplicated code, dependency problems, and architectural weaknesses without manually checking everything.

Skill for Claude CodeCodex

Part of the pyscn-mcp plugin — 4 skills shipped together

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 skills/ludo-technologies/pyscn/cli-analysis
Any agent
npx skills add ludo-technologies/pyscn --skill cli-analysis
Clone the repo
git clone --depth 1 https://github.com/ludo-technologies/pyscn

Made for: Claude Code, Codex.

Or install pyscn-mcp, the plugin that ships this one along with the rest of its 4 skills.

Per session 59 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 836 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.00059 $0.00836
Opus 5 $0.00030 $0.00418
Sonnet 5 $0.00012 $0.00167
Haiku 4.5 $0.00006 $0.00084

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

Security

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 3d 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.

.claude-plugin/pyscn-mcp/skills/cli-analysis/SKILL.md · 61 lines

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

Read the full file on GitHub · 61 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. 3d ago First seen · 61 lines · 59 tokens per session scan A 7aa649afd374

Subscribe to this mod's changes

cli-analysis is a skill published in the GitHub repository ludo-technologies/pyscn (1,039 stars, last pushed 4d ago), licensed MIT. It adds 59 tokens to every session and 836 once invoked, about $0.0003 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.

Related

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.

skymanbp/CodeEraser · 56 tokens

analyzing-android-malware-with-apktool

Perform static analysis of Android APK malware using apktool for resource decompilation, jadx for Java source recovery, and androguard for manifest inspection, dangerous permission-combination detection, and identification of obfuscated code, dynamic code loading, and reflection-based API calls. Use to statically…

mukul975/Anthropic-Cybersecurity-Skills · 84 tokens

openlore-execute-refactor

Apply a confirmed .openlore/refactor-plan.md with a test gate after each change. Use when asked to execute or continue an OpenLore refactoring plan.

clay-good/OpenLore · 41 tokens

openlore-write-tests

Write and run real tests for a function or spec scenario after reading implementation and contract evidence. Use when asked to add, improve, or repair tests without stubs or placeholders.

clay-good/OpenLore · 41 tokens

commit

Use when writing a commit message, and MUST invoke before creating any git commit. Provides commit message format and safety rules.

aviatesk/JETLS.jl · 26 tokens

openlore-analyze-codebase

Run a full static OpenLore analysis and summarize architecture, call graph, refactoring issues, and duplicate code. Use when asked to analyze, map, or assess a codebase without LLM inference.

clay-good/OpenLore · 48 tokens