/polyscan:refactoringfrom polyscan
Finds refactoring targets using polyscan: duplicate code, complex functions, and dead code in JS/TS, Go, Rust, C++, Java.
Ships in polyscan. 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 polyscan CLI to locate concrete refactoring targets in JavaScript, TypeScript, Go, Rust, C++ and Java code. No install needed: npx polyscan@latest analyze <path>.
| 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.
.polyscan.toml): Low (≤9), Medium (10-19), High (20+). For JavaScript/TypeScript, complexity counts branches plus logical operators (&&, ||, ??) and ternaries.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.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
JavaScript, TypeScript, Go, Rust, C++, Java
polyscan, code-clones, complexity-analysis, dead-code, code-cleanup
4 skills in this plugin
/architecture-reviewAnalyze module architecture using polyscan - class coupling (CBO), class cohesion (LCOM4), instability metrics, and circular dependency detection. Use when user asks about architecture, module structure, coupling, or circular dependencies./cli-analysisRun the polyscan command-line tool for code quality analysis of JavaScript/TypeScript, Go, Rust, C++, and Java - 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./health-checkGet an overall code quality health score for JavaScript/TypeScript, Go, Rust, C++, or Java 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.npx claudepluginhub ludo-technologies/polyscan --plugin polyscanOther plugins' skills for the same job