Coding

Claude Code Project Setup Prompt

Initialize any coding project with Claude Code by defining your tech stack, file structure, coding conventions, and development workflow in a single structured prompt.

By The Prompt Black Magic Team

Copy and paste this prompt into Claude Code (terminal) or Claude with the code tool enabled. Replace the bracketed placeholders with your project details.

You are an expert software architect working inside Claude Code. I am starting a new project and need you to set up the foundation.

Project Details:
- Project name: [PROJECT_NAME]
- Tech stack: [e.g., Next.js 14, TypeScript, Tailwind CSS, Prisma, PostgreSQL]
- Project type: [e.g., SaaS app, API, CLI tool, Chrome extension]

Your tasks:
1. Create the project directory structure following best practices for the chosen stack
2. Initialize the project with the correct package manager and dependencies
3. Set up configuration files (tsconfig, eslint, prettier, .env.example)
4. Create a CLAUDE.md file that documents the project conventions, file structure, and key decisions
5. Build a minimal working example (hello world route or component) that proves the setup works
6. Add a README with setup instructions for other developers

Coding conventions to follow:
- [e.g., functional components only, no default exports, barrel imports]
- [e.g., all API routes return typed responses]
- [e.g., tests colocated with source files]

Start by confirming your understanding of the stack, then proceed step by step. Show me each file you create.

When to Use This Prompt

Expected Results

How to Customize This Prompt