agentsclimarketplace

Repo indexer

Skill jyshnkr/repo-indexer/skills/repo-indexer

Indexes and documents a codebase for persistent Claude context with minimal token overhead. Use when asked to index a repo, understand a codebase, create CLAUDE.md, set up Claude memory, bootstrap context, onboard to a project, or document codebase for Claude. Triggers on phrases like "index this repo", "understand this codebase", "set up context", "create project memory", "help me onboard". Creates tiered memory system using Claude native memory + minimal boot files + on-demand loading + conversation history as knowledge store. Do NOT use for general code questions, debugging, or tasks unrelated to codebase indexing/documentation.From its SKILL.md

Install
npx -y skills add jyshnkr/repo-indexer --skill repo-indexer

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • 3 stars3 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
  • runs commandsInstructs the agent to run 3 commands, including `python3 scripts/detect-repo-type.py "$ARGUMENTS"` and 2 more.

What its file declares

Copied from the file, not written here

The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.

SKILL.md

4.9 KB, ~1.1k tokens by cl100k_base, as published. Nobody here has run it

Repo Indexer

Indexes codebases with minimal context window overhead using tiered memory.

Getting Started

Prerequisites: Python 3.9+. Run from the project root directory.

Memory Architecture

L0: Claude Native Memory  → repo roster, patterns (~100 tokens, auto)
L1: CLAUDE.md             → boot loader only (<500 tokens, auto-load)
L2: .claude/memory/*.md   → deep context (on-demand, explicit load)
L3: Conversation History  → full analysis (searchable, 0 cost until used)

Token budgets: Native Memory ~100–300 | CLAUDE.md <500 | memory/*.md <10,000 total | Past chats: 0 until searched

L2 file loading guide: Architecture decisions → architecture.md | Code style → conventions.md | Unknown terms → glossary.md

Task Progress

Use TodoWrite to track each phase dynamically:

  • Phase 1: Detect repo type
  • Phase 2: Analyze codebase (9 areas)
  • Phase 3: Generate output files
  • Phase 4: Validate token budgets
  • Phase 5: Suggest memory update

Workflow

Phase 1: Detect Repo Type

python3 scripts/detect-repo-type.py "$ARGUMENTS"

Phase 2: Index

Analyze systematically:

  1. Config: package.json, pyproject.toml, Cargo.toml, go.mod
  2. Entry points: main files, CLI, server bootstrap
  3. Structure: directory layout to depth 3
  4. Core modules: business logic, services, models
  5. API surface: routes, endpoints, schemas
  6. Data layer: models, migrations, ORM
  7. External deps: third-party integrations
  8. Build/deploy: Dockerfile, CI/CD, Makefile
  9. Tests: structure, fixtures, patterns

Before generating files, present the proposed .claude/ structure to the user for confirmation.

Phase 3: Generate Output

Output to conversation (L3):

Full analysis using format in references/templates.md → "Indexing Output Format". Include ### SEARCH KEYWORDS for retrieval.

Select CLAUDE.md template by repo type:

Use the type-specific variant from references/templates.md:

  • Monorepo → "CLAUDE.md — Monorepo variant" (packages list, workspace commands)
  • Library → "CLAUDE.md — Library variant" (public API section, publish commands)
  • Microservices → "CLAUDE.md — Microservices variant" (services table, compose commands)
  • Single App → base "CLAUDE.md" template

Create files:

.claude/
├── memory/
│   ├── architecture.md   # From references/templates.md
│   ├── conventions.md
│   └── glossary.md
├── plans/                # Empty, user-managed
└── checkpoints/          # Empty, user-managed

CLAUDE.md                 # At repo root, <500 tokens

Phase 4: Validate

python3 scripts/estimate-tokens.py

Must pass: CLAUDE.md < 500 tokens, all memory files within budget.

If validation fails:

  1. Move content from CLAUDE.md to .claude/memory/ files
  2. Re-run scripts/estimate-tokens.py
  3. Repeat until all files pass their budget

Phase 5: Memory Update

python3 scripts/generate-memory-update.py

Suggest user add to Claude's native memory:

Repo: {name} | Type: {type} | Stack: {stack}
{name} indexed {date} | Key: {modules}

Examples

User: "Index this repo"

  1. Run detect-repo-type.py (Phase 1)
  2. Analyze all 9 areas (Phase 2)
  3. Output full analysis to conversation + create .claude/ structure (Phase 3)
  4. Validate token budgets (Phase 4)
  5. Suggest native memory update (Phase 5)

User: "Help me understand this codebase"

  1. Check Claude memory for prior indexing
  2. Search past chats: "{repo-name} architecture"
  3. If not found: run full indexing workflow

If .claude/ Exists

  1. Load existing files
  2. Compare with current codebase
  3. Flag inconsistencies
  4. Update incrementally
  5. Preserve <!-- USER --> sections

Error Handling

Common issues:

  • Python version error → requires Python 3.9+: python3 --version or which python3

Critical Rules

  • CLAUDE.md hard limit: 500 tokens
  • Full analysis goes in conversation, not files
  • Files are pointers, not stores
  • Always suggest native memory update
  • Include search keywords in output

What ships with it: 4 files

20.9 KB alongside SKILL.md, 3 of them executable

references/

Gives 0 of the 12 instructions most docs writing skills give in ~1.1k tokens

Counted across 1,951 of the 3,904 authors here whose files we hold, read 2026-09-06

  • Use third-person for skill descriptionsin 54 of 1951, across 35 files
  • Start descriptions with Use whenin 43 of 1951, across 29 files
  • Run baseline scenarios before writing any skillin 40 of 1951, across 26 files
  • Use active voicein 40 of 1951, across 36 files
  • Map file responsibilities before defining tasksin 36 of 1951, across 29 files
  • Use checkbox syntax for tracking stepsin 35 of 1951, across 27 files
  • Ask one question at a timein 35 of 1951
  • Offer execution options after saving the planin 33 of 1951, across 24 files
  • Include complete code in every stepin 33 of 1951, across 27 files
  • Design units with clear boundaries and interfacesin 31 of 1951, across 23 files
  • Announce the skill usage at the startin 30 of 1951
  • Verify agent compliance after adding the skillin 29 of 1951, across 17 files

Said here and by no other author read

  • Run from the project root directory
  • Analyze codebase across nine defined areas
  • Keep CLAUDE.md under five hundred tokens
  • Include search keywords in output
  • Validate token budgets for all files
  • Suggest native memory update

Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.