Repo analysis (LLM-aware)
Produce a high-signal repository analysis that a human can read quickly and use to drive implementation, debugging, and profiling.
Non-negotiables (requirements)
- The report must be actionable: it includes real paths and file:line pointers (not vague descriptions).
- If LLM-related, the report must separate prefill vs decode, and include KV cache + scheduler + sampling surfaces.
- No placeholder markers like
<...> may remain in tracked output.
Output locations (pkbllm convention)
- Tracked output:
$HUMAN_MATERIAL_PATH/research/<repo_slug>/repo_analysis.md
- Local clone (gitignored, configurable):
$HUMAN_MATERIAL_PATH/.references/repos/<repo_slug>/
Config precedence (repo overrides user):
$HUMAN_MATERIAL_PATH/.agents/config.toml
~/.agents/config.toml
Quick start
Initialize workspace + clone (if needed):
# Run from this skill directory (the folder containing this SKILL.md):
python scripts/init_repo_analysis.py https://github.com/vllm-project/vllm
This prints:
- local clone path
- report path
What to produce (repo_analysis.md)
Use the template at assets/repo_analysis_template.md and fill:
- TL;DR: what the repo is, who it’s for, why it’s interesting.
- Architecture map: a single diagram + a module table.
- Primary workflows:
- installation/build
- primary entrypoints (CLI/server/train)
- configuration surface
- Key components (with file paths + line numbers):
- runtime loop(s)
- state/data structures
- error handling + logging
- Extension points: where you would add a feature safely.
- Risks / pitfalls: things that will waste time.
LLM-specific deep dive (only if LLM-related)
First decide whether the repo is LLM-related using signals like:
- mentions of: prefill/decode, KV cache, paged attention, continuous batching, speculative decoding
- model families: llama/gpt/transformer
- serving surfaces: OpenAI-compatible server, tokenizer, sampling params
If it’s LLM-related, add these sections (template includes stubs):
- Prefill vs decode loop (pseudocode with the real loop nesting)
- KV cache: layout, paging, updates, eviction, memory accounting
- Scheduler/batching: queue, priorities, chunking, preemption
- Sampling/decoding: logits processing, temperature/top-p/top-k, repetition penalties
- Parallelism: tensor/pipeline/sequence parallel, comms hotspots
- Kernel hotspots: attention, GEMMs, layernorm, quantization paths
Recommended repo-reading commands
Use these patterns to locate the “real” implementation:
rg -n \"main\\(|if __name__ == '__main__'|typer\\.run|argparse\" .
rg -n \"prefill|decode|kv cache|scheduler|continuous batching|paged\" -S .
rg -n \"sample\\(|logits|temperature|top_p|top_k\" -S .
rg -n \"flash(attn|infer)|attention kernel|triton|cuda\" -S .
More query snippets:
Integration
Prerequisites / follow-ups:
- If you will run experiments or profiling, use
uv-hands-on-learning after this analysis.
- If you want to teach the repo’s internals, use
uv-tutorial-generator and base it on the analysis + hands-on results.
- If you add/change these workflows, run
uv-bootstrap-skill-linking to keep relationships consistent.
Review policy
Before calling a repo analysis “done”, use:
- Review checklist:
review.md
- Pitfalls list:
pitfalls.md
Subagent review gates (recommended)
If you have subagent tooling available, add two explicit review gates before calling it “done”:
- Gate 1 — Spec compliance: verify the analysis meets the “Non-negotiables” and matches the template expectations (no placeholders, real file:line pointers, LLM sections present when applicable).
- Gate 2 — Quality: verify the document is readable, actionable, and would let a second engineer run and extend the repo without guesswork.
Prompt templates:
- Gate 1:
reviewer-prompts/spec-compliance-reviewer.md
- Gate 2:
reviewer-prompts/quality-reviewer.md
Converted and distributed by TomeVault — claim your Tome and manage your conversions.
1---2name: uv-repo-analysis3description: Analyze a code repository to understand architecture, key components, data flow, and extension points. Use when onboarding to an unfamiliar repo, preparing a hands-on profiling session, or extracting LLM-specific implementation details (attention/KV cache/scheduler/decoding) after determining the repo is LLM-related. Use when this capability is needed.4---56# Repo analysis (LLM-aware)78Produce a high-signal repository analysis that a human can read quickly and use to drive implementation, debugging, and profiling.910## Non-negotiables (requirements)1112- The report must be actionable: it includes real paths and **file:line pointers** (not vague descriptions).13- If LLM-related, the report must separate **prefill vs decode**, and include KV cache + scheduler + sampling surfaces.14- No placeholder markers like `<...>` may remain in tracked output.1516## Output locations (pkbllm convention)1718- **Tracked output**: `$HUMAN_MATERIAL_PATH/research/<repo_slug>/repo_analysis.md`19- **Local clone** (gitignored, configurable): `$HUMAN_MATERIAL_PATH/.references/repos/<repo_slug>/`2021Config precedence (repo overrides user):221. `$HUMAN_MATERIAL_PATH/.agents/config.toml`232. `~/.agents/config.toml`2425## Quick start2627Initialize workspace + clone (if needed):2829```bash30# Run from this skill directory (the folder containing this SKILL.md):31python scripts/init_repo_analysis.py https://github.com/vllm-project/vllm32```3334This prints:35- local clone path36- report path3738## What to produce (`repo_analysis.md`)3940Use the template at `assets/repo_analysis_template.md` and fill:41421. **TL;DR**: what the repo is, who it’s for, why it’s interesting.432. **Architecture map**: a single diagram + a module table.443. **Primary workflows**:45 - installation/build46 - primary entrypoints (CLI/server/train)47 - configuration surface484. **Key components** (with file paths + line numbers):49 - runtime loop(s)50 - state/data structures51 - error handling + logging525. **Extension points**: where you would add a feature safely.536. **Risks / pitfalls**: things that will waste time.5455## LLM-specific deep dive (only if LLM-related)5657First decide whether the repo is LLM-related using signals like:58- mentions of: prefill/decode, KV cache, paged attention, continuous batching, speculative decoding59- model families: llama/gpt/transformer60- serving surfaces: OpenAI-compatible server, tokenizer, sampling params6162If it’s LLM-related, add these sections (template includes stubs):6364- **Prefill vs decode loop** (pseudocode with the real loop nesting)65- **KV cache**: layout, paging, updates, eviction, memory accounting66- **Scheduler/batching**: queue, priorities, chunking, preemption67- **Sampling/decoding**: logits processing, temperature/top-p/top-k, repetition penalties68- **Parallelism**: tensor/pipeline/sequence parallel, comms hotspots69- **Kernel hotspots**: attention, GEMMs, layernorm, quantization paths7071## Recommended repo-reading commands7273Use these patterns to locate the “real” implementation:7475```bash76rg -n \"main\\(|if __name__ == '__main__'|typer\\.run|argparse\" .77rg -n \"prefill|decode|kv cache|scheduler|continuous batching|paged\" -S .78rg -n \"sample\\(|logits|temperature|top_p|top_k\" -S .79rg -n \"flash(attn|infer)|attention kernel|triton|cuda\" -S .80```8182More query snippets:8384- `references/rg-queries.md`8586## Integration8788Prerequisites / follow-ups:89- If you will run experiments or profiling, use `uv-hands-on-learning` after this analysis.90- If you want to teach the repo’s internals, use `uv-tutorial-generator` and base it on the analysis + hands-on results.91- If you add/change these workflows, run `uv-bootstrap-skill-linking` to keep relationships consistent.9293## Review policy9495Before calling a repo analysis “done”, use:9697- Review checklist: `review.md`98- Pitfalls list: `pitfalls.md`99100### Subagent review gates (recommended)101102If you have subagent tooling available, add two explicit review gates before calling it “done”:1031041) **Gate 1 — Spec compliance**: verify the analysis meets the “Non-negotiables” and matches the template expectations (no placeholders, real file:line pointers, LLM sections present when applicable).1052) **Gate 2 — Quality**: verify the document is readable, actionable, and would let a second engineer run and extend the repo without guesswork.106107Prompt templates:108- Gate 1: `reviewer-prompts/spec-compliance-reviewer.md`109- Gate 2: `reviewer-prompts/quality-reviewer.md`110111---112> Converted and distributed by [TomeVault](https://tomevault.io/claim/uv-xiao) — claim your Tome and manage your conversions.113<!-- tomevault:4.0:skill_md:2026-04-16 -->