Skip to content
Back to search

pyscn-marketplace

MarketplaceWorks with Claude CodeGitHub

Code quality analysis for Python in the age of AI coding.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today

Check it deeper on your machine

It has changed since its scan on 11 Nov 2026.

As a Claude Code plugin, install it and then ask Claude Code:

/plugin marketplace add keithmackay/mackayi/plugin install scanskillsafety@mackayiDo a deep scan of https://github.com/ludo-technologies/pyscn with scanskillsafety

Or from a terminal, clone it and run it:

git clone https://github.com/keithmackay/scanskillsafety-skill ~/.claude/skills/scanskillsafetynode ~/.claude/skills/scanskillsafety/cli.cjs --deep 'https://github.com/ludo-technologies/pyscn'

It checks the exact commit: every file, its packages against OSV (api.osv.dev), how it compares with this page's scan (findsafeskills.com receives the repository's address), and, if you agree, Claude reading every file with your own Claude subscription. It never runs the code.

Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/ludo-technologies--pyscn/badge.svg)](/listings/ludo-technologies--pyscn)

HTML

<a href="/listings/ludo-technologies--pyscn"><img src="/api/listings/ludo-technologies--pyscn/badge.svg" alt="findsafeskills safety rating" /></a>

Install

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

# Run analysis without installation
uvx pyscn@latest analyze .
# or
pipx run pyscn analyze .

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

.claude-plugin/marketplace.json · Manifest · 16 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. {
  2. "name": "pyscn-marketplace",
  3. "owner": {
  4. "name": "Ludo Technologies"
  5. },
  6. "metadata": {
  7. "description": "Python code quality analysis tools"
  8. },
  9. "plugins": [
  10. {
  11. "name": "pyscn-mcp",
  12. "source": "./.claude-plugin/pyscn-mcp",
  13. "description": "Python code quality analysis with complexity, dead code, clone detection, and coupling metrics"
  14. }
  15. ]
  16. }
README.md · README · 225 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. <div align="center">
  2. [English](README.md) | [日本語](README.ja.md) | [简体中文](README.zh-CN.md) | [Français](README.fr.md)
  3. <br>
  4. <picture>
  5. <source media="(prefers-color-scheme: dark)" srcset="assets/logo.svg">
  6. <source media="(prefers-color-scheme: light)" srcset="assets/logo-light.svg">
  7. <img alt="pyscn" src="assets/logo-light.svg" width="320">
  8. </picture>
  9. **Code quality analysis for Python in the age of AI coding.**
  10. Building with Cursor, Claude, or ChatGPT? pyscn keeps AI-generated code maintainable with structural analysis.
  11. [![Article](https://img.shields.io/badge/dev.to-Article-0A0A0A?style=flat-square&logo=dev.to)](https://dev.to/daisukeyoda/pyscn-the-code-quality-analyzer-for-vibe-coders-18hk)
  12. [![PyPI](https://img.shields.io/pypi/v/pyscn?style=flat-square&logo=pypi)](https://pypi.org/project/pyscn/)
  13. [![Downloads](https://img.shields.io/pypi/dm/pyscn?style=flat-square&logo=pypi&label=downloads)](https://pypi.org/project/pyscn/)
  14. [![Go](https://img.shields.io/github/go-mod/go-version/ludo-technologies/pyscn?style=flat-square&logo=go)](https://go.dev/)
  15. [![License](https://img.shields.io/github/license/ludo-technologies/pyscn?style=flat-square)](LICENSE)
  16. <a href="https://github.com/apps/polyscan-app/installations/select_target"><img alt="Install Polyscan App for free" src="https://img.shields.io/badge/Polyscan_App-Install_for_free-2ea44f?style=for-the-badge&logo=github&logoColor=white" height="44"></a>
  17. </div>
  18. ## Quick Start
  19. ```bash
  20. # Run analysis without installation
  21. uvx pyscn@latest analyze .
  22. # or
  23. pipx run pyscn analyze .
  24. ```
  25. ## Demo
  26. <img alt="pyscn analysis report" src="https://raw.githubusercontent.com/ludo-technologies/pyscn/main/assets/demo-report.png" width="720">
  27. ## Features
  28. One command scores your whole codebase (0-100 with an A-F grade) and generates an HTML report that shows what to fix first.
  29. pyscn looks at your code from five angles:
  30. - 🧹 **Dead code** - unreachable code you can safely delete
  31. - 📋 **Duplicate code** - copy-pasted and structurally similar code worth merging (Type 1-4 clone detection)
  32. - 🌀 **Complexity** - functions and executable class suites that are hard to read and test (cyclomatic and cognitive complexity)
  33. - 🔥 **Module and directory hotspots** - per-file quality and per-directory complexity rollups for prioritizing refactors
  34. - 🏗️ **Architecture** - circular imports, layer rule violations (clean / layered / hexagonal / MVC presets), and auto-detected module communities that reveal how your code is actually structured
  35. - 🧩 **Class design** - classes that do too much or depend on too much (CBO coupling, LCOM4 cohesion)
  36. **100,000+ lines/sec** • Built with Go + tree-sitter
  37. ## Other Languages
  38. pyscn is the Python analyzer of [polyscan](https://github.com/ludo-technologies/polyscan). For JavaScript, TypeScript, Go, Rust and C++, run:
  39. ```bash
  40. npx polyscan analyze .
  41. ```
  42. Same five angles, same 0-100 score, one HTML report.
  43. ## Polyscan for GitHub
  44. [Polyscan App](https://github.com/apps/polyscan-app/installations/select_target) files a weekly audit report as a GitHub Issue. Free for public repositories.
  45. <a href="https://github.com/apps/polyscan-app/installations/select_target"><img alt="Install Polyscan App for free" src="https://img.shields.io/badge/Polyscan_App-Install_for_free-2ea44f?style=for-the-badge&logo=github&logoColor=white" height="44"></a>
  46. ## AI Agent Integration
  47. pyscn ships Agent Skills that teach AI coding agents when and how to run each analysis: health checks, refactoring, architecture review, and CI-friendly reports.
  48. ### Agent Skills (Recommended)
  49. ```bash
  50. uvx add-skills ludo-technologies/pyscn
  51. ```
  52. This installs the Skills into your project. They work with Claude Code, Cursor, Codex, Gemini CLI, and [many other agents](https://github.com/ludo-technologies/add-skills) (add `--agent cursor` etc. to target one, `--global` for all projects).
  53. Then just ask your agent:
  54. 1. "Analyze the code quality of the app/ directory"
  55. 2. "Find duplicate code and help me refactor it"
  56. 3. "Show me complex code and help me simplify it"
  57. ### MCP Server (Optional)
  58. For tighter integration, the bundled `pyscn-mcp` server exposes the same analyses as MCP tools to Claude Code, Cursor, ChatGPT, and other MCP clients.
  59. **Claude Code plugin (sets up the MCP server and the Skills together):**
  60. ```bash
  61. claude plugin marketplace add ludo-technologies/pyscn
  62. claude plugin install pyscn-mcp@pyscn-marketplace
  63. ```
  64. **Manual setup for Claude Code:**
  65. ```bash
  66. claude mcp add pyscn-mcp uvx -- pyscn-mcp
  67. ```
  68. **Cursor / Claude Desktop:** add to your MCP settings (`~/.config/claude-desktop/config.json` or Cursor settings):
  69. ```json
  70. {
  71. "mcpServers": {
  72. "pyscn-mcp": {
  73. "command": "uvx",
  74. "args": ["pyscn-mcp"],
  75. "env": {
  76. "PYSCN_CONFIG": "/path/to/.pyscn.toml"
  77. }
  78. }
  79. }
  80. }
  81. ```
  82. Dive deeper in `mcp/README.md` for setup walkthroughs and `docs/MCP_INTEGRATION.md` for architecture details.
  83. ## Installation
  84. ```bash
  85. # Install with pipx (recommended)
  86. pipx install pyscn
  87. # Or with uv
  88. uv tool install pyscn
  89. ```
  90. > **macOS Intel (x86_64):** PyPI wheels are built for Apple Silicon only (the Intel wheel was dropped in v1.5.1), so `uvx`, `pipx`, `uv`, and `pip` cannot install pyscn on Intel Macs. Use `brew install pyscn` or `go install github.com/ludo-technologies/pyscn/cmd/pyscn@latest` instead.
  91. <details>
  92. <summary>Alternative installation methods</summary>
  93. ### Build from source
  94. ```bash
  95. git clone https://github.com/ludo-technologies/pyscn.git
  96. cd pyscn
  97. make build
  98. ```
  99. ### Go install
  100. ```bash
  101. go install github.com/ludo-technologies/pyscn/cmd/pyscn@latest
  102. ```
  103. </details>
  104. ## Common Commands
  105. ### `pyscn analyze`
  106. Run comprehensive analysis with HTML report
  107. ```bash
  108. pyscn analyze . # All analyses with HTML report
  109. pyscn analyze --json . # Generate JSON report
  110. pyscn analyze --json --output - . | jq # JSON report on stdout
  111. pyscn analyze --json --html --no-open . # JSON and HTML reports from one run
  112. pyscn analyze --select complexity . # Only complexity analysis
  113. pyscn analyze --select deps . # Only dependency analysis
  114. pyscn analyze --select complexity,deps,deadcode . # Multiple analyses
  115. pyscn analyze --skip-communities . # Skip module community detection
  116. ```
  117. ### `pyscn check`
  118. Fast CI-friendly quality gate
  119. ```bash
  120. pyscn check . # Quick pass/fail check
  121. pyscn check --max-complexity 15 . # Custom thresholds
  122. pyscn check --max-cycles 0 . # Only allow 0 cycle dependency
  123. pyscn check --select deps . # Check only for circular dependencies
  124. pyscn check --select di . # Detect DI anti-patterns (opt-in)
  125. pyscn check --allow-circular-deps . # Allow circular dependencies (warning only)
  126. ```
  127. ### `pyscn init`
  128. Create configuration file
  129. ```bash
  130. pyscn init # Generate .pyscn.toml
  131. ```
  132. > 💡 Run `pyscn --help` or `pyscn <command> --help` for complete options
  133. ## Configuration
  134. Create a `.pyscn.toml` file or add `[tool.pyscn]` to your `pyproject.toml`:
  135. ```toml
  136. # .pyscn.toml
  137. [complexity]
  138. max_complexity = 15
  139. [dead_code]
  140. min_severity = "warning"
  141. [output]
  142. directory = "reports"
  143. ```
  144. > ⚙️ Run `pyscn init` to generate a full configuration file with all available options
  145. ---
  146. ## Documentation
  147. 📖 **[pyscn documentation site](https://docs.codescan.dev/pyscn/)** — installation, rule catalog, CLI reference, configuration, output specification
  148. For contributors: **[Development Guide](docs/DEVELOPMENT.md)** • **[Architecture](docs/ARCHITECTURE.md)** • **[Testing](docs/TESTING.md)**
  149. ## Enterprise Support
  150. For commercial support, custom integrations, or consulting services, contact us at contact@ludo-tech.org
  151. ## License
  152. MIT License — see [LICENSE](LICENSE)
  153. ---
  154. *Built with ❤️ using Go and tree-sitter*

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.