Agent skill

Repo Scanning

by aspenkit in aspenkit/aspens

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

MITAuto-check: notesAgent Workflows

Install Repo Scanning

skills CLI
$ npx skills add aspenkit/aspens --skill repo-scanning -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install aspenkit/aspens repo-scanning --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/aspenkit/aspens.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/repo-scanning .claude/skills/repo-scanning && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
repo-scanning
GitHub stars
102
Token cost
~1.3k tokens
SKILL.md length
557 words
Files
1
Skills in repo
12
Repo updated
First seen
Licence
MIT

At a glance

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

  • Agent Workflows work in your project
  • SKILL.md covers Domain purpose, Key Concepts and Critical Rules
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Repo Scanning is an agent skill from aspenkit/aspens. Deterministic repo analysis — language/framework detection, structure mapping, domain discovery, health checks, and import graph integration

Its SKILL.md is about 1.3k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Agent Workflows. The repository describes itself as: Your CLAUDE.md stopped working at 200 lines. Generate scoped skill files from your import graph, auto-sync on every commit. Claude Code, Codex and OpenCode. The licence is MIT.

When your agent uses it

  • Agent Workflows work in your project

Example prompts

  • “/repo-scanning”

Requirements

  • Python 3

What it can do on your machine

Read from SKILL.md and the folder at commit 8dde826. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Repo Scanning loads about 1.3k tokens when it runs. Until then it costs about 39 tokens; SKILL.md has 557 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~39
When it runs · the whole SKILL.md, loaded when a task matches
~1.3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NoteMentions a .env fileSKILL.md:40
    get/`, virtualenv dirs, and uncommitted `.env` files are gated on detected languages

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from aspenkit/aspens at commit 8dde826, republished under its MIT licence (© aspenkit). 557 words, ~1,286 tokens.

Download SKILL.mdSave it as .claude/skills/repo-scanning/SKILL.md (or your agent's skills folder).
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…
triggers.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.

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
Show full SKILL.md (218 more words)Show less

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

© aspenkit, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/repo-scanning of aspenkit/aspens.

Open the folder on GitHubat commit 8dde826

Compare with similar skills

Repo Scanning next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Repo Scanning compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Repo Scanning this skillaspenkit/aspens102—~1.3kAutomated safety check: NotesMIT
MCP Server Builderanthropics/skills180k63 repos~2.3kAutomated safety check: PassApache-2.0
Hook Development for Claude Code Pluginsanthropics/claude-plugins-official38k10 repos~4.1kAutomated safety check: NotesApache-2.0
Using Superpowersfarm-fe/farm5.6k35 repos~1.4kAutomated safety check: PassMIT
Executing Plans Inlineobra/superpowers297k2 repos~5.1kAutomated safety check: PassMIT
Skill CreatorAzure/azqr79689 repos~8.2kAutomated safety check: PassApache-2.0

Similar skills

  • MCP Server Builder

    anthropics/skills

    Official

    Guides the design and implementation of Model Context Protocol servers in TypeScript or Python, from tool naming and error messages to evaluation.

    180k GitHub starsUsed in 63 repos~2.3k tokens
    Agent WorkflowsAuto-check passed
  • Hook Development for Claude Code Plugins

    anthropics/claude-plugins-official

    Official

    Explains how to write Claude Code plugin hooks, both prompt-based checks and bash commands, for events such as PreToolUse, Stop and SessionStart.

    38k GitHub starsUsed in 10 repos~4.1k tokens
    Agent WorkflowsAuto-check: notes
  • Using Superpowers

    farm-fe/farm

    A skill your agent uses when starting any conversation - establishes how to find and use skills, requiring Skill tool invocation before ANY response including clarifying questions

    5.6k GitHub starsUsed in 35 repos~1.4k tokens
    Agent WorkflowsAuto-check passed
  • Executing Plans Inline

    obra/superpowers

    Has the agent carry out an implementation plan itself, task by task in the current session, keeping a ledger, proving each step with a test and ending with one whole-branch review.

    297k GitHub starsUsed in 2 repos~5.1k tokens
    Agent WorkflowsAuto-check passed
  • Skill Creator

    Azure/azqr

    Official

    Create new skills, modify and improve existing skills, and measure skill performance.

    796 GitHub starsUsed in 89 repos~8.2k tokens
    Agent WorkflowsAuto-check passed
  • Claude Code Agent Development

    anthropics/claude-plugins-official

    Official

    Explains how to write agents for Claude Code plugins: the markdown file with YAML frontmatter, trigger descriptions, model and color settings, and system prompt design.

    38k GitHub starsUsed in 7 repos~2.8k tokens
    Agent WorkflowsAuto-check passed

More from aspenkit/aspens

All 12 skills in this repo
  • Injects a project's own skills and AGENTS.md content into generic bundled agent template files, adding a tech-stack line and real conventions without touching an agent's core logic.

    102 GitHub stars~898 tokensUpdated 27 days ago
    Auto-check passed
  • Orientation to the aspens codebase for agents working on the CLI itself: its Node.js stack, commands, module layout and debug settings.

    102 GitHub stars~1.6k tokensUpdated 27 days ago
    Auto-check passed
  • Aspens CLI Shell

    aspenkit/aspens

    Project context for the aspens CLI entry point: Commander wiring, the welcome screen, missing-hook warnings, CliError exit handling and the public programmatic exports.

    102 GitHub stars~1.1k tokensUpdated 27 days ago
    Auto-check passed
  • Explains how the aspens generator routes output to Claude Code or Codex CLI targets and transforms generated skills and instruction files between their formats.

    102 GitHub stars~1.9k tokensUpdated 27 days ago
    Auto-check passed
  • Doc Impact

    aspenkit/aspens

    Context health analysis — freshness, domain coverage, hub surfacing, drift detection, LLM-powered interpretation, and auto-repair for generated agent context

    102 GitHub stars~1.3k tokensUpdated 27 days ago
    Auto-check passed
  • Doc Sync

    aspenkit/aspens

    Incremental skill updater that maps git diffs to affected skills and optionally auto-syncs via a post-commit hook

    102 GitHub stars~1.8k tokensUpdated 27 days ago
    Auto-check passed

Categories

Questions about Repo Scanning

What does Repo Scanning do?

Deterministic repo analysis — language/framework detection, structure mapping, domain discovery, health checks, and import graph integration. Repo Scanning is an agent skill from aspenkit/aspens.

When should I use Repo Scanning?

Repo Scanning fits situations like: agent Workflows work in your project.

How do I install Repo Scanning in Claude Code?

Run `npx skills add aspenkit/aspens --skill repo-scanning -a claude-code`. Or copy the skill folder (.agents/skills/repo-scanning in aspenkit/aspens) into .claude/skills/repo-scanning in your project. Claude Code loads it when a task matches its description.

How do I install Repo Scanning in Codex?

Run `npx skills add aspenkit/aspens --skill repo-scanning -a codex`. Or copy the skill folder (.agents/skills/repo-scanning in aspenkit/aspens) into .agents/skills/repo-scanning in your project. Codex loads it when a task matches its description.

Can I use Repo Scanning in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add aspenkit/aspens --skill repo-scanning -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/repo-scanning, .gemini/skills/repo-scanning, .github/skills/repo-scanning and .opencode/skills/repo-scanning in your project.

What does Repo Scanning need to run?

SKILL.md names no scripts, command-line tools or credentials: Repo Scanning is instructions for the agent only. Our summary lists: Python 3.

Does Repo Scanning access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Repo Scanning safe to install?

Our automated static check of SKILL.md found notes only (mentions a .env file), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Repo Scanning use?

Repo Scanning is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Repo Scanning use?

About 1.3k tokens (SKILL.md is roughly 5.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Repo Scanning?

Skills that share tags, products or a category with Repo Scanning: MCP Server Builder (anthropics/skills, 180k stars), Hook Development for Claude Code Plugins (anthropics/claude-plugins-official, 38k stars), Using Superpowers (farm-fe/farm, 5.6k stars) and Executing Plans Inline (obra/superpowers, 297k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Repo Scanning?

aspenkit (a GitHub organization) maintains it in aspenkit/aspens, which has 102 GitHub stars. The repository holds 12 skills in this directory. The repository was last updated on September 12, 2026.

Source: aspenkit/aspens on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.