md-code-tour
Skill0 starsChanged 56 days agoMITView on GitHub
Explore a codebase and produce TWO complementary artifacts — a navigable Markdown document (note-centric reading) and a `.tour` file (code-centric navigation in Neovim via codetour.lua). Always output both files for the same conceptual tour.
In this repository7 other files it gives its agents.
- AGENTS.mdAGENTS.md
- ankifySkill
- anki-refineSkill
- code-kataSkill
- grill-meSkill
- newsletterSkill
- task-assessorSkill
The file
We split this skill into the rules it gives an agent
10 rules. About 0 are common, 4 are distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 25
Always use paths relative to the repo root:
- Very specific: line 110
Start with [N/Total] Short title so the one-line preview in the quickfix window is useful.
- Very specific: line 111
Add a blank line (\n\n) before the detailed explanation.
- Very specific: line 112
Use \n\n for paragraph breaks, \n for line breaks within a paragraph.
- Distinctive: line 114
No need to repeat the file/line — the panel header shows it.
- Distinctive: line 121
Understand the scope: ask what logic to document (feature, data flow, refactor, etc.)
- Distinctive: line 122
Explore the codebase: read relevant files, find exact line numbers
- Very specific: line 127
Output: place both files next to each other — <name>.md and <name>.json, same basename, no suffix variation
- Very specific: line 161
Every file:line (in both .md and .json) must be accurate — verify by reading the file before writing, never estimate.
- Very specific: line 163
Keep inline snippets in .md minimal — only lines needed to understand the point.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
md-code-tour
Generate two files that support two reading modes for the same codebase tour:
- Note-centric (
<name>.md): prose-first document withfile:linereferences, jumpable viagFin Neovim. - Code-centric (
<name>.tour): JSON content,.tourextension. Loaded into Neovim's quickfix + description panel via:TourLoad; also natively supported by VS Code codetour extension.
The two files must share the exact same basename — :TourLoad auto-detects <stem>.tour from the open <stem>.md buffer.
Naming rule
Tour filename = MD filename with .md replaced by .tour. Example: llm-walkthrough.md → llm-walkthrough.tour.
Output 1 — Markdown document (<name>.md)
File references
Always use paths relative to the repo root:
`optimum/exporters/openvino/model_configs.py:1738`Jumpable with Neovim gF (cursor on path, press gF) or gf with vim-gf-file-line.
Document structure
# <Title>
Brief one-paragraph overview of what this document covers and why it matters.
> **Navigation tip**: place cursor on any `file:line` reference and press `gF` to jump.
> For step-by-step code navigation: `:TourLoad` then `]q` / `[q`.
---
## Overview table (optional)
| File | What changes / why it matters |
| ----------------- | ----------------------------- |
| `path/to/file.py` | ... |
---
## Step N: <Name>
**File**: `path/to/file.py:LINE`
Prose explanation of _why_ this step exists and what problem it solves.
```python
# Inline snippet: only the key lines, not the whole function
def key_function(...):
return something_interesting
```
Optional: comparison table, edge-case note, "why not X?" callout.Output 2 — Tour JSON (<name>.tour.json)
Format
{
"title": "Feature X: implementation walkthrough",
"description": "How Feature X is implemented across the codebase, in the order a reader would trace the data flow.",
"steps": [
{
"file": "src/core/processor.py",
"line": 42,
"description": "**[1/3] Entry point — where the request arrives**\n\n`process()` is the top-level function. It validates the input, delegates to the subsystem, and returns the result. This is the right place to start reading."
},
{
"file": "src/subsystem/handler.py",
"line": 10,
"description": "**[2/3] Core logic — the main transformation**\n\n`handle()` does the heavy lifting. It takes the validated input from step 1, applies the transformation, and produces an intermediate result that step 3 will consume."
},
{
"file": "src/output/formatter.py",
"line": 88,
"description": "**[3/3] Output — format and return**\n\n`format_result()` converts the intermediate result into the final output shape. Note the special handling for edge cases on line 95 — this is where most bugs have historically appeared."
}
]
}Field rules
| Field | Required | Notes |
title | yes | Short name shown in quickfix title bar |
description | recommended | Top-level tour summary (shown in quickfix title, can be multiline) |
steps[].file | yes | Path relative to repo root (Neovim always launched from root) |
steps[].line | yes | 1-based line number; verify accuracy before writing |
steps[].description | yes | Full description; supports markdown (**bold**, \n\n paragraphs); displayed in the persistent description panel |
Step description style
- Start with
**[N/Total] Short title**so the one-line preview in the quickfix window is useful. - Add a blank line (
\n\n) before the detailed explanation. - Use
\n\nfor paragraph breaks,\nfor line breaks within a paragraph. - Inline code: backticks (
`symbol`). - No need to repeat the file/line — the panel header shows it.
- Never use bare ASCII double quotes
"inside description strings. They break JSON parsing. Use curly quotes"..."(U+201C/U+201D), corner brackets「...」, or escape as\". Backticks are preferred for quoting terms inline anyway.
Workflow
- Understand the scope: ask what logic to document (feature, data flow, refactor, etc.)
- Explore the codebase: read relevant files, find exact line numbers
- Identify the narrative: structure around questions the reader has, not file names
- Draft the steps: decide the ordered list of (file, line) waypoints
- Write both files simultaneously: prose for
.md, description strings for.json - Verify all line numbers: grep or read each file to confirm accuracy before writing
- Output: place both files next to each other —
<name>.mdand<name>.json, same basename, no suffix variation
Neovim integration (codetour.lua)
Bundled at codetour.lua in this skill's directory. Copy it into your Neovim config (e.g. ~/.config/nvim/lua/codetour.lua) and require it from your init.
:TourLoad — auto-detect <stem>.tour from current .md buffer
:TourLoad path/to/t.json — explicit load
]q / [q — next / prev step (existing quickfix keymaps)
Enter on qf line — jump to any step directly
:cc N — jump to step N by numberLayout when a tour is active:
┌──────────────────────────┐
│ code window (main) │
├──────────────────────────┤
│ description (B) │ ← full step description, always visible
├──────────────────────────┤
│ quickfix (A) │ ← all steps overview; Enter to jump to any step
└──────────────────────────┘Navigation is driven by the standard quickfix machinery. ]q/[q move through the list; codetour hooks QuickFixCmdPost to auto-update the description panel. No separate tour-specific keymaps needed.
Quality rules
- Every
file:line(in both.mdand.json) must be accurate — verify by reading the file before writing, never estimate. - Step descriptions must explain why, not just restate what the code does.
- Keep inline snippets in
.mdminimal — only lines needed to understand the point. - Sections / steps should answer questions the reader has, not mirror file structure.
- Explanation prose in
.mdgoes before the code fence, never as comments inside it. - Snippets must be verbatim excerpts — do not paraphrase or simplify the source.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

