assets/skills/onboarding/SKILL.md
Codebase onboarding workflow for understanding new projects. Use when joining a project, exploring codebase, or when user says "explain codebase", "onboard me", "new to project", "understand project", "explore codebase", "project overview".
npx skillsauth add phuthuycoding/moicle onboardingInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Complete workflow for understanding and navigating new codebases effectively.
Before analyzing the codebase, you MUST read the appropriate architecture reference:
~/.claude/architecture/
├── clean-architecture.md # Core principles for all projects
├── flutter-mobile.md # Flutter + Riverpod
├── react-frontend.md # React + Vite + TypeScript
├── go-backend.md # Go + Gin
├── laravel-backend.md # Laravel + PHP
├── remix-fullstack.md # Remix fullstack
└── monorepo.md # Monorepo structure
.claude/architecture/ # Project overrides
Understanding the architecture first helps you grasp the codebase structure faster.
| Phase | Agent | Purpose |
|-------|-------|---------|
| SCAN | @clean-architect | Identify architecture patterns |
| ANALYZE | @clean-architect | Analyze layer structure and boundaries |
| ANALYZE | @code-reviewer | Code quality and conventions analysis |
| ANALYZE | @security-audit | Security patterns review |
| EXPLAIN | @docs-writer | Generate documentation/explanation |
| GUIDE | @docs-writer | Create navigation guide |
┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐
│ 1. SCAN │──▶│ 2. ANALYZE──▶│ 3. EXPLAIN──▶│ 4. GUIDE │
└──────────┘ └──────────┘ └──────────┘ └──────────┘
│ │ │ │
└──────────────┴───────────────┴──────────────┘
Comprehensive Understanding
Goal: Get a quick overview of project structure and tech stack
Identify project type and stack:
# Check package files
ls -la | grep -E "package.json|pubspec.yaml|go.mod|composer.json|requirements.txt"
# Check framework markers
ls -la | grep -E "next.config|vite.config|angular.json|remix.config"
Identify and read the appropriate architecture doc based on stack
Scan directory structure:
tree -L 2 -I 'node_modules|vendor|dist|build|.git'
# or
ls -R | grep ":$" | sed -e 's/:$//' -e 's/[^-][^\/]*\//--/g'
Check tech stack and dependencies:
package.json (Node.js/JS)pubspec.yaml (Flutter)go.mod (Go)composer.json (PHP/Laravel)requirements.txt (Python)Look for documentation:
## Project Scan Results
### Stack Identification
- **Primary Language**: [JavaScript/TypeScript/Dart/Go/PHP/Python]
- **Framework**: [React/Flutter/Gin/Laravel/Django/etc]
- **Architecture Doc**: [path to applicable architecture reference]
- **Build Tool**: [Vite/Webpack/Maven/Gradle/etc]
- **Package Manager**: [npm/bun/yarn/pub/go mod/composer]
### Directory Structure
project/ ├── src/ # [description based on architecture doc] ├── tests/ # [testing structure] ├── config/ # [configuration] └── docs/ # [documentation]
### Key Dependencies (Top 5)
1. [dependency] - [purpose]
2. [dependency] - [purpose]
3. [dependency] - [purpose]
### Documentation Available
- [ ] README.md
- [ ] Architecture docs (.claude/architecture/)
- [ ] API documentation
- [ ] Contributing guide
Goal: Deep dive into architecture, patterns, and conventions
Analyze architecture based on the reference doc:
Identify code patterns and conventions:
# Find main entry points
grep -r "main\|index\|app" --include="*.{js,ts,dart,go,php,py}"
# Find common patterns
grep -r "class\|interface\|type\|struct" --include="*.{js,ts,dart,go,php}"
# Find state management
grep -r "useState\|Provider\|Redux\|Riverpod\|Bloc" --include="*.{js,ts,dart}"
Analyze configuration:
Check testing setup:
Review code quality setup:
## Architecture Analysis
### Reference Document
**Architecture Doc**: [path]
**Pattern**: [Clean Architecture/MVVM/MVC/etc]
### Layer Structure (from architecture doc)
1. **[Layer 1 - e.g., Presentation]**
- Location: [directory path]
- Responsibilities: [from doc]
- Key files: [list]
2. **[Layer 2 - e.g., Domain]**
- Location: [directory path]
- Responsibilities: [from doc]
- Key files: [list]
3. **[Layer 3 - e.g., Data]**
- Location: [directory path]
- Responsibilities: [from doc]
- Key files: [list]
### Data Flow (from architecture doc)
[User Input] → [Presentation] → [Domain] → [Data] → [External APIs/DB] ← ← ←
### Key Patterns Identified
- **State Management**: [pattern used]
- **Dependency Injection**: [pattern used]
- **Routing**: [pattern used]
- **API Communication**: [pattern used]
- **Error Handling**: [pattern used]
### Naming Conventions
- **Files**: [convention - kebab-case, snake_case, PascalCase]
- **Classes**: [convention]
- **Functions**: [convention]
- **Constants**: [convention]
### Code Quality
- **Linter**: [ESLint/Dart Analyzer/golangci-lint/etc]
- **Formatter**: [Prettier/dartfmt/gofmt/etc]
- **Testing**: [Jest/PHPUnit/Go test/etc]
- **Coverage Target**: [percentage if specified]
### Configuration
- **Environment Variables**: [.env location and key vars]
- **Config Files**: [list important configs]
- **Build Config**: [description]
Goal: Generate comprehensive documentation/explanation
## Codebase Explanation
### Project Overview
**Name**: [project name]
**Purpose**: [what it does]
**Stack**: [tech stack]
**Architecture**: [pattern - with reference to doc]
---
### Architecture Overview
This project follows **[architecture pattern from doc]**
#### Directory Structure Explained
project/ ├── [layer1]/ # [Purpose based on architecture doc] │ ├── [component]/ # [Specific purpose] │ └── [component]/ # [Specific purpose] ├── [layer2]/ # [Purpose based on architecture doc] │ ├── [component]/ # [Specific purpose] │ └── [component]/ # [Specific purpose] └── [layer3]/ # [Purpose based on architecture doc] ├── [component]/ # [Specific purpose] └── [component]/ # [Specific purpose]
---
### Key Components
#### 1. [Component Name]
- **Location**: [path]
- **Layer**: [which layer from architecture doc]
- **Purpose**: [what it does]
- **Key Files**:
- `[file1]` - [purpose]
- `[file2]` - [purpose]
- **Dependencies**: [what it depends on]
#### 2. [Component Name]
- **Location**: [path]
- **Layer**: [which layer from architecture doc]
- **Purpose**: [what it does]
- **Key Files**:
- `[file1]` - [purpose]
- `[file2]` - [purpose]
- **Dependencies**: [what it depends on]
(Repeat for top 5-10 components)
---
### Common Workflows
#### Workflow 1: [e.g., User Authentication]
**Files Involved**:
- [file1] - [role]
- [file2] - [role]
- [file3] - [role]
#### Workflow 2: [e.g., Data Fetching]
[Describe step by step following architecture layers]
**Files Involved**:
- [file1] - [role]
- [file2] - [role]
---
### Important Files Reference
#### Core Files
- `[file]` - [purpose]
- `[file]` - [purpose]
#### Configuration
- `[file]` - [purpose]
- `[file]` - [purpose]
#### Entry Points
- `[file]` - [main entry]
- `[file]` - [test entry]
---
### Setup & Development
#### Installation
```bash
# [step-by-step installation based on project]
# Start dev server
[command]
# Run tests
[command]
# Build
[command]
# Lint
[command]
Required variables (see .env.example):
[VAR] - [purpose][VAR] - [purpose][command]
### Gate
- [ ] Architecture explained clearly
- [ ] Key components documented
- [ ] Workflows mapped
- [ ] Setup instructions provided
---
## Phase 4: GUIDE
**Goal**: Create a practical navigation guide for common tasks
### Actions
1. **Create task-based guides** (how to add features, fix bugs)
2. **Document where to find things** (quick reference)
3. **List common gotchas** and solutions
4. **Provide quick wins** (easy first tasks)
### Guide Template
```markdown
## Navigation Guide
### How to Add a New Feature
Following the **[architecture pattern from doc]**, here's the step-by-step:
1. **Define in Domain Layer** (if applicable):
- Create entity: `[path]/entities/`
- Create use case: `[path]/usecases/`
2. **Implement in Data Layer**:
- Create repository: `[path]/repositories/`
- Create data source: `[path]/datasources/`
3. **Build in Presentation Layer**:
- Create UI component: `[path]/screens/` or `[path]/pages/`
- Add state management: `[path]/providers/` or `[path]/stores/`
4. **Add Tests**:
- Unit tests: `[path]/test/`
- Integration tests: `[path]/test/`
5. **Update Documentation**:
- Update README if needed
- Add inline documentation
### How to Fix a Bug
1. **Locate the Layer** (use architecture doc):
- UI bug? → Check Presentation layer at `[path]`
- Business logic bug? → Check Domain layer at `[path]`
- Data bug? → Check Data layer at `[path]`
2. **Find Related Files**:
- Search by feature: `grep -r "[feature_name]" [layer_path]`
- Check recent changes: `git log --oneline [file]`
3. **Fix Following Patterns** (from architecture doc)
4. **Test**:
- Run existing tests: `[command]`
- Add regression test
### Where to Find Things
| What | Where |
|------|-------|
| API endpoints | `[path]` |
| Database models | `[path]` |
| UI components | `[path]` |
| Business logic | `[path]` |
| State management | `[path]` |
| Constants | `[path]` |
| Utils/Helpers | `[path]` |
| Config | `[path]` |
| Tests | `[path]` |
| Types/Interfaces | `[path]` |
### Common Tasks Quick Reference
#### Add a new API endpoint
```bash
1. Define route in [path]
2. Create controller in [path]
3. Add service logic in [path]
4. Update types in [path]
5. Test with [command]
1. Create component in [path]
2. Add styles in [path]
3. Export from [path]
4. Use in [path]
1. Create migration in [path]
2. Define model in [path]
3. Add repository in [path]
4. Run migration: [command]
[Gotcha 1]
[Gotcha 2]
[Gotcha 3]
Good first issues to familiarize yourself:
Fix a typo or improve documentation
Add a simple utility function
[path]/utils/Add a test for existing code
[path]/test/Improve error messages
[path]/errors/# Create feature branch
git checkout -b feature/[name]
# Make changes following architecture
# Commit (follow conventional commits)
git commit -m "[type]: [description]"
# Push and create PR
git push origin feature/[name]
gh pr create
~/.claude/architecture/[stack].mddocs/ or README.md[path][path]/test/ shows usage patterns
### Gate
- [ ] Task guides created
- [ ] Navigation reference provided
- [ ] Common gotchas documented
- [ ] Quick wins identified
---
## Quick Reference
### Architecture Docs
| Stack | Doc |
|-------|-----|
| All | `clean-architecture.md` |
| Flutter | `flutter-mobile.md` |
| React | `react-frontend.md` |
| Go | `go-backend.md` |
| Laravel | `laravel-backend.md` |
| Remix | `remix-fullstack.md` |
| Monorepo | `monorepo.md` |
### Phase Summary
| Phase | Key Actions | Output |
|-------|-------------|--------|
| SCAN | Identify stack, read arch doc, map structure | Project overview |
| ANALYZE | Deep dive into layers, patterns, conventions | Architecture analysis |
| EXPLAIN | Document components, workflows, setup | Comprehensive guide |
| GUIDE | Create task guides, navigation, quick wins | Practical handbook |
### Onboarding Checklist
After completing this workflow, you should understand:
- [ ] Project tech stack and dependencies
- [ ] Architecture pattern and layers
- [ ] Directory structure and where to find things
- [ ] How to add new features (following architecture)
- [ ] How to fix bugs (following architecture)
- [ ] Testing strategy and how to run tests
- [ ] Development workflow and commands
- [ ] Common patterns and conventions
- [ ] Where to get help
### Success Criteria
Onboarding is complete when you can:
1. Explain the project architecture (based on reference doc)
2. Locate any component or feature quickly
3. Add a simple feature following the architecture
4. Run tests and understand the output
5. Navigate the codebase confidently
### Next Steps After Onboarding
1. **Pick a Quick Win** - Complete an easy first task
2. **Read Architecture Doc** - Deep dive into the specific patterns
3. **Pair with Code** - Review existing features to learn patterns
4. **Ask Questions** - Clarify anything unclear
5. **Start Contributing** - Begin with small features following the architecture
development
Test-Driven Development workflow. Use when doing TDD, writing tests first, or when user says "tdd", "test first", "test driven", "red green refactor".
development
Thorough pull request review workflow with architecture compliance checks. Use when reviewing pull requests, checking code changes, or when user says "review pr", "check pr", "review code", "pr review", "review pull request".
development
Review local branch changes for architecture compliance, conventions, and code quality before pushing/PR. Stack-aware — detects the project stack and applies the matching rules. Use when user says "review changes", "review branch", "check branch", "check changes", "review my code", "review before pr".
testing
DDD architecture compliance review with automated checks and review loop. Use when user says "architect-review", "architecture review", "review architecture", "check architecture", "review ddd", "ddd review".