Agent skill

Code Tour

by affaan-m in affaan-m/ECC

创建 CodeTour .tour 文件——针对特定角色的、带有真实文件和行锚点的逐步演练。用于入职引导、架构演练、PR 演练、RCA 演练以及结构化的“解释其工作原理”请求。

MITAuto-check passedDevelopment

Install Code Tour

skills CLI
$ npx skills add affaan-m/ECC --skill code-tour -a claude-code

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

GitHub CLI
$ gh skill install affaan-m/ECC 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/affaan-m/ECC.git skills-src && mkdir -p .claude/skills && cp -r skills-src/docs/zh-CN/skills/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
275k
Token cost
~1k tokens
SKILL.md length
187 words
Files
1
Skills in repo
645
Repo updated
First seen
Licence
MIT

At a glance

创建 CodeTour .tour 文件——针对特定角色的、带有真实文件和行锚点的逐步演练。用于入职引导、架构演练、PR 演练、RCA 演练以及结构化的“解释其工作原理”请求。

  • Works in 5 steps: 探索 → 推断读者 → 读取并验证锚点 → …
  • Tasks that involve Codebase onboarding
  • SKILL.md covers 何时使用, 何时不使用, 工作流程 and 步骤类型, plus 6 more sections
  • Reaches github.com and aka.ms

What it does

Code Tour is an agent skill from affaan-m/ECC. 创建 CodeTour .tour 文件——针对特定角色的、带有真实文件和行锚点的逐步演练。用于入职引导、架构演练、PR 演练、RCA 演练以及结构化的“解释其工作原理”请求。

Its SKILL.md is about 1k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Codebase onboarding. The repository describes itself as: The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond. The licence is MIT.

When your agent uses it

  • Tasks that involve Codebase onboarding

Example prompts

  • “解释其工作原理”
  • “/code-tour”

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. 探索
  2. 推断读者
  3. 读取并验证锚点
  4. 编写 .tour
  5. 验证

What it can do on your machine

Read from SKILL.md and the folder at commit ef648e0. 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

    No scripts in the folder and no shell commands in SKILL.md (its code samples are json).

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

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • github.com
    • aka.ms

    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 1k tokens when it runs. Until then it costs about 25 tokens; SKILL.md has 187 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~25
When it runs · the whole SKILL.md, loaded when a task matches
~1k

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); files beside SKILL.md are not scanned.

SKILL.md

The full file from affaan-m/ECC at commit ef648e0, republished under its MIT licence (© affaan-m). 187 words, ~1,018 tokens.

Download SKILL.mdSave it as .claude/skills/code-tour/SKILL.md (or your agent's skills folder).
name
code-tour
description
创建 CodeTour `.tour` 文件——针对特定角色的、带有真实文件和行锚点的逐步演练。用于入职引导、架构演练、PR 演练、RCA 演练以及结构化的“解释其工作原理”请求。
origin
ECC

代码导览

创建 CodeTour .tour 文件,用于代码库导览,可直接打开真实文件并定位到指定行范围。导览文件存放在 .tours/ 目录中,专为 CodeTour 格式设计,而非临时性的 Markdown 笔记。

一个好的导览应针对特定读者讲述一个故事:

  • 他们正在查看什么
  • 为什么重要
  • 接下来应该遵循什么路径

仅创建 .tour JSON 文件。不要在此技能范围内修改源代码。

何时使用

在以下情况下使用此技能:

  • 用户请求代码导览、入职导览、架构导览或 PR 导览
  • 用户说“解释 X 如何工作”,并希望获得可重用的引导式产物
  • 用户希望为新工程师或审阅者提供上手路径
  • 相比平铺直叙的摘要,引导式序列更适合该任务

示例:

  • 新维护者入职
  • 单个服务或包的架构导览
  • 锚定到变更文件的 PR 审查导览
  • 展示故障路径的根本原因分析导览
  • 信任边界和关键检查的安全审查导览

何时不使用

不使用代码导览的情况使用
在聊天中一次性解释就足够了直接回答
用户想要散文式文档,而不是 .tour 产物documentation-lookup 或仓库文档编辑
任务是实现或重构执行实现工作
任务是没有导览产物的广泛代码库入职codebase-onboarding

工作流程

1. 探索

在编写任何内容之前探索仓库:

  • README 和包/应用入口点
  • 文件夹结构
  • 相关配置文件
  • 如果导览聚焦于 PR,则查看变更的文件

在理解代码结构之前,不要开始编写步骤。

2. 推断读者

根据请求确定角色和深度。

请求形式角色建议深度
"入职","新成员"new-joiner9-13 步
"快速导览","快速了解"vibecoder5-8 步
"架构"architect14-18 步
"导览此 PR"pr-reviewer7-11 步
"为什么这个出错了"rca-investigator7-11 步
"安全审查"security-reviewer7-11 步
"解释此功能如何工作"feature-explainer7-11 步
"调试此路径"bug-fixer7-11 步
3. 读取并验证锚点

每个文件路径和行锚点必须是真实的:

  • 确认文件存在
  • 确认行号在范围内
  • 如果使用选区,验证确切的代码块
  • 如果文件易变,优先使用基于模式的锚点

切勿猜测行号。

4. 编写 .tour

写入:

text
.tours/<persona>-<focus>.tour

保持路径确定且可读。

5. 验证

在完成之前:

  • 每个引用的路径都存在
  • 每行或每个选区都有效
  • 第一步锚定到真实文件或目录
  • 导览讲述连贯的故事,而非罗列文件

步骤类型

内容

谨慎使用,通常仅用于结束步骤:

json
{ "title": "Next Steps", "description": "You can now trace the request path end to end." }

不要将第一步设为纯内容。

目录

用于引导读者了解模块:

json
{ "directory": "src/services", "title": "Service Layer", "description": "The core orchestration logic lives here." }
文件 + 行

这是默认步骤类型:

json
{ "file": "src/auth/middleware.ts", "line": 42, "title": "Auth Gate", "description": "Every protected request passes here first." }
选区

当某个代码块比整个文件更重要时使用:

json
{
  "file": "src/core/pipeline.ts",
  "selection": {
    "start": { "line": 15, "character": 0 },
    "end": { "line": 34, "character": 0 }
  },
  "title": "Request Pipeline",
  "description": "This block wires validation, auth, and downstream execution."
}
模式

当精确行号可能发生变化时使用:

json
{ "file": "src/app.ts", "pattern": "export default class App", "title": "Application Entry" }
URI

在需要时用于 PR、问题或文档:

json
{ "uri": "https://github.com/org/repo/pull/456", "title": "The PR" }

编写规则:SMIG

每个描述应回答:

  • 情境:读者正在查看什么
  • 机制:它是如何工作的
  • 影响:为什么对此角色重要
  • 陷阱:聪明的读者可能会错过什么

保持描述简洁、具体,并基于实际代码。

叙事结构

除非任务明确需要不同结构,否则使用此弧线:

  1. 定位
  2. 模块地图
  3. 核心执行路径
  4. 边缘情况或陷阱
  5. 结束 / 下一步

导览应感觉像一条路径,而非清单。

示例

json
{
  "$schema": "https://aka.ms/codetour-schema",
  "title": "API Service Tour",
  "description": "Walkthrough of the request path for the payments service.",
  "ref": "main",
  "steps": [
    {
      "directory": "src",
      "title": "Source Root",
      "description": "All runtime code for the service starts here."
    },
    {
      "file": "src/server.ts",
      "line": 12,
      "title": "Entry Point",
      "description": "The server boots here and wires middleware before any route is reached."
    },
    {
      "file": "src/routes/payments.ts",
      "line": 8,
      "title": "Payment Routes",
      "description": "Every payments request enters through this router before hitting service logic."
    },
    {
      "title": "Next Steps",
      "description": "You can now follow any payment request end to end with the main anchors in place."
    }
  ]
}

反模式

反模式修复
平铺直叙的文件列表讲述一个步骤间有依赖关系的故事
通用描述指明具体的代码路径或模式
猜测的锚点先验证每个文件和行
快速导览步骤过多果断精简
第一步是纯内容将第一步锚定到真实文件或目录
角色不匹配为实际读者编写,而非通用工程师

最佳实践

  • 步骤数量与仓库大小和角色深度成比例
  • 使用目录步骤进行定位,文件步骤用于实质内容
  • 对于 PR 导览,首先覆盖变更的文件
  • 对于单体仓库,将范围限定在相关包,而非导览所有内容
  • 以读者现在可以做什么来结束,而非总结

相关技能

  • codebase-onboarding
  • coding-standards
  • council
  • 官方上游格式:microsoft/codetour

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

Files

Just SKILL.md in docs/zh-CN/skills/code-tour of affaan-m/ECC.

Open the folder on GitHubat commit ef648e0

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 skillaffaan-m/ECC275k—~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 affaan-m/ECC

All 645 skills in this repo
  • Videodb

    affaan-m/ECC

    Ingest, index, search, edit, and monitor video and audio with the VideoDB Python SDK — upload from files, URLs, or RTSP feeds, build spoken and scene indexes with timestamped search and playable…

    275k GitHub starsUsed in 3 repos~3.5k tokens
    Auto-check: notes
  • Rules Distillation

    affaan-m/ECC

    Scans installed skills for principles that recur across them and proposes rule-file changes: append, revise, add a section, create a file or leave as covered.

    275k GitHub starsUsed in 2 repos~2.3k tokens
    Auto-check passed
  • Builds DRAFT counterparty agreements from one markdown template and a small JSON spec per party, with clauses picked by the party's role.

    275k GitHub stars~2.9k tokensUpdated 3 days ago
    Auto-check passed
  • Measures whether agents actually follow a skill, rule or agent definition by generating scenarios at three strictness levels and scoring tool-call traces.

    275k GitHub starsUsed in 1 repo~623 tokens
    Auto-check passed
  • Instinct-based learning system that observes sessions via hooks, creates atomic instincts with confidence scoring, and evolves them into skills/commands/agents.

    275k GitHub stars~3.5k tokensUpdated 3 days ago
    Auto-check passed
  • Adds one optional external Codex critique that tries to break a council's decision draft, sent to OpenAI only after you consent.

    275k GitHub stars~1.5k tokensUpdated 3 days ago
    Auto-check passed

Categories

Questions about Code Tour

What does Code Tour do?

创建 CodeTour .tour 文件——针对特定角色的、带有真实文件和行锚点的逐步演练。用于入职引导、架构演练、PR 演练、RCA 演练以及结构化的“解释其工作原理”请求。. Code Tour is an agent skill from affaan-m/ECC.

When should I use Code Tour?

Code Tour fits situations like: tasks that involve Codebase onboarding.

How do I install Code Tour in Claude Code?

Run `npx skills add affaan-m/ECC --skill code-tour -a claude-code`. Or copy the skill folder (docs/zh-CN/skills/code-tour in affaan-m/ECC) 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 affaan-m/ECC --skill code-tour -a codex`. Or copy the skill folder (docs/zh-CN/skills/code-tour in affaan-m/ECC) 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 affaan-m/ECC --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?

SKILL.md names no scripts, command-line tools or credentials: Code Tour is instructions for the agent only.

Does Code Tour access the network?

SKILL.md names 2 domains. In commands or code: github.com and aka.ms; the agent is likely to contact these when it follows the instructions. 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. Review the folder before installing.

What licence does Code Tour use?

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

How many tokens does Code Tour use?

About 1k tokens (SKILL.md is roughly 4.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

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?

affaan-m (a GitHub user) maintains it in affaan-m/ECC, which has 275,023 GitHub stars. The repository holds 645 skills in this directory. The repository was last updated on October 5, 2026.

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