# Code tour

> Code tour is an open-source agent skill for developer tools. Builds a JSON-driven guided code tour and opens it in your running Neovim. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/richardgill/nix/tree/main/built/ai-agents/ampcode/skills/code-tour
- **Repository:** https://github.com/richardgill/nix
- **GitHub stars:** 39
- **License:** MIT
- **Skill name:** code-tour
- **Collection:** https://github.com/richardgill/nix
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-03

## About

This skill traces a requested behavior through the codebase and writes a JSON tour file listing ordered code ranges, each with a location-list description and an optional inline annotation. The tour is opened in the user's already-running Neovim session through a custom Lua renderer, which creates a temporary tab and leaves the original workspace intact. The agent is directed not to edit source files, save buffers, install plugins or restart the editor unless asked.

The workflow starts by locating the intended tmux session and its Neovim socket, confirming the editor's working directory, and reading the relevant code, including unsaved buffer contents where they may differ from disk. Entries are indented by call depth so the list reads like a call trail, and the renderer validates the JSON before replacing any active tour, returning an error on invalid input.

It expects a tmux session with Neovim listening on a socket and the custom.code-tour Lua module available in that editor. Navigation and clearing happen through Neovim key mappings and commands described in the skill.

## When your agent uses it

> Create and launch a temporary JSON-driven code tour in the user's running Neovim, with highlighted ranges, contextual buffer annotations, and an indented location list. Use when asked for a code tour or a guided walkthrough of code in nvim/tmux.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/richardgill/nix/tree/HEAD/built/ai-agents/ampcode/skills/code-tour)
- [License: MIT](https://github.com/richardgill/nix/tree/HEAD/built/ai-agents/ampcode/skills/code-tour)

## Features

- **Ordered code walkthrough:** Produces a flat, ordered list of file ranges that follows the code from an entry point through its meaningful calls.
- **Live Neovim rendering:** Opens the tour in a dedicated temporary tab inside the user's running Neovim without touching the original workspace.
- **Inline contextual annotations:** Adds short virtual-text notes beside starting lines to explain intent, invariants or tradeoffs.
- **Socket discovery and launch:** Finds the target tmux session's Neovim socket and launches the tour through a remote expression call.
- **Keyboard navigation:** Provides mappings to step through entries, jump from the location list and clear the tour.

## Good for

- Walk me through how a voice recording command works in this repo
- Create a guided tour of the request handling path in my open Neovim
- Show me the call flow of the login function as a navigable tour
- Explain the startup sequence of this module with highlighted ranges

## Install

### Claude Code

Copy the skill folder to `~/.claude/skills/code-tour` to use it in all your projects:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/richardgill/nix.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/code-tour &&
cp -R "$tmp/built/ai-agents/ampcode/skills/code-tour" ~/.claude/skills/code-tour &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/code-tour` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/code-tour` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/richardgill/nix.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/code-tour &&
cp -R "$tmp/built/ai-agents/ampcode/skills/code-tour" ~/.agents/skills/code-tour &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/code-tour` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/code-tour` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/richardgill/nix.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/code-tour &&
cp -R "$tmp/built/ai-agents/ampcode/skills/code-tour" ~/.cursor/skills/code-tour &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/code-tour` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/richardgill/nix.git --path built/ai-agents/ampcode/skills/code-tour
```

Or copy the folder to `~/.gemini/skills/code-tour` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/code-tour`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/richardgill/nix.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/code-tour &&
cp -R "$tmp/built/ai-agents/ampcode/skills/code-tour" ~/.copilot/skills/code-tour &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/code-tour` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/richardgill/nix.git
```

Then copy `nix/built/ai-agents/ampcode/skills/code-tour` into your agent's skills folder as `code-tour`. Agents that support SKILL.md read one folder per skill.

## FAQ

### What does the skill need to run?

It needs a tmux session whose main Neovim exposes a listening socket, usually stored in the NVIM_SOCKET environment variable, and the custom.code-tour Lua module loaded in that editor.

### Does Code tour change my source files?

No. The skill instructs the agent not to change source contents, save buffers, install plugins or restart the editor unless requested. It writes only the tour JSON file.

### What happens if the JSON is invalid?

Validation errors return a nonzero exit before any active tour changes, so the existing tour stays in place and the JSON must be corrected.

### How do I stop a tour?

Press q or run :CodeTourClear inside the tour tab, or call the clear function through the Neovim remote expression.

### How do I install Code tour in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/code-tour to use it in all your projects, or to .claude/skills/code-tour in one project.

### Does Code tour run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Code tour?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

### What are the best alternatives to Code tour?

The closest alternatives to Code tour are Code tour, Code tour, Code writer, Trace architecture and Codebase onboarding.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Code tour](https://ai-powered.com/skills/code-tour-smartworldarafath): Code tour is an open-source agent skill for developer tools.
- [Code tour](https://ai-powered.com/skills/code-tour): Code tour is an open-source agent skill for developer tools.
- [Code writer](https://ai-powered.com/skills/code-writer): Code writer is an open-source agent skill for developer tools.
- [Trace architecture](https://ai-powered.com/skills/trace-architecture): Trace architecture is an open-source agent skill for developer tools.
- [Codebase onboarding](https://ai-powered.com/skills/codebase-onboarding): Codebase onboarding is an open-source agent skill for developer tools.
- [Comment code generate a tutorial](https://ai-powered.com/skills/comment-code-generate-a-tutorial): Comment code generate a tutorial is an open-source agent skill for developer tools.
- [Tour](https://ai-powered.com/skills/tour): Tour is an open-source agent skill for developer tools.
- [Explore code](https://ai-powered.com/skills/explore-code): Explore code is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/code-tour-richardgill
