一键导入
assistant-onboard
Map an unfamiliar codebase and its patterns. Use for onboarding, project orientation, or explicit codebase-learning requests.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Map an unfamiliar codebase and its patterns. Use for onboarding, project orientation, or explicit codebase-learning requests.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Clarify ambiguous or multi-intent requests. Use when the user asks to untangle, structure, or restate what they mean.
Manage durable memory safely. Use for explicit remember, recall, forget, or memory-health requests and stable corrections or preferences.
Review code and re-review fixes until clean. Use for explicit code review or the workflow Review phase; QA runs only when required.
Create or update V1 skills and contracts. Use for skill scaffolding, contract design, or contract-compliance validation.
Run proportional development phases. Use to plan, build, implement, fix, migrate, or refactor project artifacts.
Generate and rank options. Use light mode for quick improvement scans and deep mode for explicit brainstorming or broad exploration.
| name | assistant-onboard |
| description | Map an unfamiliar codebase and its patterns. Use for onboarding, project orientation, or explicit codebase-learning requests. |
| effort | high |
| triggers | [{"pattern":"learn this codebase|onboard|get familiar with|map this project|what does this project do|new to this repo|first time","priority":65,"min_words":4,"reminder":"This request matches assistant-onboard. Load and follow this SKILL.md and its contracts for systematic codebase learning."}] |
| File | Purpose |
|---|---|
contracts/input.yaml | project_path, focus_area, depth |
contracts/output.yaml | project_summary, key_files[], conventions[], risky_areas[], likely_change_points[], artifacts[], artifact_updated, durable_memory_updated, questions[] |
project_path is required; depth defaults to standard when not specifiedkey_files entries include path and purpose; conventions entries include pattern and examplerisky_areas and likely_change_points make the orientation actionable for future development workquestions must be specific to unclear areas discovered during onboardingSystematic protocol for learning a new codebase. Produces structured project orientation that accelerates future work. Project-local orientation artifacts are optional and must follow the active agent/workplace policy; do not assume third-party memory tooling is available.
Core principle: Understand before acting. Map the territory before navigating it.
Company-safe defaults:
Build a compact, evidence-based orientation for the project so future development starts from real structure, commands, conventions, and gaps.
Print: >> Onboarding: Surface scan
Read in this order (stop early if small project):
When the active adapter supports parallel reads, batch independent reads such as README, agent instructions, .gitignore, root listing, build files, and CI config. If parallel reads are unavailable, use the order below.
.cursorrules, or equivalentExtract:
Print: >> Onboarding: Architecture mapping
For medium+ projects, dispatch a Code Mapper subagent if available. If delegation is unavailable in the active adapter or tool policy, perform a lightweight local map and record that Code Mapper dispatch was unavailable.
Map:
Print: >> Onboarding: Pattern recognition
Identify the project's conventions by reading 3-5 representative files:
Print: >> Onboarding: Identifying unknowns and risk areas
List what you still don't understand:
Also identify practical development guidance:
Present only specific gaps to the user. Do not ask generic "anything else?" questions.
Print: >> Onboarding: Generating project orientation
Create or update a project-local orientation artifact only when allowed by user/project policy. Prefer the active agent's configured project note path; examples include {agent_state_dir}/memory.md, or a documented repo-local equivalent. If no safe path is known, do not write a file; return the orientation in the response.
# [Project Name]
## Purpose
[What it does, who uses it]
## Tech Stack
- Language: [language] [version]
- Framework: [framework] [version]
- Database: [database]
- Key dependencies: [list]
## Architecture
- Pattern: [pattern name]
- Entry points: [list with paths]
- Layers: [list with descriptions]
## Conventions
- Naming: [convention]
- Error handling: [pattern]
- Testing: [framework, naming convention]
- DI: [registration pattern]
## Build and Test Commands
```bash
[build command]
[test command]
Durable memory / knowledge graph updates are optional and policy-dependent:
- If local memory tools are approved and available, record only stable conventions, project identity, and non-obvious development rules.
- If memory tools are unavailable or policy-disallowed, skip durable memory updates and set `durable_memory_updated=false` in the report.
- Project-local orientation artifacts are tracked separately in `artifacts[]`; writing an orientation file does not imply durable memory was updated.
- Never store secrets, internal credentials, private endpoints, customer data, transient task progress, PR numbers, or issue status.
### Phase 6: Report
Print: `>> Onboarding complete`
Present a concise summary:
Project: [name] Stack: [tech stack summary] Architecture: [pattern] Size: [small/medium/large] (~[N] files, ~[N]k lines) Commands: [build/test/run summary] Conventions: [key conventions] Risky areas: [auth/data/integration/test gaps/etc.] Likely change points: [top directories/files] Unknowns: [any remaining gaps]
Project orientation: [saved to path | returned in response only] Ready to work on this codebase.
## Output
Return:
- **Project summary** - purpose, stack, architecture, approximate size, and primary build/test/run commands.
- **Key files** - important paths with their role in the system.
- **Conventions** - discovered patterns with concrete examples.
- **Risky areas** - surfaces that need extra care in future work and why.
- **Likely change points** - files/directories future features or fixes will likely touch.
- **Artifacts** - orientation or memory files created or updated, or "none" if no files changed.
- **Gaps** - unknowns, assumptions, and specific questions for the user.
- **Status** - onboarded, partially onboarded, or blocked by missing access/context.
## Incremental Onboarding
When returning to a known project after significant time:
1. Read existing project-local orientation if present and policy-allowed (`{agent_state_dir}/memory.md`, or configured equivalent)
2. Check `git log --since="[last session date]"` for changes when git history is available
3. Update orientation only with stable conventions or structural changes; otherwise report refresh results without writing
4. Print: `>> Refreshed project context — [N] changes since last session`
## Rules
- **Never skip Phase 1** — even for "quick" tasks in a new repo
- **Don't read everything** — sample representative files, don't read every file
- **Ask about unknowns** — don't guess business logic or domain concepts
- **Keep memory concise** — under 100 lines, focused on stable development conventions
- **Update, don't overwrite** — if memory.md exists, update sections, don't regenerate
## Stop Rules
- Stop and ask one focused question when project path, focus area, or onboarding depth cannot be inferred and changes the inspection plan.
- Stop and report blocked status when required files cannot be read.
- Do not proceed to code changes as part of onboarding.