Agent skill

Code Tour

by borghei in borghei/Claude-Skills

Build ordered, annotated tours of an unfamiliar codebase and keep the anchors from rotting.

MITAuto-check passedDevelopment

Install Code Tour

skills CLI
$ npx skills add borghei/Claude-Skills --skill code-tour -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install borghei/Claude-Skills code-tour --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/borghei/Claude-Skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/engineering/code-tour .claude/skills/code-tour && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
code-tour
GitHub stars
881
Token cost
~3.1k tokens
SKILL.md length
1,820 words
Files
8 (incl. scripts, references, assets)
Skills in repo
349
Repo updated
First seen
Licence
MIT

At a glance

Build ordered, annotated tours of an unfamiliar codebase and keep the anchors from rotting.

  • Works in 4 steps: Run the analyzer against the repo root,… → Read the ranked candidates. Entry points… → Cut ruthlessly. Any candidate you cannot… → …
  • Onboarding an engineer
  • SKILL.md covers When to use this skill, Inputs the skill expects, Clarify First and Workflows, plus 3 more sections
  • Runs Python scripts from its folder; calls python3

What it does

Code Tour is an agent skill from borghei/Claude-Skills. Build ordered, annotated tours of an unfamiliar codebase and keep the anchors from rotting. Use when onboarding an engineer, handing off a service, or explaining a subsystem before a review.

Its SKILL.md is about 3.1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 10 other files, including scripts, reference files and assets (for example `assets/sample_tour.json`, `assets/tour-template.json` and `references/tour-construction.md`).

It sits in Development, covering Codebase onboarding. The repository describes itself as: 385 AI skills, 77 expert agents, and 900 stdlib Python tools for every team: engineering, PM, marketing, C-level, compliance, business ops, research, and a LinkedIn toolkit… The licence is MIT.

When your agent uses it

  • Onboarding an engineer
  • Handing off a service
  • Explaining a subsystem before a review

Example prompts

  • “/code-tour”

Requirements

  • Python 3

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Run the analyzer against the repo root, excluding vendored and generated directories.
  2. Read the ranked candidates. Entry points come first, then config and boundaries,
  3. Cut ruthlessly. Any candidate you cannot write a "why it is this way" note for is a
  4. Add stops the analyzer cannot see: the surprising workaround, the module that looks

What it can do on your machine

Read from SKILL.md and the folder at commit 4a698e8. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 3 files in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • python3

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Code Tour loads about 3.1k tokens when it runs, and up to ~7.5k if it reads all its reference files. Until then it costs about 50 tokens; SKILL.md has 1,820 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~50
When it runs · the whole SKILL.md, loaded when a task matches
~3.1k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~7.5k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from borghei/Claude-Skills at commit 4a698e8, republished under its MIT licence (© borghei). 1,820 words, ~3,147 tokens.

Download SKILL.mdSave it as .claude/skills/code-tour/SKILL.md (or your agent's skills folder). This skill also uses 7 other files; get the full folder from GitHub.
name
code-tour
description
Build ordered, annotated tours of an unfamiliar codebase and keep the anchors from rotting. Use when onboarding an engineer, handing off a service, or explaining a subsystem before a review.
license
MIT + Commons Clause
metadata.version
1.0.0
metadata.author
borghei
metadata.category
engineering
metadata.domain
developer-experience
metadata.updated
2026-07-21
metadata.tags
onboarding, code-reading, documentation, developer-experience, handoff

Code Tour

A guided path through a codebase, ordered so each stop makes the next one legible, and annotated with why the code is the way it is rather than what it does. The what is already on screen; the why is what takes a new engineer three weeks to reconstruct and what the person who knows it will lose in six months. Tours rot faster than any other documentation because they point at line numbers, so anchoring and validation are half this skill.

When to use this skill

  • Onboarding an engineer onto a service where reading order determines whether week one is productive or archaeological
  • Handing off ownership of a system before its author changes team or leaves
  • Explaining a subsystem ahead of a design review, so reviewers arrive with shared context
  • Documenting a surprising design whose rationale lives only in a closed pull request
  • Auditing an existing tour that has silently rotted as files moved and functions were renamed
  • Re-entering your own code after six months away, which is functionally the same problem as onboarding

Inputs the skill expects

  • The repository root, and which directories are vendored or generated
  • The audience and their starting knowledge — a backend engineer and a frontend engineer need different first stops
  • The one question the tour must leave answered ("how does a request become a row?")
  • Time budget, which sets the stop count more than anything else
  • The design decisions worth explaining, especially the ones that look wrong at first glance
  • An existing tour definition, when validating or updating rather than authoring

Clarify First

Before building the tour, confirm these inputs. If any is unknown or vague, ASK — do not assume:

  • The question the tour answers — a tour of "the codebase" has no ordering principle; a tour of "how a request becomes a row" orders itself
  • Audience and their existing knowledge — decides which stops can be skipped and which concepts need a stop of their own
  • Time budget — 30 minutes is 5-7 stops; anything longer gets abandoned midway and never resumed
  • Which decisions are worth explaining — the why-notes are the entire value; without them the tour is a file listing

Stop rule: ask only the 2-3 that most change the output. If the user says "just draft it," proceed and list your assumptions at the top of the artifact.

Workflows

Workflow 1 — Propose candidate stops from the repository
  1. Run the analyzer against the repo root, excluding vendored and generated directories.
  2. Read the ranked candidates. Entry points come first, then config and boundaries, then high-fan-in internals — that ordering is the analyzer's opinion about reading order.
  3. Cut ruthlessly. Any candidate you cannot write a "why it is this way" note for is a file, not a stop.
  4. Add stops the analyzer cannot see: the surprising workaround, the module that looks redundant and is not, the abstraction whose absence would be worse.
bash
python3 engineering/code-tour/scripts/tour_propose.py \
  --repo . --max-stops 7 --exclude vendor --exclude generated --format text

Fan-in for Python comes from the AST import graph and is reliable. For other languages it is a filename-reference heuristic and will over-count common names — treat those scores as a ranked shortlist to review, not a verdict.

Workflow 2 — Write the tour and audit the notes
  1. Fill in each stop's note, question, and gotcha in the tour JSON. The note explains why; the question forces the reader to look at the code before moving on.
  2. Anchor every stop to a symbol name, not a line number. Line numbers are recorded for convenience but resolved from the symbol on every validation.
  3. Run the renderer's audit. It flags notes that only restate what the code does, notes under 20 words, and notes with no causal language.
  4. Render the document once the why-ratio clears 0.8.
bash
python3 engineering/code-tour/scripts/tour_render.py \
  --input engineering/code-tour/assets/sample_tour.json \
  --audit-only --min-why-ratio 0.8 --format text

The shipped sample scores 83% — stop 5 fails deliberately, so you can see what a what-only note looks like next to four that explain why.

Workflow 3 — Validate the tour against the current tree
  1. Run validation before every use of the tour, and in CI on the branch that owns the code.
  2. Read the statuses: deleted and moved are broken, drifted means the anchor's body changed and the note may now be wrong, shifted is cosmetic line movement.
  3. For moved anchors, take the suggested relocations — they come from searching the tree for the anchor name.
  4. Re-freeze line numbers and fingerprints with --update once you have re-read the drifted notes.
bash
python3 engineering/code-tour/scripts/tour_validate.py \
  --tour engineering/code-tour/assets/sample_tour.json \
  --repo engineering/code-tour --format text

Stop paths are relative to the tour's own repo root, so --repo points at the package the tour describes — here, this skill itself. Exit code is 1 when any stop is broken, which is what lets a tour live in CI. The shipped sample exits 1 on purpose: stop 6 points at a scripts/tour_export.py that was never shipped.

Decision frameworks

Choosing the first stop [PROVEN]

The first stop determines whether the reader builds a mental model or a list of facts.

Tour purposeFirst stopWhy
"How does the system work?"The entry point — main, the router, the CLI dispatcherExecution order is the only ordering a newcomer already trusts
"How do I add a feature like X?"The most recent similar feature, end to endPattern-matching beats principles for a first change
"Why is this designed this way?"The constraint — the schema, the external contract, the SLADesign decisions are unreadable without the constraint that forced them
"How do I debug this?"The observability seam — logging, error handler, trace entryDebugging is navigation, and navigation starts at the signal

Never open on the data model. It is where authors want to start, because it is where the domain lives, and it is where readers stall — a schema without a flow through it is a vocabulary list.

BudgetStopsWords per note
15 min3-440-60
30 min5-750-80
60 min8-1060-100
Over 60 minSplit into two tours—

Beyond ten stops readers stop retaining and start skimming, and a skimmed tour teaches less than a well-chosen five-stop one. If the system genuinely needs fifteen stops, that is two tours with different questions, not one long one.

Anchoring strategy — what rots and what does not
Anchor typeRot rateUse when
Symbol name (function, class)LowDefault — survives every edit except a rename
File path onlyLowThe stop is about a file's existence or shape
Distinctive string in a commentMediumNon-Python code with no stable symbol
Line numberVery highNever as the anchor; record it as a convenience only
Line rangeVery highNever

The tour format records line but resolves from anchor. A tour anchored on line numbers is broken by the next unrelated edit above it, which is why most tours in the wild are broken within a month of being written.

Show full SKILL.md (696 more words)Show less
When a stop is drifted, what actually changed?
SignalLikely causeAction
Fingerprint changed, name and shape sameRefactor inside the bodyRe-read the note; usually still true
Fingerprint changed, function much longerFeature added inside the stopNote is now incomplete — extend it or split the stop
Anchor missing, found elsewhere in treeMoved or extractedRe-point the stop; check the ordering still holds
Anchor missing everywhereRenamed or deletedDecide whether the concept still exists; delete the stop if not

Anti-Patterns

The Line-Number Tour

Mistake: Anchoring stops to file paths and line numbers, so the tour points at parser.py:142. Why it happens: Line numbers are what the editor shows and what a link needs, so they are the obvious thing to record. They are also correct at the moment of writing, which makes the problem invisible until later. Instead: Anchor on the symbol name and resolve the line at validation time. Record the line as a convenience so readers can jump, but never let it be the identity of the stop. A tour that survives six months of refactoring is worth more than one that was slightly easier to write.

The What-Not-Why Tour

Mistake: Notes that describe what the code does — "this function validates the input and returns a normalized record." Why it happens: Describing behaviour is easy, feels informative, and can be done without remembering any history. Explaining why requires reconstructing a decision, which is genuinely harder. Instead: For every stop, answer one of: why is it here, why is it this way and not the obvious alternative, and what breaks if you change it. If none of the three has an interesting answer, the file does not need a stop. Run the renderer's audit — it catches notes that open by restating behaviour.

The Complete Tour

Mistake: Trying to cover every module so the reader is not left with gaps. Why it happens: Omitting things feels like negligence, especially for the author who knows what is being left out. The reader does not know, and would not have retained it anyway. Instead: Pick one question the tour answers and include only what serves it. Five stops that build one accurate mental model beat twenty that build a shallow index. Gaps get filled by the reader's first real task, which teaches better than any tour.

The Orphaned Tour

Mistake: Writing the tour in a wiki, a doc site, or an onboarding deck, separate from the repository. Why it happens: That is where onboarding material lives, and the tour is onboarding material. It also gets the tour in front of readers who never clone the repo. Instead: Keep the tour definition in the repository it describes, and validate it in CI on that repository. A tour that cannot be broken by a code change will not be updated by one either. Publish a rendered copy wherever readers look, generated from the definition rather than maintained separately.

Author-Order Stops

Mistake: Ordering stops the way the author thinks about the system — usually data model, then services, then interface. Why it happens: That is the order the system was built in and the order it lives in the author's head. It feels like the logical decomposition, and for someone who already understands it, it is. Instead: Order by what a newcomer can verify at each step. Start where execution starts, follow one real request or command through, and introduce each abstraction at the moment it first blocks understanding. The test: could the reader, after each stop, predict what the next file does? If not, a stop is missing before it.

Files

FilePurpose
scripts/tour_propose.pyRank candidate stops by entry-point, fan-in, and boundary signals using AST and file analysis
scripts/tour_validate.pyResolve every anchor against the current tree; report deleted, moved, drifted, and shifted stops
scripts/tour_render.pyRender a tour into an onboarding document and audit notes for why-not-what quality
references/tour-construction.mdStop selection, ordering models, note-writing patterns, and audience variants
references/tour-maintenance.mdAnchoring strategies, rot mechanics, CI wiring, and the rules for updating a drifted tour
assets/sample_tour.jsonRunnable tour of this skill's own scripts, with a deliberately broken stop and a weak note
assets/tour-template.jsonEmpty tour definition with every supported field documented

© borghei, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 7 other files (scripts, references, assets) in engineering/code-tour of borghei/Claude-Skills.

  • SKILL.md
  • assets/sample_tour.json
  • assets/tour-template.json
  • references/tour-construction.md
  • references/tour-maintenance.md
  • scripts/tour_propose.py
  • scripts/tour_render.py
  • scripts/tour_validate.py

Open the folder on GitHubat commit 4a698e8

Compare with similar skills

Code Tour next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Code Tour compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Code Tour this skillborghei/Claude-Skills881—~3.1kAutomated safety check: PassMIT
Codebase Knowledge Graph Q&AEgonex-AI/Understand-Anything86k1 repos~1.2kAutomated safety check: PassMIT
Understand ExplainEgonex-AI/Understand-Anything86k1 repos~1.3kAutomated safety check: PassMIT
Repomix Codebase Exploreryamadashy/repomix29k1 repos~2.7kAutomated safety check: PassMIT
Code Graph Mermaid Diagramstrailofbits/skills7.4k1 repos~1.7kAutomated safety check: PassCC-BY-SA-4.0
Project Onboarding Guide from Knowledge GraphEgonex-AI/Understand-Anything86k—~1.2kAutomated safety check: PassMIT

Similar skills

  • Codebase Knowledge Graph Q&A

    Egonex-AI/Understand-Anything

    Answers questions about a codebase by searching a prebuilt knowledge graph of its files, functions, classes and dependencies, not by rereading every source file.

    86k GitHub starsUsed in 1 repo~1.2k tokens
    DevelopmentAuto-check passed
  • Understand Explain

    Egonex-AI/Understand-Anything

    Gives an in-depth explanation of one file, function or module by reading the project's knowledge graph and checking that the graph is still fresh.

    86k GitHub starsUsed in 1 repo~1.3k tokens
    DevelopmentAuto-check passed
  • Repomix Codebase Explorer

    yamadashy/repomix

    Packs a local or remote repository into a single AI-friendly file with the Repomix CLI, then reads and searches that output to explain structure, find patterns or report metrics.

    29k GitHub starsUsed in 1 repo~2.7k tokens
    DevelopmentAuto-check passed
  • Code Graph Mermaid Diagrams

    trailofbits/skills

    Official

    Generates Mermaid diagrams from Trailmark code graphs, including call graphs, class hierarchies, module dependency maps, complexity heatmaps and attack surface data flows.

    7.4k GitHub starsUsed in 1 repo~1.7k tokens
    DevelopmentAuto-check passed
  • Writes an onboarding guide for new team members from a project's existing knowledge graph, after checking that the graph still matches the current commit.

    86k GitHub stars~1.2k tokensUpdated 2 days ago
    DevelopmentAuto-check passed
  • GitDiagram Repository Overview

    ahmedkhaleel2004/gitdiagram

    Explains the architecture of a public GitHub repository through GitDiagram: how the code is organized, the main components with paths, and a Mermaid diagram.

    18k GitHub stars~427 tokensUpdated today
    DevelopmentAuto-check passed

More from borghei/Claude-Skills

All 349 skills in this repo
  • Agents In The Team

    borghei/Claude-Skills

    Run delivery when AI coding and ops agents take tickets. An agent skill from borghei/Claude-Skills.

    881 GitHub stars~4.2k tokensUpdated yesterday
    Auto-check passed
  • AI Content Disclosure

    borghei/Claude-Skills

    Check AI-generated marketing content and reviews for required disclosures under the EU AI Act, FTC rules and platform AI-label policies.

    881 GitHub stars~3.4k tokensUpdated yesterday
    Auto-check passed
  • AI Prototyping

    borghei/Claude-Skills

    Idea to AI-generated prototype to customer validation to engineering handoff.

    881 GitHub stars~3.6k tokensUpdated yesterday
    Auto-check passed
  • Analytics Engineer

    borghei/Claude-Skills

    Analytics engineering across data modeling, dbt, transformation, and semantic layers.

    881 GitHub stars~3.4k tokensUpdated yesterday
    Auto-check passed
  • Ansoff Matrix

    borghei/Claude-Skills

    Ansoff Matrix — 4-quadrant framework for growth options: market penetration, market/product development, and diversification.

    881 GitHub stars~2.2k tokensUpdated yesterday
    Auto-check passed
  • Brainstorm Okrs

    borghei/Claude-Skills

    OKR brainstorming and validation using the Radical Focus framework — outcome objectives, measurable key results, counter-metrics.

    881 GitHub stars~1.4k tokensUpdated yesterday
    Auto-check passed

Categories

Questions about Code Tour

What does Code Tour do?

Build ordered, annotated tours of an unfamiliar codebase and keep the anchors from rotting. Code Tour is an agent skill from borghei/Claude-Skills. Build ordered, annotated tours of an unfamiliar codebase and keep the anchors from rotting.

When should I use Code Tour?

Code Tour fits situations like: onboarding an engineer; handing off a service; explaining a subsystem before a review.

How do I install Code Tour in Claude Code?

Run `npx skills add borghei/Claude-Skills --skill code-tour -a claude-code`. Or copy the skill folder (engineering/code-tour in borghei/Claude-Skills) into .claude/skills/code-tour in your project. Claude Code loads it when a task matches its description.

How do I install Code Tour in Codex?

Run `npx skills add borghei/Claude-Skills --skill code-tour -a codex`. Or copy the skill folder (engineering/code-tour in borghei/Claude-Skills) into .agents/skills/code-tour in your project. Codex loads it when a task matches its description.

Can I use Code Tour in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add borghei/Claude-Skills --skill code-tour -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/code-tour, .gemini/skills/code-tour, .github/skills/code-tour and .opencode/skills/code-tour in your project.

What does Code Tour need to run?

Going by SKILL.md and its folder, Code Tour needs Python for the scripts in its folder and the command-line tools its instructions call (python3). Our summary lists: Python 3.

Does Code Tour access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Code Tour safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Code Tour use?

Code Tour is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Code Tour use?

About 3.1k tokens (SKILL.md is roughly 13k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 4.4k tokens, read only when the agent opens those files.

What are the alternatives to Code Tour?

Skills that share tags, products or a category with Code Tour: Codebase Knowledge Graph Q&A (Egonex-AI/Understand-Anything, 86k stars), Understand Explain (Egonex-AI/Understand-Anything, 86k stars), Repomix Codebase Explorer (yamadashy/repomix, 29k stars) and Code Graph Mermaid Diagrams (trailofbits/skills, 7.4k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Code Tour?

borghei (a GitHub user) maintains it in borghei/Claude-Skills, which has 881 GitHub stars. The repository holds 349 skills in this directory. The repository was last updated on October 7, 2026.

Source: borghei/Claude-Skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.