ludo-technologies/pyscn/refactoring

Claude Code and agent skill by ludo-technologies/pyscn

Trust tier 2
  • community
LLM review pending
Source check pending

Checking that the SKILL.md file is still in the repository.

Find refactoring targets in Python code using pyscn - duplicate code (clones), overly complex functions, and dead code. Use when user asks about refactoring, code duplication, complexity hotspots, unreachable code, or cleaning up a codebase.

Install

npx vskill@latest install ludo-technologies/pyscn/refactoring

SKILL.md

Python Refactoring Analysis with pyscn

Run the pyscn CLI to locate concrete refactoring targets. No install needed: uvx pyscn@latest <command>.

Commands

User RequestCommand
"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>

Key Flags

  • --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.

Prioritizing Findings

  1. Critical dead code: safe deletions, do these first.
  2. High-complexity functions (>20): extract functions, flatten conditionals.
  3. Clone groups spanning multiple files: extract shared helpers; clones within one file are usually quicker wins.

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.

MCP Alternative

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.

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewNot runA model review is scheduled for the next rescan.

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
1,029
Repository forks
69
7-day trend score
35

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/ludo-technologies/pyscn/refactoring/badge)](https://verified-skill.com/skills/ludo-technologies/pyscn/refactoring)

Something wrong with this skill or its page? Tell us.