Project initialization and setup workflow. Use when starting a new project,
setting up AI-assisted development environment, or bootstrapping an existing codebase
with Samuel framework structure.
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
A direct command skips the review prompt. Inspect the source before running it.
Project initialization and setup workflow. Use when starting a new project,
setting up AI-assisted development environment, or bootstrapping an existing codebase
with Samuel framework structure.
1. CLAUDE.md
Document discovered tech stack and observed patterns.
Example:
# Project: ExistingApp## Discovered Tech Stack-**Language**: TypeScript 5.1
-**Framework**: Next.js 14 (App Router)
-**Database**: PostgreSQL with Prisma ORM
-**Testing**: Jest + React Testing Library
-**Styling**: Tailwind CSS
-**Deployment**: Vercel
## Observed Patterns- API routes in `app/api/`- Components use `use client` directive
- Server actions for mutations
- Zod for API validation
- Conventional commits (mostly followed)
## Gaps Identified- Test coverage: 45% (target: >60%)
- No pre-commit hooks
- ESLint config basic (missing recommended rules)
- Some files exceed 300 lines (needs refactoring)
- Missing .env.example
2. CLAUDE.md
Extract coding patterns from existing codebase.
Example:
# Patterns## API Error Handling
All API routes use this pattern:
\`\`\`typescript
try {
const data = await validateInput(req.body);
const result = await service.process(data);
return NextResponse.json(result);
} catch (error) {
return handleAPIError(error);
}
\`\`\`
## Database Queries
Always use Prisma with error handling:
\`\`\`typescript
const user = await prisma.user.findUnique({
where: { id }
}).catch(handlePrismaError);
\`\`\`
3. Gap Analysis & Recommendations
Propose improvements:
Add missing configuration files
Improve test coverage (identify untested modules)
Refactor oversized files (list files >300 lines)
Add pre-commit hooks (husky + lint-staged)
Update dependencies (security patches)
Improve documentation
Adoption Checklist
Confirm with user:
Tech stack correctly identified?
Architecture pattern accurate?
Code conventions match observations?
Testing approach correct?
Any custom patterns AI should know?
Any legacy code to avoid modifying?
Any protected files/directories?
Then proceed to:
Apply guardrails to new code (don't refactor existing immediately)
Suggest incremental improvements
Document conventions in .claude/
Set up recommended tooling (optional)
Post-Initialization
Verify Setup
New Projects:
# Install dependencies
npm install # or pip install -r requirements.txt# Run tests (should pass even if empty)
npm test# Start dev server
npm run dev
# Check linting
npm run lint
Then: "I've updated project.md. Please load the appropriate language guide."
Customization
Modify Initial Structure
Edit .claude/skills/initialize-project/SKILL.md to customize:
Default directory structure
Configuration file templates
Questions AI asks
Files AI creates
Add Company Standards
Create .claude/company-standards.md:
# Company Standards## Required Tools- ESLint with company config
- Prettier with company config
- Husky for pre-commit hooks
## Required Files- SECURITY.md
- CONTRIBUTING.md
- LICENSE (MIT)
## Deployment- All projects deploy to AWS
- Use Terraform for infrastructure
- CI/CD via GitHub Actions
AI will reference this during initialization.
Success Criteria
CLAUDE.md created with accurate tech stack
CLAUDE.md created (if existing project)
Directory structure appropriate for language
Configuration files generated
.gitignore includes language-specific entries
.env.example created with secure defaults
README.md has setup instructions
Dependencies install successfully
Tests run (even if empty)
Dev server starts
References
For detailed templates and examples, see:
references/process.md - Full directory structures and configuration templates
Remember: Initialization is a one-time setup. The .claude/ directory grows organically as the project evolves. Don't over-document upfront - let patterns emerge naturally.