NAME
replit.md — instruction file for Replit
SYNOPSIS
./replit.md
METADATA
DESCRIPTION
replit.md is the instruction file for Replit Agent, the autonomous AI coding assistant built into the Replit cloud IDE. When the Agent starts a session, it reads this file from the project root to understand the project's conventions, architecture, and development workflow.
The file uses plain Markdown with no special syntax or schema requirements. It serves the same purpose as CLAUDE.md or .cursorrules but is specific to the Replit Agent. The content is straightforward: describe your project, set coding standards, and list important commands.
Since Replit projects live in the cloud, replit.md coexists with other Replit-specific files like `.replit` (runtime config) and `replit.nix` (Nix packages). The replit.md file is committed to version control and visible to anyone who forks the Repl.
STRUCTURE
ANNOTATED EXAMPLE
1# Replit Agent Instructions
2
3## Project Overview
4This is a Next.js 14 application with App Router, using TypeScript
5and Tailwind CSS. It connects to a Neon PostgreSQL database via Drizzle ORM.
6
7## Code Style
8- TypeScript strict mode with no `any` types
9- Use server components by default, client components only when needed
10- Named exports for all components and utilities
11- Use Tailwind CSS — no CSS modules or styled-components
12
13## Architecture
14- `app/` — Next.js App Router pages and layouts
15- `components/` — Reusable React components
16- `lib/` — Utilities, database client, auth helpers
17- `db/` — Drizzle schema and migrations
18
19## Commands
20```bash
21npm run dev # Start development server
22npm run build # Production build
23npm run db:push # Push schema changes to database
24npm test # Run test suite
25```
26
27## Important Notes
28- Always use server actions for form submissions
29- Database queries go through `lib/db.ts` — never import Drizzle directly
30- Environment variables are in Replit Secrets, not .env files
COMMON MISTAKES
Replit Agent does not read other tools' configuration files. The file must be named `replit.md` (case-insensitive) and placed at the project root.
Replit has two AI features: Ghostwriter (inline completions) and Agent (autonomous coding). replit.md only affects the Agent's behavior, not autocomplete suggestions.
The `.replit` file and `replit.nix` control Replit's runtime environment (language, packages, run commands). `replit.md` is purely for instructing the AI Agent about coding conventions and project context.