refactoring
/refactoring
Find refactoring targets in JavaScript/TypeScript, Go, Rust, or C++ code using polyscan - 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.
- Author
- ludo-technologies ↗
- Repository
- polyscan ↗
- Licence
- MIT
- Last repository change
- 19.10.2026
Assessment and security
- Files in this package
- 1
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 19.10.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
Find refactoring targets in JavaScript/TypeScript, Go, Rust, or C++ code using polyscan - 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.
Original author description
Find refactoring targets in JavaScript/TypeScript, Go, Rust, or C++ code using polyscan - 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.
How it works
- Commands
- Interpreting Results
- Prioritizing Findings
SKILL.md preview
--- name: refactoring description: Find refactoring targets in JavaScript/TypeScript, Go, Rust, or C++ code using polyscan - 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. --- # Refactoring Analysis with polyscan Run the polyscan CLI to locate concrete refactoring targets in JavaScript, TypeScript, Go, Rust and C++ code. No install needed: `npx polyscan@latest analyze <path>`. ## Commands | User Request | Command | |-------------|---------| | "Find complex functions" | `npx polyscan@latest analyze --format text --select complexity <path>` | | "Find duplicate code" | `npx polyscan@latest analyze --format text --select clone <path>` | | "Find dead code" (JS/TS only) | `npx polyscan@latest analyze --format text --select deadcode <path>` | | "What should I refactor first?" | `npx polyscan@latest analyze --format text --select complexity,deadcode,clone <path>` | Use `--format json` instead of `--format text` for line-level findings in machine-readable form (written to stdout). Without either, polyscan writes an HTML report and opens a browser. Complexity and clone detection cover every supported language; dead code detection exists for JavaScript/TypeScript only. ## Interpreting Results - Complexity risk levels (defaults, configurable in `.polyscan.toml`): Low (≤9), Medium (10-19), High (20+). For JavaScript/TypeScript, complexity counts branches plus logical operators (`&&`, `||`, `??`) and ternaries. - Dead code severity (JS/TS): critical means code after return/break/continue/throw that can never execute; warning covers unreachable branches, unused imports, and orphan files; info covers unused exports. - Clone types: Type-1 (identical), Type-2 (renamed identifiers/literals), Type-3 (modified, disabled by default), Type-4 (functionally similar), each with a similarity score. ## 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.
Versions
| Repository | Score | Licence |
|---|---|---|
| This page · ludo-technologies/polyscan | 90 | MIT |
| gabrieldulolmarques/refactoring-skill | 100 | CC-BY-4.0 |
| 4typen/skills | 100 | MIT |
| t8jwscc7qy-sketch/foma-skills | 100 | Apache-2.0 |
| mtwuser/zero-cloud-gravity | 100 | MIT |
| krzysztofsurdy/code-virtuoso | 100 | MIT |
| sagargupta16/claude-skills | 100 | MIT |
| nimadorostkar/Claude-Skills-collection | 100 | MIT |
| DariuszDusza/agentic-workflow-foundry | 100 | Apache-2.0 |
Database snapshot: 13.11.2026 · package version bc5212132b83 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100cli-analysis
Run the polyscan command-line tool for code quality analysis of JavaScript/TypeScript, Go, Rust, and C++ - CI quality gates, HTML/JSON/text reports, and project configuration. Use when user wants a CI check, a shareable report file, machine-readable results, or to configure polyscan for a project. - 100health-check
Get an overall code quality health score for JavaScript/TypeScript, Go, Rust, or C++ using polyscan. 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. - 95dog-food
Measure and reduce function complexity or duplication with the dog-food CLI (`dgf`) for C#, TypeScript/JavaScript and Rust. Use when asked about code complexity, copied code, CRAP scores, refactoring hotspots, or whether a change made code harder to maintain; when a repo has a… - 90refactor
Use when refactoring, cleaning up code, reducing complexity, fixing code smells, or improving code quality. Audits code for dead code, nesting, and patterns. - 90bb-code-audit
Use when asked for dead code, anti-patterns, security exposure or complexity hotspots in an indexed repository — bb_patterns, bb_security, bb_analyze. - 100find-complexity
Find functions and methods with high cyclomatic complexity, excessive length, or too many parameters. Use when the user asks to find complex code, complexity hotspots, refactoring candidates, or wants to improve code maintainability.