AgentSkillsCN

repo-map

快速梳理陌生的仓库:定位入口点、包边界、构建与测试配置,以及关键模块。当您需要快速上手某个仓库,或寻找代码的实际存放位置时,本指南将为您提供高效指引。

SKILL.md
--- frontmatter
name: repo-map
description: "Map an unfamiliar repo quickly: find entrypoints, package boundaries, build/test configs, and key modules. Use when onboarding to a repo or locating where code lives."

Repo Map

Overview

Build a short, accurate map of a repo's structure and entrypoints to reduce time-to-context.

Workflow

1) Find the root

  • Prefer directories with .git, package.json, pyproject.toml, or Makefile.
  • For monorepos, map the workspace root first.

2) Identify languages and frameworks

  • Scan for package.json, pyproject.toml, requirements.txt, go.mod, Cargo.toml.
  • Note frameworks via config files (tsconfig, nest-cli.json, next.config, etc.).

3) Locate entrypoints

  • For Node/TS: package.json scripts, src/index.*, app.ts, main.ts.
  • For Python: main.py, app.py, manage.py, FastAPI/Flask entry files.
  • For services: look for server start scripts or Docker entrypoints.

4) Identify key modules

  • Find feature directories, shared libs, and API layers.
  • Note tests and fixtures locations.

5) Summarize

  • Provide a concise map with key paths and notes.

Output template (adapt as needed)

  • Repo root
  • Languages/frameworks
  • Entrypoints
  • Key modules
  • Test locations