/pyscn-mcp:refactoringfrom pyscn-mcp
Finds refactoring targets in Python code using pyscn: duplicate code (clones), overly complex functions, and dead code. Useful for code cleanup and quality improvements.
Ships in pyscn-mcp. 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.
None: SKILL.md is the whole skill.
Run the pyscn CLI to locate concrete refactoring targets. No install needed: uvx pyscn@latest <command>.
| User Request | Command |
|---|---|
| "Find complex functions" | uvx pyscn@latest analyze --select complexity <path> |
| "Find duplicate code" | uvx pyscn@latest analyze --select clones <path> |
| "Find dead code" | uvx pyscn@latest analyze --select deadcode <path> |
| "What should I refactor first?" | uvx pyscn@latest analyze --select complexity,deadcode,clones <path> |
--min-complexity <n>: minimum complexity to report (default: 5). Risk levels: Low (<10), Medium (10-20), High (>20)--clone-threshold <0.0-1.0>: minimum similarity for clone detection (default: 0.65)--min-severity <critical|warning|info>: dead code severity floor (default: warning). Critical means code after return/break/continue/raise that can never execute.--json: write a detailed report with line-level findings. Report files are NOT written to stdout; they go to .pyscn/reports/ and the path is printed on completion.When suggesting a refactor, cite the specific function names, files, and line ranges from the results, and re-run the same command afterward to confirm the improvement.
If the pyscn-mcp MCP server is connected, you can use its tools instead of the CLI: check_complexity (min_complexity), detect_clones (similarity_threshold, min_lines), find_dead_code, or analyze_code with analyses: ["complexity", "clone", "dead_code"] to run several at once. Results are returned inline with no report files.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
4 skills in this plugin
/architecture-reviewAnalyze Python module architecture using pyscn - class coupling (CBO), cohesion (LCOM), dependency cycles, and module communities. Use when user asks about architecture, module structure, coupling, circular dependencies, or which files to review or change together./cli-analysisRun the pyscn command-line tool for Python code quality analysis - CI/CD quality gates, HTML/JSON/CSV reports, full analysis runs, and project configuration. Use when user wants a CI check, a shareable report file, or to configure pyscn for a project./health-checkGet an overall Python code quality health score using pyscn. Use when user asks how healthy or good the code is, wants a quality overview, a grade, a summary of technical debt, or a before/after quality comparison.npx claudepluginhub ludo-technologies/pyscn --plugin pyscn-mcpOther plugins' skills for the same job