onboard

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Onboard - Project Discovery & Ledger Creation

项目上手 - 项目发现与台账创建

Analyze a brownfield codebase and create an initial continuity ledger.
分析遗留代码库并创建初始连续性台账。

When to Use

适用场景

  • First time working in an existing project
  • User says "onboard", "analyze this project", "get familiar with codebase"
  • 首次参与现有项目时
  • 用户提出"上手项目"、"分析这个项目"、"熟悉代码库"等需求时

How to Use

使用方法

Spawn the onboard agent:
Use the Task tool with
subagent_type: "onboard"
and this prompt:
Onboard me to this project at $CLAUDE_PROJECT_DIR.

1. Create required directories if they don't exist:
   mkdir -p thoughts/shared/handoffs/<project-name> .claude

2. Explore the codebase using available tools:
   - Try: tldr tree . && tldr structure .
   - Fallback: find . -type f -name "*.py" -o -name "*.ts" -o -name "*.js" | head -50

3. Detect tech stack (look for package.json, requirements.txt, Cargo.toml, go.mod, etc.)

4. Ask the user about their goals using AskUserQuestion

5. Create a YAML handoff at thoughts/shared/handoffs/<project-name>/onboard-<date>.yaml:
   ---
   date: <ISO date>
   type: onboard
   status: active
   ---
   goal: <user's stated goal>
   now: Start working on <first priority>
   tech_stack: [list of detected technologies]
   key_files:
     - path: <important file>
       purpose: <what it does>
   architecture: <brief description>
   next:
     - <suggested first action>
启动上手Agent:
使用Task工具,设置
subagent_type: "onboard"
并传入以下提示词:
帮我上手$CLAUDE_PROJECT_DIR路径下的这个项目。

1. 若所需目录不存在则创建:
   mkdir -p thoughts/shared/handoffs/<project-name> .claude

2. 使用可用工具探索代码库:
   - 优先尝试:tldr tree . && tldr structure .
   - 备选方案:find . -type f -name "*.py" -o -name "*.ts" -o -name "*.js" | head -50

3. 检测技术栈(查找package.json、requirements.txt、Cargo.toml、go.mod等文件)

4. 使用AskUserQuestion询问用户的目标

5. 在thoughts/shared/handoffs/<project-name>/onboard-<date>.yaml路径下创建YAML交接文档:
   ---
   date: <ISO日期>
   type: onboard
   status: active
   ---
   goal: <用户明确的目标>
   now: 开始处理<首要任务>
   tech_stack: [检测到的技术列表]
   key_files:
     - path: <重要文件路径>
       purpose: <文件功能>
   architecture: <简要描述>
   next:
     - <建议的首个行动>

Why an Agent?

为何使用Agent?

The onboard process:
  • Requires multiple exploration steps
  • Should not pollute main context with codebase dumps
  • Returns a clean summary + creates the handoff
项目上手流程:
  • 需要多步探索操作
  • 不应将代码库内容直接导入主上下文造成冗余
  • 返回简洁的总结并创建交接文档

Output

输出结果

  • Directories created:
    thoughts/shared/handoffs/<project>/
    ,
    .claude/
  • YAML handoff created (loaded automatically on session start)
  • User has clear starting context
  • Ready to begin work with full project awareness
  • 创建的目录:
    thoughts/shared/handoffs/<project>/
    ,
    .claude/
  • 生成YAML交接文档(会话启动时会自动加载)
  • 用户获得清晰的初始上下文
  • 具备完整的项目认知,可立即开展工作

Notes

注意事项

  • This skill is for BROWNFIELD projects (existing code)
  • For greenfield, use
    /create_plan
    instead
  • Handoff can be updated anytime with
    /create_handoff
  • 本技能适用于遗留(BROWNFIELD)项目(已有代码的项目)
  • 针对全新(greenfield)项目,请使用
    /create_plan
  • 可随时使用
    /create_handoff
    更新交接文档