一键导入
repo-scanning
Deterministic repo analysis — language/framework detection, structure mapping, domain discovery, health checks, and import graph integration
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Deterministic repo analysis — language/framework detection, structure mapping, domain discovery, health checks, and import graph integration
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use when modifying imports, creating new files, refactoring modules, or understanding how components relate. Not needed for simple single-file edits.
LLM-powered injection of project context into installed agent templates via `aspens customize agents`
Core conventions, tech stack, and project structure for aspens
Claude/Codex CLI execution layer — prompt loading, stream-json parsing, file output extraction, path sanitization, skill file writing, and skill rule generation
Top-level Commander wiring, welcome screen, missing-hook warning, CliError exit handling, and the public programmatic API surface
Multi-target output system — target abstraction, backend routing, content transforms for Codex CLI and future targets
| name | repo-scanning |
| description | Deterministic repo analysis — language/framework detection, structure mapping, domain discovery, health checks, and import graph integration |
| triggers | {"files":["src/lib/scanner.js","src/lib/source-exts.js","src/lib/path-resolver.js","src/lib/parsers/typescript.js","src/lib/parsers/python.js","src/lib/frameworks/nextjs.js","src/commands/scan.js","tests/scanner.test.js"],"keywords":["scanRepo","detectLanguages","detectFrameworks","detectDomains","detectEntryPoints","health check","SOURCE_EXTS","SKIP_DIR_NAMES"]} |
You are working on aspens' repo scanning system — a fully deterministic analyzer (no LLM calls) that detects languages, frameworks, structure, domains, entry points, size, and health issues for any repository.
Scanning is the foundation every other command builds on. scanRepo() must produce stable, reproducible results from any repo on disk — even a freshly-cloned one with no manifests parsed yet — so doc init, doc sync, doc impact, and doc graph can decide what to generate, which target (Claude / Codex) is appropriate, and which domains warrant skills. Determinism is the contract: the same repo at the same commit must always produce the same scan.
{ path, name, languages[], frameworks[], structure, domains[], entryPoints[], hasClaudeConfig, hasClaudeMd, hasCodexConfig, hasAgentsMd, repoType, size, health } — order matters: repoType and health depend on prior fields.claude dir + CLAUDE.md (Claude Code) and .codex dir + AGENTS.md (Codex CLI) to inform target selection during doc initpackage.json, go.mod, Cargo.toml — not by scanning source extensionspackage.json deps, Python from requirements.txt/pyproject.toml/Pipfile, Go from go.mod contents, Ruby from GemfileSKIP_DIR_NAMES set (structural/build/IDE/.NET/Java/Rust build dirs), requires at least one source file via collectModules()mergeExtraDomains() — marked with userSpecified: true, resolved against source root then repo rootsrc, app, lib, server, pages via findSourceRoot(); for nested-project layouts (e.g. ~/apps/MyApp/MyApp/MyApp.csproj), if repo root has exactly one non-skip child with a project manifest, that child is promoted as the source root and excluded from domain scanning at repo root to avoid double-countingstat.size, walk capped at depth 5, skips bin/obj/target build output alongside node_modules/dist/etc.scanCommand builds graph by default (options.graph !== false); errors are caught and only logged with --verbose.gitignore checks for missing node_modules/, __pycache__/, target/, virtualenv dirs, and uncommitted .env files are gated on detected languagesSOURCE_EXTS (in src/lib/source-exts.js): .py, .ts, .js, .tsx, .jsx, .mjs, .cjs, .rb, .go, .rs, .java, .kt, .kts, .cs, .fs, .fsx, .swift, .php, .ex, .exs — adding a language requires updating this set AND the detectLanguages indicators. Import graph / hub / cluster detection remains JS/TS/Python-only; other languages get domain discovery but a minimal atlas.SKIP_DIR_NAMES: Includes src, app, bin, obj, dist, target, node_modules, etc. — skipped in domain detection. bin/obj/target added to avoid .NET/Java/Rust build artifacts.BOILERPLATE_STEMS: __init__, index, mod are excluded from module collection — don't add real module names heredetectLanguages() automatically adds JS to the languages arraybuildRepoGraph errors in scanCommand() are caught and silently ignored unless --verbosecreateFixture(name, files) pattern, always clean updetectEntryPoints is exported and reused by graph-builder.js — changing its signature breaks the graph builderes-module-lexer must be initialized: parseJsImports() awaits init before calling parse(). The lexer can fail on JSX-heavy files; the regex fallback in parsers/typescript.js is intentional graceful degradation, not dead code.app/, pages/, and middleware/instrumentation files are roots Next.js runs implicitly with no static importer.Last Updated: 2026-05-11