
Code Tour
Generate VS Code CodeTour `.tour` walkthroughs anchored to real files and lines for onboarding, reviews, and investigations.
Overview
code-tour is an agent skill most often used in Build (also Ship, Operate) that authors persona-targeted VS Code CodeTour files linked to real code locations.
Install
npx skills add https://github.com/alirezarezvani/claude-skills --skill code-tourWhat is this skill?
- Produces only CodeTour JSON under `.tours/`—never edits application source
- Persona-targeted narratives with real file paths and line anchors
- Supports onboarding, architecture, PR review, vibe check, security, and RCA tour styles
- Core workflow: discover repo in parallel, map entry points, then author steps
- Compatible with the Microsoft VS Code CodeTour extension playback UX
- Core workflow includes parallel repo discovery: root listing, README, and config reads before authoring steps
Adoption & trust: 512 installs on skills.sh; 17.5k GitHub stars; 3/3 security scanners passed (skills.sh audits).
What problem does it solve?
New contributors—or future you—cannot see how the codebase fits together without hours of unstructured grep and chat explanations.
Who is it for?
Solo builders open-sourcing a repo, handing off to a contractor, or documenting a tricky subsystem with line-accurate anchors.
Skip if: Projects that do not use VS Code/CodeTour, or when you need executable refactors instead of read-only guided commentary.
When should I use this skill?
User asks to create a CodeTour, onboarding tour, architecture tour, PR review tour, vibe check, RCA tour, contributor guide, or structured code walkthrough.
What do I get? / Deliverables
You get a validated `.tour` narrative under `.tours/` that plays step-by-step in VS Code without risky source edits.
- One or more `.tour` JSON files under `.tours/`
- Step narratives with verified file paths and line references
Recommended Skills
Journey fit
Spans multiple journey phases - primary shelf plus alternate fits below.
Canonical shelf is Build because the primary artifact is contributor-facing documentation that accelerates implementation in an unfamiliar repo. Docs subphase fits structured onboarding tours, architecture narratives, and contributor guides stored under `.tours/`.
Where it fits
Author a first-week onboarding tour from README through main entry points.
Explain how billing and webhooks connect for a contractor before they touch payments code.
Turn a large PR into a ordered tour highlighting risky diffs and test hooks.
Build an RCA tour that follows the failure path from log handler to retry logic.
How it compares
Use instead of long Markdown architecture docs when reviewers need clickable, in-editor progression through the tree.
Common Questions / FAQ
Who is code-tour for?
Indie developers and small teams who want onboarding and review stories that live beside the repo and play inside VS Code.
When should I use code-tour?
During Build for onboarding and architecture docs, during Ship for PR or security review tours, and during Operate for RCA or bug investigation walkthroughs.
Is code-tour safe to install?
The skill is designed to write tour JSON only; still review the Security Audits panel on this page and inspect generated `.tours/` files before sharing publicly.
SKILL.md
READMESKILL.md - Code Tour
# Code Tour Create **CodeTour** files — persona-targeted, step-by-step walkthroughs of a codebase that link directly to files and line numbers. CodeTour files live in `.tours/` and work with the [VS Code CodeTour extension](https://github.com/microsoft/codetour). ## Overview A great tour is a **narrative** — a story told to a specific person about what matters, why it matters, and what to do next. Only create `.tour` JSON files. Never modify source code. ## When to Use This Skill - User asks to create a code tour, onboarding tour, or architecture walkthrough - User says "tour for this PR", "explain how X works", "vibe check", "RCA tour" - User wants a contributor guide, security review, or bug investigation walkthrough - Any request for a structured walkthrough with file/line anchors ## Core Workflow ### 1. Discover the repo Before asking anything, explore the codebase: In parallel: list root directory, read README, check config files. Then: identify language(s), framework(s), project purpose. Map folder structure 1-2 levels deep. Find entry points — every path in the tour must be real. If the repo has fewer than 5 source files, create a quick-depth tour regardless of persona — there's not enough to warrant a deep one. ### 2. Infer the intent One message should be enough. Infer persona, depth, and focus silently. | User says | Persona | Depth | |-----------|---------|-------| | "tour for this PR" | pr-reviewer | standard | | "why did X break" / "RCA" | rca-investigator | standard | | "onboarding" / "new joiner" | new-joiner | standard | | "quick tour" / "vibe check" | vibecoder | quick | | "architecture" | architect | deep | | "security" / "auth review" | security-reviewer | standard | | (no qualifier) | new-joiner | standard | When intent is ambiguous, default to **new-joiner** persona at **standard** depth — it's the most generally useful. ### 3. Read actual files **Every file path and line number must be verified.** A tour pointing to the wrong line is worse than no tour. ### 4. Write the tour Save to `.tours/<persona>-<focus>.tour`. ```json { "$schema": "https://aka.ms/codetour-schema", "title": "Descriptive Title — Persona / Goal", "description": "Who this is for and what they'll understand after.", "ref": "<current-branch-or-commit>", "steps": [] } ``` ### Step types | Type | When to use | Example | |------|-------------|---------| | **Content** | Intro/closing only (max 2) | `{ "title": "Welcome", "description": "..." }` | | **Directory** | Orient to a module | `{ "directory": "src/services", "title": "..." }` | | **File + line** | The workhorse | `{ "file": "src/auth.ts", "line": 42, "title": "..." }` | | **Selection** | Highlight a code block | `{ "file": "...", "selection": {...}, "title": "..." }` | | **Pattern** | Regex match (volatile files) | `{ "file": "...", "pattern": "class App", "title": "..." }` | | **URI** | Link to PR, issue, doc | `{ "uri": "https://...", "title": "..." }` | ### Step count | Depth | Steps | Use for | |-------|-------|---------| | Quick | 5-8 | Vibecoder, fast exploration | | Standard | 9-13 | Most personas | | Deep | 14-18 | Architect, RCA | ### Writing descriptions — SMIG formula - **S — Situation**: What is the reader looking at? - **M — Mechanism**: How does this code work? - **I — Implication**: Why does this matter for this persona? - **G — Gotcha**: What would a smart person get wrong? ### 5. Validate - [ ] Every `file` path relative to repo root (no leading `/` or `./`) - [ ] Every `file` confirmed to exist - [ ] Every `line` verified by reading the file - [ ] First step has `file