Ready-to-use
CLAUDE.mdand.cursorrulesfiles for popular tech stacks — with explanations for every rule.
Most AI rule collections are just links to other repos. stack-rules gives you the actual file content, tuned per stack, with comments explaining why each rule exists so you can adapt it to your project.
Works with Claude Code, Cursor, Windsurf, GitHub Copilot, and any tool that reads project-level AI instructions.
AI coding assistants are only as good as the context you give them. A generic prompt produces generic code. A well-crafted CLAUDE.md tells your assistant:
- Which version of the framework you're using (Next.js 13 vs 15 is a completely different mental model)
- Your project's conventions (file structure, naming, state management)
- What to avoid (legacy patterns, deprecated APIs)
- Which libraries you use for common tasks
This repo collects that institutional knowledge per stack so you don't have to write it from scratch.
| Stack | CLAUDE.md | .cursorrules |
|---|---|---|
| Next.js 15 App Router | ✅ | ✅ |
| Nuxt 3 | ✅ | ✅ |
| SvelteKit | ✅ | ✅ |
| Hono (Cloudflare Workers) | ✅ | ✅ |
| FastAPI | ✅ | ✅ |
| Drizzle ORM | ✅ | ✅ |
| Prisma | ✅ | ✅ |
| React Native (Expo) | ✅ | ✅ |
More coming: Laravel, Django, Rails, tRPC, Turso, Astro.
Option 1 — Copy directly
Browse to your stack folder and copy CLAUDE.md into your project root.
Option 2 — CLI (npx)
npx stack-rules add nextjs-app-routerCopies the right files into your current directory. Existing files are not overwritten — it asks first.
Option 3 — Combine stacks
Each file is modular. If you use Next.js + Drizzle + Tailwind, copy the relevant sections from each:
npx stack-rules add nextjs-app-router drizzle-orm
# merges both CLAUDE.md files into oneRead by Claude Code automatically when present in the project root. Also works as a project instructions file for any assistant that supports markdown context.
Read by Cursor and Windsurf. Same content as CLAUDE.md but in the format those tools expect.
Each stack folder has a README.md explaining the rationale. If you have a correction, addition, or a new stack:
- Fork the repo
- Add or edit files in
stacks/<stack-name>/ - Include comments in the rule files explaining why each rule exists
- Open a PR
Rules without explanations will not be merged — the why is the point.
MIT