English | 中文
Every ecosystem has its own dependency manager, but no tool looks across C++, Android, iOS, C#/.NET, and Web to tell you: how much code is actually yours, what's third-party, and what's dead weight.
repo-scan gives you the answer — a cross-stack source code asset audit that classifies every file, identifies every dependency, and delivers an actionable verdict for each module. One command, zero dependencies, interactive HTML report.

You're staring at a monorepo with 200+ directories, 50,000 files, multiple tech stacks, and third-party code mixed into source folders. Before you can refactor, merge, or make any architectural decision, you need answers:
Running cloc gives you line counts. Running dependency scanners gives you one stack at a time. repo-scan gives you the full picture — across all stacks, in one pass.
| Traditional tools | repo-scan | |
|---|---|---|
| Scope | Single language/ecosystem | C/C++, Java/Android, iOS, C#/.NET, Web — unified |
| Third-party detection | Declared deps only | Source-embedded libs too (50+ known libraries) |
| Output | Raw metrics | Actionable 4-level verdicts per module |
| Monorepo | Flat file list | Hierarchical scan with drill-down HTML |
| AI-native | N/A | Designed as Agent Skill with token-efficient analysis |
index.html with clickable project cards and verdict distribution barsdeep mode adds thread safety, memory management, error handling, and API consistency checks on top of standard data| Level | Files Read (per module) | Quality Checks | Use Case |
|---|---|---|---|
fast | 1-2: build config + one key header | Dependency versions only | Quick inventory of huge directories (hundreds of modules) |
standard | 2-5: headers + entry files + build config | Full: deps, architecture, tech debt | Default audit |
deep | 5-10: adds core implementation, tests, CI | Thread safety, memory, error handling, API consistency | Incremental on top of standard data |
full | All files in module | Full analysis + cross-file comparison | Pre-merge comprehensive review |
Deep mode is incremental — it detects existing scan data, auto-selects high-value modules (Core Asset + Extract & Merge), and appends detailed analysis:
/repo-scan /path/to/project --level deep # auto-select modules
/repo-scan /path/to/project --level deep --modules base,rtmp_sdk # specific modules
--gap-check — Incremental capability gap detection — after a scan is complete, compare your consolidated module library against candidate source directories to find missed symbols, API differences, and implementation improvements:
/repo-scan --gap-check
/repo-scan --gap-check -m base
Copy config/gap-config-example.json to gap-config.json and fill in your local paths before running. Outputs a Markdown report with [MANDATORY-IMPORT], [MANDATORY-EVAL], and [EVAL-IMPL] tagged items.
| Section | Content |
|---|---|
| Architecture Tree | Physical directory structure, semantically compressed, third-party and dead code color-coded |
| Module Descriptions | Function, core classes, dependencies, third-party refs (with version assessment), quality, verdict |
| Asset Triage Table | Global summary: Core Asset / Extract & Merge / Rebuild / Deprecate |
| Cross-Module Review | Capability overlap map, dependency topology, verdict corrections, refactoring priorities |
| Deep Analysis | Per-file review, thread safety, memory, error handling, API consistency (purple DEEP badge) |



# Global skills directory
git clone https://github.com/haibindev/repo-scan.git ~/.claude/skills/repo-scan
# Or project-level
git clone https://github.com/haibindev/repo-scan.git .claude/skills/repo-scan
/repo-scan /path/to/my-project
/repo-scan /path/to/my-project --level fast
/repo-scan /path/to/my-project --level deep
/repo-scan /path/to/my-project --level deep --modules base,encoder
The pre-scan script (Python 3, zero deps) generates structured Markdown data for AI analysis:
python scripts/pre-scan.py /path/to/project # stdout
python scripts/pre-scan.py /path/to/project -o report.md # single file
python scripts/pre-scan.py /path/to/project -d ./scan-output # hierarchical (recommended)
python scripts/pre-scan.py /path/to/project -c config.json # custom config
| # | Section | Description |
|---|---|---|
| 1 | Overall Statistics | Three-way split: project / third-party / build artifacts |
| 2 | Top-Level Breakdown | File count, size, build system, classification per directory |
| 3 | Tech Stack Stats | Per-stack source file counts |
| 4 | Third-Party Deps | Detected libraries with name, version, location, size |
| 5 | Code Duplication | Directories appearing 3+ times (potential copy-paste) |
| 6 | Directory Tree | Clean tree with noise filtered and third-party marked |
| 7 | Git Activity | Commit history and activity for all discovered repos |
| 8 | Noise Summary | Build artifact sizes aggregated by type |
repo-scan/
├── SKILL.md # Skill definition (Agent entry point)
├── deep-mode.md # Deep mode & --modules rules
├── full-mode.md # Full mode rules
├── reference.md # Tech stack audit reference tables
├── config/
│ ├── ignore-patterns.json # Configurable ignore/recognition patterns
│ └── gap-config-example.json # Example config for --gap-check (copy & fill in paths)
├── scripts/
│ ├── pre-scan.py # Pre-scan script (Python 3, zero deps)
│ ├── capability_gap.py # Incremental capability gap detection (--gap-check)
│ ├── gen_html.py # HTML generator (Markdown → interactive pages)
│ └── i18n.py # Internationalization (auto-detects zh/en)
└── templates/
├── report.html # Single project template (dark theme)
├── index.html # Multi-project summary template (cards + cross-analysis)
└── dual-scan.html # Dual-scan cross-validation template
Edit config/ignore-patterns.json to customize patterns:
{
"noise_dirs": {
"common": [".git", ".svn", "obj", "tmp"],
"cpp": ["Debug", "Release", "x64", "ipch"],
"java_android": [".gradle", "build", "target"],
"ios": ["DerivedData", "Pods", "xcuserdata"],
"web": ["node_modules", "dist", ".next"]
},
"thirdparty_dirs": {
"container_names": ["vendor", "external", "libs"],
"known_libs": ["ffmpeg", "boost", "openssl", ...]
}
}
haibindev.github.io — personal site & blog
Python
64.3%
HTML
35.7%
English | 中文
Every ecosystem has its own dependency manager, but no tool looks across C++, Android, iOS, C#/.NET, and Web to tell you: how much code is actually yours, what's third-party, and what's dead weight.
repo-scan gives you the answer — a cross-stack source code asset audit that classifies every file, identifies every dependency, and delivers an actionable verdict for each module. One command, zero dependencies, interactive HTML report.

You're staring at a monorepo with 200+ directories, 50,000 files, multiple tech stacks, and third-party code mixed into source folders. Before you can refactor, merge, or make any architectural decision, you need answers:
Running cloc gives you line counts. Running dependency scanners gives you one stack at a time. repo-scan gives you the full picture — across all stacks, in one pass.
| Traditional tools | repo-scan | |
|---|---|---|
| Scope | Single language/ecosystem | C/C++, Java/Android, iOS, C#/.NET, Web — unified |
| Third-party detection | Declared deps only | Source-embedded libs too (50+ known libraries) |
| Output | Raw metrics | Actionable 4-level verdicts per module |
| Monorepo | Flat file list | Hierarchical scan with drill-down HTML |
| AI-native | N/A | Designed as Agent Skill with token-efficient analysis |
index.html with clickable project cards and verdict distribution barsdeep mode adds thread safety, memory management, error handling, and API consistency checks on top of standard data| Level | Files Read (per module) | Quality Checks | Use Case |
|---|---|---|---|
fast | 1-2: build config + one key header | Dependency versions only | Quick inventory of huge directories (hundreds of modules) |
standard | 2-5: headers + entry files + build config | Full: deps, architecture, tech debt | Default audit |
deep | 5-10: adds core implementation, tests, CI | Thread safety, memory, error handling, API consistency | Incremental on top of standard data |
full | All files in module | Full analysis + cross-file comparison | Pre-merge comprehensive review |
Deep mode is incremental — it detects existing scan data, auto-selects high-value modules (Core Asset + Extract & Merge), and appends detailed analysis:
/repo-scan /path/to/project --level deep # auto-select modules
/repo-scan /path/to/project --level deep --modules base,rtmp_sdk # specific modules
--gap-check — Incremental capability gap detection — after a scan is complete, compare your consolidated module library against candidate source directories to find missed symbols, API differences, and implementation improvements:
/repo-scan --gap-check
/repo-scan --gap-check -m base
Copy config/gap-config-example.json to gap-config.json and fill in your local paths before running. Outputs a Markdown report with [MANDATORY-IMPORT], [MANDATORY-EVAL], and [EVAL-IMPL] tagged items.
| Section | Content |
|---|---|
| Architecture Tree | Physical directory structure, semantically compressed, third-party and dead code color-coded |
| Module Descriptions | Function, core classes, dependencies, third-party refs (with version assessment), quality, verdict |
| Asset Triage Table | Global summary: Core Asset / Extract & Merge / Rebuild / Deprecate |
| Cross-Module Review | Capability overlap map, dependency topology, verdict corrections, refactoring priorities |
| Deep Analysis | Per-file review, thread safety, memory, error handling, API consistency (purple DEEP badge) |



# Global skills directory
git clone https://github.com/haibindev/repo-scan.git ~/.claude/skills/repo-scan
# Or project-level
git clone https://github.com/haibindev/repo-scan.git .claude/skills/repo-scan
/repo-scan /path/to/my-project
/repo-scan /path/to/my-project --level fast
/repo-scan /path/to/my-project --level deep
/repo-scan /path/to/my-project --level deep --modules base,encoder
The pre-scan script (Python 3, zero deps) generates structured Markdown data for AI analysis:
python scripts/pre-scan.py /path/to/project # stdout
python scripts/pre-scan.py /path/to/project -o report.md # single file
python scripts/pre-scan.py /path/to/project -d ./scan-output # hierarchical (recommended)
python scripts/pre-scan.py /path/to/project -c config.json # custom config
| # | Section | Description |
|---|---|---|
| 1 | Overall Statistics | Three-way split: project / third-party / build artifacts |
| 2 | Top-Level Breakdown | File count, size, build system, classification per directory |
| 3 | Tech Stack Stats | Per-stack source file counts |
| 4 | Third-Party Deps | Detected libraries with name, version, location, size |
| 5 | Code Duplication | Directories appearing 3+ times (potential copy-paste) |
| 6 | Directory Tree | Clean tree with noise filtered and third-party marked |
| 7 | Git Activity | Commit history and activity for all discovered repos |
| 8 | Noise Summary | Build artifact sizes aggregated by type |
repo-scan/
├── SKILL.md # Skill definition (Agent entry point)
├── deep-mode.md # Deep mode & --modules rules
├── full-mode.md # Full mode rules
├── reference.md # Tech stack audit reference tables
├── config/
│ ├── ignore-patterns.json # Configurable ignore/recognition patterns
│ └── gap-config-example.json # Example config for --gap-check (copy & fill in paths)
├── scripts/
│ ├── pre-scan.py # Pre-scan script (Python 3, zero deps)
│ ├── capability_gap.py # Incremental capability gap detection (--gap-check)
│ ├── gen_html.py # HTML generator (Markdown → interactive pages)
│ └── i18n.py # Internationalization (auto-detects zh/en)
└── templates/
├── report.html # Single project template (dark theme)
├── index.html # Multi-project summary template (cards + cross-analysis)
└── dual-scan.html # Dual-scan cross-validation template
Edit config/ignore-patterns.json to customize patterns:
{
"noise_dirs": {
"common": [".git", ".svn", "obj", "tmp"],
"cpp": ["Debug", "Release", "x64", "ipch"],
"java_android": [".gradle", "build", "target"],
"ios": ["DerivedData", "Pods", "xcuserdata"],
"web": ["node_modules", "dist", ".next"]
},
"thirdparty_dirs": {
"container_names": ["vendor", "external", "libs"],
"known_libs": ["ffmpeg", "boost", "openssl", ...]
}
}
haibindev.github.io — personal site & blog
Python
64.3%
HTML
35.7%