Chuyển đến nội dung
Skillpedia
Tài liệu kỹ thuật29k · #9548

code-tour

Skill này làm gì

Skill này viết các file CodeTour hướng dẫn người đọc hiểu codebase hoạt động ra sao, với các điểm dừng tại những vị trí code thật. Skill dành cho lập trình viên cần đón thành viên mới, xem lại pull request hoặc tìm hiểu một dự án lạ.

Khi nào nên dùng

  • ✓Khi một thành viên mới cần được hướng dẫn có người dẫn qua codebase của bạn.
  • ✓Khi bạn muốn một bài hướng dẫn về pull request hoặc cách một tính năng hoạt động.
  • ✓Khi bạn cần giải thích kiến trúc kèm liên kết đến các file cụ thể.

Liên kết skill

https://github.com/alirezarezvani/claude-skills/blob/main/engineering/code-tour/skills/code-tour/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/alirezarezvani/claude-skills/blob/main/engineering/code-tour/skills/code-tour/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Tạo một code tour cho lập trình viên backend mới, giải thích luồng thanh toán của chúng tôi hoạt động thế nào.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Agent khám phá repository, xác định đối tượng đọc và mức độ chi tiết, rồi viết các bước trỏ đến file thật và số dòng. Nó kiểm tra từng vị trí có tồn tại không và lưu tour thành file mà extension CodeTour của VS Code đọc được.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

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 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.

{
  "$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 or directory anchor
  • At most 2 content-only steps
  • nextTour matches another tour's title exactly if set

Personas

Persona Goal Must cover
Vibecoder Get the vibe fast Entry point, main modules. Max 8 steps.
New joiner Structured ramp-up Directories, setup, business context
Bug fixer Root cause fast Trigger -> fault points -> tests
RCA investigator Why did it fail Causality chain, observability anchors
Feature explainer End-to-end UI -> API -> backend -> storage
PR reviewer Review correctly Change story, invariants, risky areas
Architect Shape and rationale Boundaries, tradeoffs, extension points
Security reviewer Trust boundaries Auth flow, validation, secret handling
Refactorer Safe restructuring
Câu hỏi thường gặp

Cần công cụ gì để xem tour?

Extension CodeTour của VS Code mở các file tour.

Nó có thay đổi code nguồn của tôi không?

Không. Nó chỉ tạo file tour và không sửa code.

Các file tour được lưu ở đâu?

Chúng được lưu trong một thư mục tours bên trong repository.

Chi tiết

Mô tả gốc của tác giả

Use when asked for a CodeTour .tour file or a step-by-step code walkthrough (onboarding, architecture, PR review, how X works). Writes persona-targeted steps that link to real files and line numbers, checked to exist.

repo: alirezarezvani/claude-skills

Độ phổ biến

Sao GitHub
29k
Vị trí xếp hạng
#9548
Giấy phép
MIT
Cập nhật
2/11/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự