On this page

What Are AI Conventions

Every ShipUI theme ships with a set of battle-tested rules files and an architecture guide for AI coding tools. These give Cursor and Claude Code specific, opinionated instructions about how to structure your code, which patterns to use, and what to never do.

Free cursor rules are generic. They tell AI to "use TypeScript" or "follow best practices." The conventions included with ShipUI themes tell AI exactly how to organize files, exactly how to handle errors, and exactly what architectural boundaries must never be crossed. Every rule explains why it exists and what breaks without it.

The result: AI that makes implementation decisions but stays within the architectural constraints you define.

Getting Started

Setup takes about two minutes. The conventions work with any existing project or a new one.

File placement

# Your project root after setup: your-project/ ├── .cursorrules # Cursor reads this automatically ├── CLAUDE.md # Claude Code reads this automatically ├── src/ └── ...

Using the Universal config

If your stack is not one of the three named stacks, or if you want a language-agnostic baseline, start with the universal folder. It contains the architecture principles and the "Don't" rules that apply to any project. You can layer stack-specific rules on top.

A Note on Rule Compliance

These conventions reduce the frequency and severity of rule violations, but they cannot eliminate them entirely. AI models can drift during long conversations, complex tasks, or ambiguous prompts.

Treat the rules as strong architectural guidance rather than guarantees.

Recommended complementary tools

For the best results, pair these conventions with at least one automated code review layer that catches what the AI misses:

Claude Code
Use a separate Claude Code session to review code after generation. With your CLAUDE.md in place, it applies the same rules as a reviewer rather than a generator.
CodeRabbit
AI-powered pull request reviewer that catches architectural issues, security problems, and style violations before code merges. Integrates directly with GitHub.
Greptile
Codebase-aware AI that understands your entire repository. Useful for catching violations that require knowledge of how multiple files relate to each other.
Manual review
No tool replaces reading the code. Use the pre-shipment checklist below as a structured walkthrough before any significant feature ships.

Included Stacks

Each stack includes a .cursorrules file for Cursor, a CLAUDE.md file for Claude Code, and all rules tailored to that framework's conventions.

Next.js + TypeScript
.cursorrules + CLAUDE.md
App Router architecture, Server Components, Zod validation, Prisma or Drizzle repository patterns, and Next.js-specific do-not rules.
Python + FastAPI
.cursorrules + CLAUDE.md
FastAPI route organization, PostgreSQL access patterns, Pydantic schemas, async handling, and Python-specific conventions.
React + Node + Express
.cursorrules + CLAUDE.md
Full-stack JavaScript structure, Express middleware patterns, React component boundaries, and separation of client and server concerns.
Universal
.cursorrules + CLAUDE.md
Language-agnostic architecture rules that apply to any project. A good starting point before adding stack-specific rules on top.

Rule Categories

The rules are organized into four categories. Each stack covers all four.

🏗
Architecture Guardrails
Rules that prevent AI from making structural decisions that become expensive to change later.
File organization and separation of concerns Database access layer boundaries API design consistency State management conventions
🔒
Security Rules
Rules that prevent AI from writing vulnerable code that passes code review but fails in production.
No hardcoded secrets or API keys Input validation enforcement Auth pattern requirements CORS and headers configuration
Scalability Patterns
Rules that prevent code that works with 10 users but fails with 10,000.
N+1 query prevention Pagination enforcement on list endpoints Caching strategy requirements Connection pooling rules
🧪
Quality Standards
Rules that keep the codebase maintainable when you return to it six months later.
Error handling requirements Type safety enforcement Logging conventions Testing expectations

How Rules Are Written

Every rule follows the same four-part format. This is what makes it more effective than a list of bullet points: AI tools understand context and examples, not just directives.

The Rule
What to enforce. A specific, unambiguous instruction.
Why It Matters
What breaks without this rule. Concrete consequences, not abstract principles.
Anti-Pattern
What AI typically generates without guidance. A code example showing the wrong approach.
The Fix
The correct approach with a working example. AI follows this pattern going forward.

When an AI tool sees a rule written this way, it understands not just what to do but what to avoid and why. This reduces the back-and-forth where AI produces code that technically works but violates the conventions your project requires.

Architecture Guide

Every ShipUI theme includes a plain-English architecture guide covering the five structural mistakes that AI makes most often. It is designed for developers who learned to code with AI assistance and want to understand the reasoning behind the rules.

What the guide covers

Pre-Shipment Checklist

Each theme includes a checklist that maps directly to the rules. Before marking any task complete, verify each item. The checklist is embedded in the CLAUDE.md and .cursorrules files so AI tools can reference it during code review.

Security

Structure

Data

Error Handling

Included with every ShipUI theme

AI conventions come standard. No add-on, no extra cost. Pick a theme and start building.