--- description: Quick onboarding for a new project - detect stack and read key files --- # Project Onboarding ## Pre-computed Context **Project Root Files:** !`ls -la | head -20` **Package.json (if exists):** !`cat package.json 2>/dev/null | head -30 || echo "No package.json"` **README (if exists):** !`head -50 README.md 2>/dev/null || head -50 README 2>/dev/null || echo "No README"` **Git Info:** !`git remote -v 2>/dev/null | head -2 && echo "---" && git log --oneline -3 2>/dev/null || echo "Not a git repo"` --- ## Instructions You are onboarding to a new project. Your goal is to understand the codebase quickly. ### 1. Detect Tech Stack Look for these indicators: | File | Stack | |------|-------| | `package.json` | Node.js/JavaScript | | `tsconfig.json` | TypeScript | | `pyproject.toml`, `requirements.txt` | Python | | `go.mod` | Go | | `Cargo.toml` | Rust | | `pom.xml`, `build.gradle` | Java | | `Gemfile` | Ruby | | `composer.json` | PHP | ### 2. Identify Framework | Indicator | Framework | |-----------|-----------| | `next.config.*` | Next.js | | `vite.config.*` | Vite | | `angular.json` | Angular | | `vue.config.*` | Vue | | `remix.config.*` | Remix | | `astro.config.*` | Astro | | `django`, `settings.py` | Django | | `flask` | Flask | | `fastapi` | FastAPI | ### 3. Read Key Files #### Always Read - `README.md` - Project overview - `CONTRIBUTING.md` - Development guidelines - `CLAUDE.md` or `.claude/rules/` - AI assistant instructions #### JavaScript/TypeScript - `package.json` - Dependencies and scripts - `tsconfig.json` - TypeScript configuration - `src/index.ts` or `src/main.ts` - Entry point #### Python - `pyproject.toml` or `setup.py` - Project config - `requirements.txt` - Dependencies - `main.py` or `app.py` - Entry point ### 4. Understand Project Structure ```bash # Show directory structure find . -type d -not -path '*/node_modules/*' -not -path '*/.git/*' -not -path '*/__pycache__/*' | head -30 ``` Common patterns: - `src/` - Source code - `tests/` or `__tests__/` - Test files - `lib/` - Library code - `docs/` - Documentation - `scripts/` - Build/utility scripts ### 5. Generate Summary After analysis, provide: ```markdown ## Project: ### Tech Stack - **Language**: TypeScript - **Framework**: Next.js 14 - **Database**: PostgreSQL with Prisma - **Testing**: Jest + React Testing Library ### Key Directories - `src/app/` - Next.js app router pages - `src/components/` - React components - `src/lib/` - Utility functions - `prisma/` - Database schema ### Available Scripts - `npm run dev` - Start development server - `npm run build` - Build for production - `npm test` - Run tests ### Quick Start 1. `npm install` 2. `cp .env.example .env` 3. `npm run dev` ### Notes - Uses App Router (not Pages Router) - Auth handled by NextAuth.js - State management with Zustand ``` --- ## Usage When starting work on a new project: ```bash cd /path/to/new/project claude # In Claude: /workflow:onboard ``` This gives you context to start working effectively.