onboard-codebase
Analyze and document existing codebase for AI-assisted development. Use when adding this framework to an existing project.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Analyze and document existing codebase for AI-assisted development. Use when adding this framework to an existing project.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Generate customized .claude/ harness framework with Fusion Architecture (GAN-inspired + Domain Specialists). TRIGGER when user wants to set up AI-assisted development structure, create a new project harness, add structure to existing projects, or mentions 'harness', 'scaffold', 'framework setup'. Supports all domains through template + dynamic generation.
Negotiates 'done' criteria between Generator, Evaluator, and architect-lead before implementation begins. Converts subjective goals into testable, gradable criteria with clear domain responsibilities.
Guided database migration workflow — from schema design to rollback documentation.
Production incident response workflow — triage, root cause analysis, and resolution.
Track, categorize, and prioritize technical debt across the codebase.
Save current progress with structured handoff artifact. Enables context reset for long-running tasks and session recovery.
| name | onboard-codebase |
| description | Analyze and document existing codebase for AI-assisted development. Use when adding this framework to an existing project. |
| user-invocable | true |
You are analyzing an existing codebase to create AI-ready documentation. This enables effective AI-assisted development on established projects.
Onboarding enables:
/onboard-codebase
|
+--[1] Discovery
| - Scan project structure
| - Identify technologies
| - Detect conventions
|
+--[2] Documentation
| - Create CLAUDE.md
| - Generate architecture docs
| - Document patterns
|
+--[3] Integration
- Configure .claude/ directory
- Set up hooks
- Create initial checkpoint
PROJECT STRUCTURE
Root: [project root]
Type: [web/api/library/cli/etc.]
Directories:
- src/ ([purpose])
- tests/ ([purpose])
- docs/ ([purpose])
- [other directories]
Key files:
- package.json / requirements.txt
- CLAUDE.md (exists/missing)
- README.md
- [config files]
TECHNOLOGY STACK
Frontend:
- Framework: [React/Vue/Angular/etc.]
- Language: [TypeScript/JavaScript]
- Styling: [CSS/Tailwind/Styled/etc.]
- State: [Redux/Vuex/Context/etc.]
Backend:
- Framework: [FastAPI/Flask/Express/etc.]
- Language: [Python/Node/etc.]
- Database: [PostgreSQL/Mongo/etc.]
- Cache: [Redis/Memcached/etc.]
Infrastructure:
- Container: [Docker/K8s/etc.]
- CI/CD: [GitHub Actions/Jenkins/etc.]
- Cloud: [AWS/GCP/Azure/etc.]
DETECTED CONVENTIONS
Code Style:
- [Language] linter: [detected config]
- Formatter: [Prettier/Black/etc.]
- Import style: [ESM/CommonJS/etc.]
Naming:
- Files: [kebab-case/PascalCase/etc.]
- Components: [PascalCase]
- Functions: [camelCase/snake_case]
- Constants: [UPPER_SNAKE]
Patterns:
- API style: [REST/GraphQL/RPC]
- Auth: [JWT/Session/OAuth/etc.]
- Error handling: [pattern]
- Testing: [Jest/Pytest/etc.]
ARCHITECTURE OVERVIEW
Entry Points:
- [entry point 1]: [purpose]
- [entry point 2]: [purpose]
Core Modules:
- [module 1]: [purpose]
- [module 2]: [purpose]
Data Flow:
[User] -> [Entry] -> [Handler] -> [Service] -> [Data] -> [Storage]
Key Dependencies:
- [dependency 1]: [purpose]
- [dependency 2]: [purpose]
Create or update CLAUDE.md:
# [Project Name] - AI Development Guide
## Project Overview
[Brief description from README or analysis]
## Technology Stack
[From technology detection]
## Project Structure
[From structure analysis]
## Key Conventions
[From convention detection]
## Development Workflow
### Getting Started
[detected setup commands]
### Development
[detected dev commands]
### Testing
[detected test commands]
### Build/Deploy
[detected build commands]
## Architecture Notes
[From architecture mapping]
## AI Collaboration Notes
### Code Generation Guidelines
- Follow existing patterns
- Use detected conventions
- Maintain consistency with [detected style]
### Areas of Caution
- [Sensitive areas]
- [Complex modules]
- [Known issues]
## Session State Location
- Checkpoints: .claude/checkpoints/
- Handoffs: .claude/handoff.md
- Session: .claude/session-state.md
Create docs/architecture/:
# Architecture Decision Records
## ADR-001: [First Major Decision]
### Context
[Why this decision was made]
### Decision
[What was decided]
### Consequences
[Impact of this decision]
## ADR-002: [Second Major Decision]
...
Create docs/patterns/:
# Code Patterns
## API Pattern
[Detected API pattern with examples]
## Error Handling Pattern
[Detected error handling with examples]
## Data Access Pattern
[Detected data access pattern]
## Testing Pattern
[Detected testing conventions]
.claude/
settings.json # Permissions and hooks
checkpoints/ # Session checkpoints
handoff.md # Context reset handoff
session-state.md # Active session state
{
"permissions": {
"allow": ["Read", "Edit", "Write", "Bash"],
"deny": []
},
"hooks": {
"session-start": ".claude/hooks/session-start.sh",
"session-stop": ".claude/hooks/session-stop.sh"
}
}
# Initial Checkpoint: Onboarding Complete
## Context
- Onboarded: [timestamp]
- Technology: [stack summary]
- Structure: [architecture summary]
## Next Steps
- Begin development work
- Use /start for session initialization
- Use /checkpoint to save progress
## Known Areas
- [area 1]: [notes]
- [area 2]: [notes]
ONBOARDING COMPLETE
Project: [name]
Type: [web/api/library]
Technologies: [count] detected
Conventions: [count] documented
Created:
- CLAUDE.md (AI development guide)
- docs/architecture/ (decision records)
- docs/patterns/ (code patterns)
- .claude/ (session management)
Next Steps:
1. Review generated CLAUDE.md
2. Add project-specific notes
3. Begin using AI assistance
4. Run /start to begin session
Onboarding saved to checkpoint: cp-onboard-[timestamp]
/onboard-codebase # Full onboarding
/onboard-codebase --quick # Quick scan, minimal docs
/onboard-codebase --update # Update existing documentation
/onboard-codebase --tech-only # Document technology only
/onboard-codebase --patterns-only # Document patterns only
During onboarding, you may be asked:
MULTIPLE CONFIG FILES DETECTED
Found:
- .eslintrc.json
- .eslintrc.js
- package.json (eslintConfig)
Which should be authoritative?
[1] .eslintrc.json
[2] .eslintrc.js
[3] package.json
[4] Merge all
UNCLEAR ARCHITECTURE
Multiple patterns detected:
- MVC (controllers/, models/, views/)
- Layered (api/, services/, data/)
- Modular (modules/, shared/)
Which best describes this project?
[1] MVC
[2] Layered
[3] Modular
[4] Custom (describe)
ONBOARDING FAILED
Error: [error description]
Recovery: [suggested fix]
Partial results saved to: .claude/onboard-partial.md
Manual intervention may be needed.