Overview
ZeroStarter includes structured instructions for AI assistants and LLM agents through theAGENTS.md and CLAUDE.md files. These guides help AI tools like Cursor, GitHub Copilot, Claude Code, and other AI coding assistants work effectively with the codebase by providing project-specific context and conventions.
Agent Instructions
AGENTS.md
Provides general guidance to all AI coding agents working with the repository. Location:AGENTS.md (repository root)
Key Guidelines:
- Minimal Comments: Only add comments when absolutely necessary
- Import Aliases: Use
@/for imports where applicable - Custom Skills: Skills are located in
.claude/skills,.cursor/skills, or.github/skillsdirectories
CLAUDE.md
Provides comprehensive guidance specifically for Claude Code (claude.ai/code) with detailed commands, architecture overview, and code style conventions. Location:CLAUDE.md (repository root)
Commands Reference
TheCLAUDE.md file documents all essential commands for working with ZeroStarter:
Development Commands
Development Commands
Database Commands
Database Commands
Build & Quality Commands
Build & Quality Commands
Architecture Context
AI assistants receive structured information about the monorepo architecture:Apps
api/hono- Hono backend API server (port 4000), exportsAppTypefor RPC clientweb/next- Next.js 16 frontend (port 3000)
Packages
@packages/auth- Better Auth configuration with GitHub/Google OAuth@packages/db- Drizzle ORM schema and PostgreSQL connection (Bun SQL driver)@packages/env- Type-safe environment variables with@t3-oss/env-core, exports per-app envs (env/api-hono,env/auth,env/db,env/web-next)@packages/tsconfig- Shared TypeScript configs
Type-Safe API Pattern
Backend routes inapi/hono/src/routers/ are exported as AppType. Frontend imports this type and uses hono/client for fully typed requests:
Code Style Conventions
AI assistants are instructed to follow these conventions:Git Hooks
AI assistants are informed about Lefthook pre-commit hooks that run automatically:Pre-commit runs:
bun audit(on canary branch)lint-staged(staged files linting)build(full build check)
Route Groups (Next.js)
AI assistants understand the Next.js route organization:(content)- Docs and blog pages (Fumadocs)(protected)- Authenticated routes (dashboard)(llms.txt)- AI/LLM documentation endpoints
Best Practices
Database Schema Changes
Database Schema Changes
When modifying the database schema:
- Update schema files in
packages/db/src/schema/ - Generate migrations:
bun run db:generate - Review generated SQL in
packages/db/drizzle/ - Apply migrations:
bun run db:migrate
Type-Safe API Development
Type-Safe API Development
When adding new API routes:
- Create route in
api/hono/src/routers/ - Export from
api/hono/src/index.tsas part ofAppType - Use in frontend with
apiClientfor automatic type inference - No manual type definitions needed!
Environment Variables
Environment Variables
When adding new environment variables:
- Add to appropriate schema in
packages/env/src/ - Update
.env.examplewith description - Add to
turbo.jsonglobalEnvarray if needed - Type safety is automatic via
@t3-oss/env-core
Integration with AI Tools
Cursor
Cursor automatically readsAGENTS.md and CLAUDE.md from the repository root to understand project conventions.
GitHub Copilot
Copilot can reference these files when you mention them in comments or prompts.Claude Code
Claude Code (claude.ai/code) usesCLAUDE.md as its primary instruction source, providing comprehensive context about the project architecture and conventions.