Claude Code Setup: Agents and Docs Before Any Prompts
Reliable AI-built apps require upfront setup: Planner agent for PRD, custom claude.md with rules/negative constraints, skills/agents/MCPs, progress/learnings docs, spec-first tests, GitHub/Notion tracking, and K6 stress tests—prevents errors and scales to production.
Plan Requirements with a Dedicated Agent for Product-Focused PRD
Use a custom Planner agent instead of Claude's technical planning mode, which overlooks product aspects. The agent iteratively asks questions to clarify your app's MVP, adding user needs until you confirm completion. It then generates a PRD document saved to the project folder, detailing requirements, phased implementation, and key design decisions. Link this PRD in claude.md so agents reference it directly, avoiding repetition. This product-centric planning leverages modern models' technical strengths, ensuring the PRD guides all builds without technical overload.
Configure claude.md, Rules, and Constraints to Guide Agents Precisely
Manually craft claude.md—avoid the init command, which bases it on existing code rather than needs. Include only project-specific instructions Claude can't infer: best practices, coding/writing conventions, PRD link. Exclude obvious details like file structure, which agents deduce from the codebase. Add path-specific rules for app sections (e.g., frontend guidelines) and link them in claude.md for targeted enforcement.
Counter agents' action bias with a negative constraints doc in /docs, linked to claude.md. Explicitly list prohibitions (e.g., no default purple/blue UI schemes) to close gaps in positive instructions, eliminating ambiguity and unwanted experimentation. Maintain progress.md to track implemented vs. pending features (avoids token-wasting codebase scans) and learnings.md for errors, causes, fixes—agents update both per claude.md instructions, preventing repeat mistakes.
Deploy Skills, Agents, MCPs, and Testing for Repeatable, Scalable Builds
Pre-install MCPs for external tools (e.g., Supabase backend, shadcn/ui components, Playwright testing) via install commands. Configure agents for dedicated tasks: Commit agent for pre-checks/conventional commits; Refactoring agent for performance; Verification agent using Playwright MCP to check UI flows.
Use skills for repeatable workflows with references/scripts (create via open-source GitHub skill creator): e.g., open-source Front-End skill for consistent UI implementation. Reserve agents for context-heavy tasks.
Write tests from PRD specs first—agent reverse-engineers functionality/edge cases, ensuring implementation matches requirements, not just existing code. This catches spec deviations early, unlike post-build tests that optimize for flaws.
Track issues via GitHub (detailed commits, reverts, worktrees) for technical users; connect Notion/Trello MCP for non-technical collaboration, with claude.md instructing bug logging/progress updates. For production, specify concurrent user estimates; agent plans scalability (use Claude plan mode for technical details), then stress tests with K6 (or similar) to handle load, ensuring graceful failures.