polyscan
September 3, 2026 ยท View on GitHub
polyscan
Code quality analyzers for AI agents
Building with Cursor, Claude, or ChatGPT? polyscan performs structural analysis to keep your codebase maintainable: one command scores your whole codebase and shows what to fix first.
Quick Start
No installation needed โ one command runs the full analysis for JavaScript, TypeScript, Go, Rust and C++:
npx polyscan analyze .
The language of each file is detected from its extension, and everything lands in one report with one health score.
Python
Python has its own analyzer, pyscn, built on the same core:
uvx pyscn@latest analyze .
Others
We are also planning to support more languages.
Migrating from jscan? The
jscannpm package is deprecated and now runs polyscan for you โ switch your scripts tonpx polyscan analyze ..
What You Get
Every analyzer scores your codebase (0-100 with an A-F grade) and generates an HTML report that shows what to fix first, looking at your code from five angles:
- ๐งน Dead code - unreachable code you can safely delete
- ๐ Duplicate code - copy-pasted and structurally similar code worth merging (Type 1-4 clone detection)
- ๐ Complexity - functions that are hard to read and test
- ๐๏ธ Dependencies - circular imports and unstable module dependencies
- ๐งฉ Class design - classes that do too much or depend on too much (CBO coupling, LCOM cohesion)
Complexity and duplicate code cover every language; dead code, dependencies and class design run for JavaScript/TypeScript (and Python via pyscn) today. Dimensions a language does not have are left out of its score, not counted as clean.
The HTML report opens on an overview of the score, the biggest sources of debt and the files to fix first. This is polyscan analyze src on Day.js:

Built with Go + tree-sitter โ fast enough to run on every commit.
Polyscan for GitHub
Want this running continuously? The Polyscan App runs the same analyzers on your repositories automatically:
- ๐ Weekly code audit โ scores the entire codebase once a week and files the report as a GitHub Issue (free while in beta)
- ๐ PR code review โ on every pull request, analyzes the changed files with the static analyzers and posts AI-generated improvement suggestions (Pro)
Unlike diff-only review bots, reports are grounded in the quantitative metrics above โ complexity, clones, dead code, dependencies. Configured with a single YAML file: report language (en / ja / zh / ko / es / fr / de / pt), target directories, and audit interval.
Get started at codescan.dev โ
AI Agent Integration
The analyzers ship Agent Skills that teach AI coding agents when and how to run each analysis: health checks, refactoring, architecture review, and CI-friendly reports.
# polyscan Skills
npx skills add ludo-technologies/polyscan
# pyscn Skills
uvx add-skills ludo-technologies/pyscn
They work with Claude Code, Cursor, Codex, Gemini CLI, and other agents.
Then just ask your agent:
-
"Analyze the code quality of the src/ directory"
-
"Find duplicate code and help me refactor it"
-
"Show me complex code and help me simplify it"
Claude Code plugin marketplace:
claude plugin marketplace add ludo-technologies/polyscan
claude plugin install polyscan@polyscan-marketplace
How It's Built
All analyzers share core/, a standalone, language-agnostic Go module: APTED tree edit distance, LSH/MinHash clone indexing, CFG analysis, dead code detection, and coupling/cohesion metrics. Language-specific behavior is injected via interfaces, so a new analyzer only implements parsing and classification.
go get github.com/ludo-technologies/polyscan/core
| Directory | Description |
|---|---|
core/ | Language-agnostic analysis algorithms as a standalone Go module |
polyscan/ | The polyscan CLI: multi-language analysis with the JavaScript/TypeScript backend that began as jscan |
jscan/ | The deprecated jscan npm wrapper and jscan's historical docs |
website/ | Source of the polyscan documentation site |
jscan moved here from its former standalone repository, ludo-technologies/jscan, and has since merged into the polyscan CLI; the jscan npm package remains published as a deprecated wrapper that runs polyscan. pyscn remains an independent repository and consumes core/ as a Go module dependency.
Each module is tagged with a directory prefix, e.g. core/v0.2.1, polyscan/v0.1.0.
Documentation
๐ polyscan documentation site โข pyscn documentation site
polyscan README โข core README โข Performance
The polyscan site is built with MkDocs Material from website/ and deploys to GitHub Pages on every push to main.
For contributors: Contributing โข Code of Conduct โข Security
Enterprise Support
For commercial support, custom integrations, or consulting services, contact us at contact@ludo-tech.org
License
MIT License โ see LICENSE
Built with โค๏ธ using Go and tree-sitter