New to Claude Skills? Learn how to install them →

alirezarezvani on GitHub

Code Tour

Free

Create structured code walkthroughs for better onboarding.

Get this skill

Free · Opens the source repo

What Code Tour does

Code Tour is a specialized skill designed to help developers create .tour files that provide step-by-step walkthroughs of a codebase. These tours are targeted at specific personas, making it easier for users to understand the structure and purpose of the code they are working with. By linking directly to files and line numbers, Code Tour facilitates a clear narrative that guides users through complex codebases, enhancing their onboarding experience and overall productivity.

The skill operates by first discovering the repository, where it analyzes the code structure and identifies key entry points. It then infers the user's intent based on their request, allowing it to tailor the depth and focus of the tour to the appropriate persona, whether that's a new joiner, a PR reviewer, or a security auditor. Each tour is crafted using verified file paths and line numbers, ensuring accuracy and reliability in the walkthrough.

Code Tour is particularly useful in scenarios such as onboarding new team members, providing architectural overviews, conducting PR reviews, or explaining specific functionalities within the code. By structuring the information in a narrative format, it helps users grasp not just the 'how' but also the 'why' behind the code, making it a valuable tool for both developers and designers.

This skill is ideal for teams looking to improve knowledge transfer and reduce the learning curve for new contributors. It empowers users to create comprehensive guides that enhance collaboration and understanding within the development process, ultimately leading to a more efficient workflow.

When to use it

Use this skill when you need to create a CodeTour for onboarding, PR reviews, or any structured code walkthrough request.

When not to use it

This skill is not suitable for creating tours for codebases with fewer than five source files, as it is designed for more complex projects.

What you can build with it

Onboarding New Developers

Create a structured tour for new team members to help them quickly understand the codebase and its architecture.

Conducting PR Reviews

Generate a tour that highlights the changes in a pull request, making it easier for reviewers to assess the impact.

Explaining Complex Features

Develop a detailed walkthrough of a specific feature, linking to relevant files and lines to clarify functionality.

How to install Code Tour

View source

1. Install with the skills CLI

npx skills add alirezarezvani/claude-skills/code-tour --agent claude-code

2. Or install it manually

Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.

Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs

Inside SKILL.md

Written by alirezarezvani

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.

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 saysPersonaDepth
"tour for this PR"pr-reviewerstandard
"why did X break" / "RCA"rca-investigatorstandard
"onboarding" / "new joiner"new-joinerstandard
"quick tour" / "vibe check"vibecoderquick
"architecture"architectdeep
"security" / "auth review"security-reviewerstandard
(no qualifier)new-joinerstandard

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.

{
  "$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

TypeWhen to useExample
ContentIntro/closing only (max 2){ "title": "Welcome", "description": "..." }
DirectoryOrient to a module{ "directory": "src/services", "title": "..." }
File + lineThe workhorse{ "file": "src/auth.ts", "line": 42, "title": "..." }
SelectionHighlight a code block{ "file": "...", "selection": {...}, "title": "..." }
PatternRegex match (volatile files){ "file": "...", "pattern": "class App", "title": "..." }
URILink to PR, issue, doc{ "uri": "https://...", "title": "..." }

Step count

DepthStepsUse for
Quick5-8Vibecoder, fast exploration
Standard9-13Most personas
Deep14-18Architect, 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 or directory anchor
  • At most 2 content-only steps
  • nextTour matches another tour's title exactly if set

Personas

PersonaGoalMust cover
VibecoderGet the vibe fastEntry point, main modules. Max 8 steps.
New joinerStructured ramp-upDirectories, setup, business context
Bug fixerRoot cause fastTrigger -> fault points -> tests
RCA investigatorWhy did it failCausality chain, observability anchors
Feature explainerEnd-to-endUI -> API -> backend -> storage
PR reviewerReview correctlyChange story, invariants, risky areas
ArchitectShape and rationaleBoundaries, tradeoffs, extension points
Security reviewerTrust boundariesAuth flow, validation, secret handling
RefactorerSafe restructuringSeams, hidden deps, extraction order
External contributorContribute safelySafe areas, conventions, landmines

Narrative Arc

  1. Orientationfile or directory step (never content-only first step — blank in VS Code)
  2. High-level map — 1-3 directory steps showing major modules
  3. Core path — file/line steps, the heart of the tour
  4. Closing — what the reader can now do, suggested follow-ups

Anti-Patterns

Anti-patternFix
File listing — "this file contains the models"Tell a story. Each step depends on the previous.
Generic descriptionsName the specific pattern unique to this codebase.
Line number guessingNever write a line you didn't verify by reading.
Too many steps for quick depthActually cut steps.
Hallucinated filesIf it doesn't exist, skip the step.
Recap closing — "we covered X, Y, Z"Tell the reader what they can now do.
Content-only first stepAnchor step 1 to a file or directory.

Cross-References

  • Related: engineering/codebase-onboarding — for broader onboarding beyond tours
  • Related: engineering/pr-review-expert — for automated PR review workflows
  • CodeTour extension: microsoft/codetour
  • Real-world tours: coder/code-server

Frequently asked questions about Code Tour

Similar skills