Repo Scanning logo

Repo Scanning

Organization
aspenkit
repo-scanning

Deterministic repo analysis — language/framework detection, structure mapping, domain discovery, health checks, and import graph integration

Overview

Publisheraspenkit
Repositoryaspens
Skill namerepo-scanning
Stars
102
Forks
7
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by aspenkit on GitHub. Read the source before you install it.

Installation

Install the Repo Scanning AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/aspenkit/aspens/tree/main/.agents/skills/repo-scanning
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/aspenkit/aspens.git /tmp/aspens
mkdir -p .claude/skills
cp -r /tmp/aspens/.agents/skills/repo-scanning .claude/skills/repo-scanning
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Repo Scanning in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Repo Scanning on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Repo Scanning is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

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.

Domain purpose

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.

Key Concepts

  • scanRepo() return shape: { path, name, languages[], frameworks[], structure, domains[], entryPoints[], hasClaudeConfig, hasClaudeMd, hasCodexConfig, hasAgentsMd, repoType, size, health } — order matters: repoType and health depend on prior fields
  • Multi-target detection: Scanner checks for both .claude dir + AGENTS.md (Claude Code) and .codex dir + AGENTS.md (Codex CLI) to inform target selection during doc init
  • Detection via marker files: Languages detected by presence of files like package.json, go.mod, Cargo.toml — not by scanning source extensions
  • Framework detection: JS/TS from package.json deps, Python from requirements.txt/pyproject.toml/Pipfile, Go from go.mod contents, Ruby from Gemfile
  • Domain detection: Scans dirs under source root + repo root, skips SKIP_DIR_NAMES set (structural/build/IDE/.NET/Java/Rust build dirs), requires at least one source file via collectModules()
  • extraDomains: User-specified domains merged via mergeExtraDomains() — marked with userSpecified: true, resolved against source root then repo root
  • Source root: First match of src, 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-counting
  • Size estimation: Lines estimated at ~40 bytes/line from stat.size, walk capped at depth 5, skips bin/obj/target build output alongside node_modules/dist/etc.
  • Graph is opt-out: scanCommand builds graph by default (options.graph !== false); errors are caught and only logged with --verbose
  • Health checks are language-aware: .gitignore checks for missing node_modules/, __pycache__/, target/, virtualenv dirs, and uncommitted .env files are gated on detected languages

Critical Rules

  • SOURCE_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 here
  • TypeScript implies JavaScript: TS detection in detectLanguages() automatically adds JS to the languages array
  • Graph failure is non-fatal: buildRepoGraph errors in scanCommand() are caught and silently ignored unless --verbose
  • Tests use real filesystem fixtures, not mocks — create fixtures with createFixture(name, files) pattern, always clean up
  • detectEntryPoints is exported and reused by graph-builder.js — changing its signature breaks the graph builder
  • es-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.
  • Python parser skips SCREAMING_SNAKE constants by design — they produced false positives in code-map; do not re-add them.
  • Next.js entry points feed the import-graph priority ranker — app/, pages/, and middleware/instrumentation files are roots Next.js runs implicitly with no static importer.

Last Updated: 2026-05-11

Frequently asked questions

What does the Repo Scanning AI skill do?

Deterministic repo analysis — language/framework detection, structure mapping, domain discovery, health checks, and import graph integration

Why use Repo Scanning on TypingMind?

Because you install it once and use it with any model. Repo Scanning is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Repo Scanning in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/aspenkit/aspens/tree/main/.agents/skills/repo-scanning. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Repo Scanning?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Repo Scanning?

As many as you like. As long as a model supports skills, you can use Repo Scanning with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Repo Scanning AI skill free?

Yes. It is published on GitHub by aspenkit under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇