Communitygithub.com

code-tour

CodeTour `.tour` 파일을 생성합니다 — 실제 파일 및 라인 앵커를 포함한, 대상 사용자 맞춤형 단계별 코드 워크스루입니다. 온보딩 투어, 아키텍처 워크스루, PR 투어, RCA 투어 및 구조화된 안내가 필요한 모든 상황에 사용하세요.

code-tour란 무엇인가요?

이 스킬은 코드베이스 탐색을 위한 **CodeTour** `.tour` 파일을 생성합니다. `.tour` 파일은 `.tours/` 디렉토리에 저장되며, CodeTour 확장이 지원하는 형식을 따릅니다. 각 단계는 실제 파일과 라인 번호, 특정 코드 블록 선택, 디렉토리, 패턴(정규식/키워드), URI 등 다양한 앵커 유형을 사용하여 정확한 코드 위치를 가리킵니다. 단순히 코드를 설명하는 것을 넘어, 특정 역할(신규 입사자, PR 리뷰어, 아키텍트, 보안 검토자 등)에 맞춰 **Situation(상황), Mechanism(메커니즘), Implication(의미), Gotcha(주의점)** 형식으로 설명을 작성합니다. 특히 `ref` 필드가 중요하여, PR 브랜치 등에 맞지 않는 ref를 지정하면 파일을 열 수 없는 오류가 발생할 수 있으므로 주의해야 합니다. 이 스킬은 Claude Code, Cursor, Codex, GitHub Copilot 등 다양한 AI 에이전트 플랫폼에서 사용할 수 있도록 설계되었습니다.

지원 대상~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/affaan-m/everything-claude-code/tree/main/skills/code-tour

즐겨 사용하는 AI에게 물어보기

이 에이전트 스킬이 미리 로드된 새 채팅을 엽니다.

문서

Code Tour

코드베이스 워크스루를 위한 CodeTour .tour 파일을 생성합니다. 투어는 실제 파일과 라인 범위로 직접 연결됩니다. 투어 파일은 .tours/ 디렉토리에 저장되며, CodeTour 형식을 따릅니다. 임시 Markdown 노트가 아닌 CodeTour 형식이어야 합니다.

좋은 투어는 특정 독자를 위한 내러티브입니다:

  • 그들이 보고 있는 것
  • 왜 중요한지
  • 다음에 따라야 할 경로

.tour JSON 파일만 생성하세요. 이 스킬의 일부로 소스 코드를 수정하지 마세요.

사용 시기

다음과 같은 경우 이 스킬을 사용하세요:

  • 사용자가 코드 투어, 온보딩 투어, 아키텍처 워크스루, PR 투어를 요청한 경우
  • 사용자가 "X가 어떻게 작동하는지 설명해줘"라고 하면서 재사용 가능한 안내 아티팩트를 원하는 경우
  • 사용자가 신규 엔지니어 또는 리뷰어를 위한 램프업 경로를 원하는 경우
  • 작업이 평면적인 요약보다는 안내된 시퀀스에 더 적합한 경우

예시:

  • 새 관리자 온보딩
  • 하나의 서비스나 패키지에 대한 아키텍처 투어
  • 변경된 파일에 고정된 PR 리뷰 워크스루
  • 실패 경로를 보여주는 RCA 투어
  • 신뢰 경계와 주요 검사 지점에 대한 보안 검토 투어

사용 금지 사항

code-tour 대신사용할 것
채팅에서 한 번 설명하는 것으로 충분함직접 답변
사용자가 .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 작성

다음 경로에 작성:

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

경로는 결정적이고 읽기 쉽게 유지하세요.

5. 검증

완료하기 전에:

  • 모든 참조 경로가 존재하는지 확인
  • 모든 라인 또는 선택 영역이 유효한지 확인
  • 첫 번째 단계가 실제 파일 또는 디렉토리에 고정되어 있는지 확인
  • ref가 투어가 참조하는 모든 파일이 실제로 존재하는 브랜치 또는 커밋을 가리키는지 확인 (아래 참고)
  • 투어가 파일을 나열하는 것이 아니라 일관된 이야기를 전달하는지 확인

ref 필드

ref는 투어를 git 브랜치 또는 커밋에 연결합니다. 겉보기보다 중요합니다: ref가 독자가 체크아웃한 브랜치가 아닌 경우, CodeTour는 각 단계의 파일을 디스크가 아닌 해당 리비전의 git에서 엽니다. 해당 리비전에 파일이 없으면 단계가 열리지 않습니다 — 독자는 파일이 바로 거기에 있음에도 *"파일을 찾을 수 없어 편집기를 열 수 없습니다"*라는 메시지를 보게 됩니다. 투어와 설명은 계속 표시되므로 실제 원인을 놓치기 쉽습니다.

투어 유형별로 ref를 선택하세요:

투어 유형ref 설정값
PR 투어PR 브랜치 — 절대 베이스 브랜치로 설정하지 마세요
온보딩 / 아키텍처독자가 사용할 브랜치 (보통 main), 또는 생략
확실하지 않음ref를 생략하면 CodeTour가 디스크에서 직접 파일을 읽음

PR의 경우가 흔한 함정입니다: PR은 보통 새 파일을 추가하며, 새 파일은 베이스 브랜치에 아직 존재하지 않습니다. ref를 베이스(예: develop)로 설정하면 새 파일의 모든 단계가 열리지 않습니다.

완료하기 전에 각 단계의 파일이 선택한 ref에 실제로 존재하는지 확인하세요.

단계 유형

콘텐츠

드물게 사용하며, 보통 마무리 단계로만 사용:

{ "title": "다음 단계", "description": "이제 요청 경로를 처음부터 끝까지 추적할 수 있습니다." }

첫 번째 단계를 콘텐츠 전용으로 만들지 마세요.

디렉토리

독자를 모듈로 안내하는 데 사용:

{ "directory": "src/services", "title": "서비스 레이어", "description": "핵심 오케스트레이션 로직이 여기에 있습니다." }

파일 + 라인

기본 단계 유형입니다:

{ "file": "src/auth/middleware.ts", "line": 42, "title": "인증 게이트", "description": "모든 보호된 요청이 먼저 여기를 통과합니다." }

선택 영역

전체 파일보다 특정 코드 블록이 더 중요한 경우 사용:

{
  "file": "src/core/pipeline.ts",
  "selection": {
    "start": { "line": 15, "character": 0 },
    "end": { "line": 34, "character": 0 }
  },
  "title": "요청 파이프라인",
  "description": "이 블록은 검증, 인증 및 다운스트림 실행을 연결합니다."
}

패턴

정확한 라인이 변경될 수 있는 경우 사용:

{ "file": "src/app.ts", "pattern": "export default class App", "title": "애플리케이션 진입점" }

URI

PR, 이슈 또는 문서가 도움이 되는 경우 사용:

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

작성 규칙: SMIG

각 설명은 다음을 답해야 합니다:

  • Situation (상황): 독자가 보고 있는 것
  • Mechanism (메커니즘): 어떻게 작동하는지
  • Implication (의미): 이 페르소나에게 왜 중요한지
  • Gotcha (주의점): 똑똑한 독자가 놓칠 수 있는 것

설명을 간결하고 구체적으로 유지하며 실제 코드에 기반을 두세요.

내러티브 구조

작업이 명확히 다른 것을 요구하지 않는 한 이 호를 사용하세요:

  1. 방향 설정
  2. 모듈 맵
  3. 핵심 실행 경로
  4. 엣지 케이스 또는 주의점
  5. 마무리 / 다음 행동

투어는 인벤토리가 아닌 경로처럼 느껴져야 합니다.

예시

{
  "$schema": "https://aka.ms/codetour-schema",
  "title": "API 서비스 투어",
  "description": "결제 서비스의 요청 경로 워크스루입니다.",
  "ref": "main",
  "steps": [
    {
      "directory": "src",
      "title": "소스 루트",
      "description": "서비스의 모든 런타임 코드가 여기서 시작됩니다."
    },
    {
      "file": "src/server.ts",
      "line": 12,
      "title": "진입점",
      "description": "서버가 여기서 부팅되고, 라우트에 도달하기 전에 미들웨어를 연결합니다."
    },
    {
      "file": "src/routes/payments.ts",
      "line": 8,
      "title": "결제 라우트",
      "description": "모든 결제 요청은 서비스 로직에 도달하기 전에 이 라우터를 통해 들어옵니다."
    },
    {
      "title": "다음 단계",
      "description": "이제 주요 앵커를 통해 모든 결제 요청을 처음부터 끝까지 추적할 수 있습니다."
    }
  ]
}

안티패턴

안티패턴해결 방법
평면적인 파일 나열단계 간 의존성이 있는 이야기를 전달하세요
일반적인 설명구체적인 코드 경로나 패턴을 명명하세요
추측한 앵커모든 파일과 라인을 먼저 확인하세요
빠른 투어에 비해 너무 많은 단계과감하게 줄이세요
첫 번째 단계가 콘텐츠 전용첫 번째 단계를 실제 파일이나 디렉토리에 고정하세요
페르소나 불일치일반 엔지니어가 아닌 실제 독자를 위해 작성하세요

모범 사례

  • 단계 수를 저장소 크기와 페르소나 깊이에 비례하게 유지하세요
  • 방향 설정에는 디렉토리 단계를, 실질 내용에는 파일 단계를 사용하세요
  • PR 투어의 경우 변경된 파일을 먼저 다루세요
  • 모노레포의 경우 모든 것을 투어링하지 말고 관련 패키지로 범위를 좁히세요
  • 요약이 아닌, 독자가 이제 무엇을 할 수 있는지로 마무리하세요

관련 스킬

  • codebase-onboarding
  • coding-standards
  • council
  • 공식 업스트림 형식: microsoft/codetour

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

accessibility

Design, implement, and audit inclusive digital products using WCAG 2.2 Level AA. Use when building or auditing UI that must meet WCAG 2.2 Level AA, or when reviewing a change for keyboard, contrast, or screen-reader support.

affaan-m/claude-api

Anthropic Claude API patterns for Python and TypeScript. Covers Messages API, streaming, tool use, vision, extended thinking, batches, prompt caching, and Claude Agent SDK. Use when building applications with the Claude API or Anthropic SDKs.

affaan-m/everything-claude-code

Development conventions and patterns for everything-claude-code. JavaScript project with conventional commits.

affaan-m/everything-claude-code

End-to-end marketing campaign planning and execution. Covers audience research, positioning, campaign angle definition, landing page copy, email sequences, social posts, ad copy, short-form video scripts, and content calendars. Use as the orchestration layer for multi-channel product launches. Use when planning or executing a multi-channel product launch, or producing landing page, email, social, or ad copy.

affaan-m/everything-claude-code-conventions

Development conventions and patterns for everything-claude-code. JavaScript project with conventional commits.

affaan-m/frontend-design

Create distinctive, production-grade frontend interfaces with high design quality. Use when the user asks to build web components, pages, or applications and the visual direction matters as much as the code quality.

affaan-m/gget

gget CLI and Python workflow for quick genomic database queries, sequence lookup, BLAST-style searches, enrichment checks, and reproducible bioinformatics evidence logs.

affaan-m/literature-review

Systematic literature-review workflow for academic, biomedical, technical, and scientific topics, including search planning, source screening, synthesis, citation checks, and evidence logging.

affaan-m/motion-ui

Production-ready UI motion system for React/Next.js. Use when implementing animations, transitions, or motion patterns.

affaan-m/project-guidelines-example

Example project-specific skill template based on a real production application.

affaan-m/pubmed-database

Direct PubMed and NCBI E-utilities search workflows for biomedical literature, MeSH queries, PMID lookup, citation retrieval, and API-backed literature monitoring.

affaan-m/scholar-evaluation

Structured scholarly-work evaluation for papers, proposals, literature reviews, methods sections, evidence quality, citation support, and research-writing feedback.

affaan-m/uspto-database

USPTO patent and trademark data workflow for official record lookup, PatentSearch queries, TSDR checks, assignment data, and reproducible IP research logs.

agent-architecture-audit

Full-stack diagnostic for agent and LLM applications. Audits the 12-layer agent stack for wrapper regression, memory pollution, tool discipline failures, hidden repair loops, and rendering corruption. Produces severity-ranked findings with code-first fixes. Essential for developers building agent applications, autonomous loops, or any LLM-powered feature. Use when an agent or LLM feature misbehaves and the failing layer is unknown, or before shipping an agent stack.

agent-eval

Head-to-head comparison of coding agents (Claude Code, Aider, Codex, etc.) on custom tasks with pass rate, cost, time, and consistency metrics. Use when choosing between coding agents, or when a change to an agent setup needs measured pass rate, cost, and time rather than an impression.

agent-harness-construction

Design and optimize AI agent action spaces, tool definitions, and observation formatting for higher completion rates. Use when defining or revising an agent

agentic-engineering

Operate as an agentic engineer using eval-first execution, decomposition, and cost-aware model routing. Use when planning or executing engineering work that agents will carry out end to end.

agentic-os

Build persistent multi-agent operating systems on Claude Code. Covers kernel architecture, specialist agents, slash commands, file-based memory, scheduled automation, and state management without external databases. Use when building a persistent multi-agent system on Claude Code with its own memory, commands, and scheduling.

agent-introspection-debugging

Structured self-debugging workflow for AI agent failures using capture, diagnosis, contained recovery, and introspection reports. Use when an agent run fails and you need a reproducible diagnosis instead of a retry.

agent-payment-x402

Add x402 payment execution to AI agents with per-task budgets, spending controls, and non-custodial wallets. Supports Base through agentwallet-sdk and X Layer through OKX Payments / OKX Agent Payments Protocol. Use when an agent must pay for something itself and needs per-task budgets, spending controls, and a non-custodial wallet.

관련 스킬