|
2 | 2 |
|
3 | 3 | # Awesome AI Rules |
4 | 4 |
|
5 | | -### The definitive collection of AI coding rules for every tool and tech stack |
| 5 | +### The definitive collection of AI coding rules for every tool and stack |
6 | 6 |
|
7 | | -[](#) |
| 7 | +[](#awesome-ai-rules) |
8 | 8 | [](https://github.com/Lay4U/awesome-ai-rules/stargazers) |
9 | 9 | [](https://github.com/Lay4U/awesome-ai-rules/graphs/contributors) |
10 | 10 | [](https://github.com/Lay4U/awesome-ai-rules/commits/main) |
11 | | -[](https://github.com/Lay4U/awesome-ai-rules/pulls) |
| 11 | +[](./CONTRIBUTING.md) |
12 | 12 | [](./LICENSE) |
13 | | -[](#-quick-navigation) |
| 13 | +[](#full-navigation-matrix) |
| 14 | +[](#full-navigation-matrix) |
14 | 15 |
|
15 | | -Stop configuring your AI coding assistant from scratch. Copy proven rules, pick your stack, and ship. |
| 16 | +Production-ready AI coding rules for 8 tools across 9 stacks, ready to copy into your project in seconds. |
16 | 17 |
|
17 | | -English | [한국어](./README.ko.md) |
| 18 | +English | [한국어](./README.ko.md) | [中文](./README.zh.md) | [日本語](./README.ja.md) |
18 | 19 |
|
19 | 20 | </div> |
20 | 21 |
|
21 | | -## 🚀 Why This Exists |
| 22 | +## Why This Exists |
22 | 23 |
|
23 | | -By 2026, context engineering has become one of the highest-leverage parts of software development. The difference between an average AI coding workflow and an exceptional one is rarely the model itself; it is how clearly you define behavior, constraints, coding standards, and project-specific expectations. |
| 24 | +AI coding output quality depends heavily on instruction quality. |
| 25 | +Most teams still rewrite the same rules for every new project and tool. |
| 26 | +This repository standardizes that process with stack-specific rule sets. |
| 27 | +Each file is practical, opinionated, and designed for real production workflows. |
| 28 | +Use it to reduce prompt drift, improve consistency, and onboard faster. |
| 29 | +Copy what fits, customize what matters, and ship with higher confidence. |
24 | 30 |
|
25 | | -`awesome-ai-rules` exists to make that leverage reusable. Instead of writing new instructions for every project and every tool, you can start from curated, stack-specific rule sets that encode practical conventions and reduce drift across teams. |
| 31 | +## Quick Start |
26 | 32 |
|
27 | | -## 📑 Table of Contents |
| 33 | +```bash |
| 34 | +# Cursor (TypeScript) |
| 35 | +cp rules/cursor/typescript/.cursorrules ./.cursorrules |
28 | 36 |
|
29 | | -- [📚 Quick Navigation](#-quick-navigation) |
30 | | -- [🧰 Tool Rules](#-tool-rules) |
31 | | -- [🧠 Context Engineering Patterns](#-context-engineering-patterns) |
32 | | -- [📊 Cross-Tool Comparison](#-cross-tool-comparison) |
33 | | -- [🤝 Contributing](#-contributing) |
34 | | -- [📄 License](#-license) |
35 | | -- [⭐ Star This Repo](#-star-this-repo) |
| 37 | +# Claude Code (React) |
| 38 | +cp rules/claude-code/react/CLAUDE.md ./CLAUDE.md |
36 | 39 |
|
37 | | -## 📚 Quick Navigation |
| 40 | +# Copilot (Next.js) |
| 41 | +mkdir -p ./.github && cp rules/copilot/nextjs/.github/copilot-instructions.md ./.github/copilot-instructions.md |
38 | 42 |
|
39 | | -| Tool | Config File | Stacks | |
40 | | -| --- | --- | --- | |
41 | | -| Cursor | `.cursorrules` | React, Next.js, TypeScript, Python | |
42 | | -| Claude Code | `CLAUDE.md` | React, Next.js, TypeScript, Python | |
43 | | -| GitHub Copilot | `copilot-instructions.md` | TypeScript, React, Python | |
44 | | -| Windsurf | `.windsurfrules` | TypeScript, React, Python | |
45 | | -| Codex | `AGENTS.md` | TypeScript, Python | |
46 | | -| Gemini CLI | `GEMINI.md` | TypeScript, Python | |
| 43 | +# Windsurf (Python) |
| 44 | +cp rules/windsurf/python/.windsurfrules ./.windsurfrules |
47 | 45 |
|
48 | | -## 🧰 Tool Rules |
| 46 | +# Codex (Go) |
| 47 | +cp rules/codex/go/AGENTS.md ./AGENTS.md |
49 | 48 |
|
50 | | -### Cursor (`.cursorrules`) |
| 49 | +# Gemini CLI (Rust) |
| 50 | +cp rules/gemini-cli/rust/GEMINI.md ./GEMINI.md |
| 51 | + |
| 52 | +# Aider (Vue) |
| 53 | +cp rules/aider/vue/.aider.conf.yml ./.aider.conf.yml |
| 54 | + |
| 55 | +# Cline (Java) |
| 56 | +cp rules/cline/java/.clinerules ./.clinerules |
| 57 | +``` |
51 | 58 |
|
52 | | -Available rules: |
53 | | -- [React](rules/cursor/react/.cursorrules) |
54 | | -- [Next.js](rules/cursor/nextjs/.cursorrules) |
55 | | -- [TypeScript](rules/cursor/typescript/.cursorrules) |
56 | | -- [Python](rules/cursor/python/.cursorrules) |
| 59 | +## Full Navigation Matrix |
57 | 60 |
|
58 | | -Copy into your project root: |
| 61 | +| Tool | Config File | TypeScript | React | Next.js | Python | Go | Rust | Vue | Svelte | Java | |
| 62 | +| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | |
| 63 | +| Cursor | `.cursorrules` | [✅](./rules/cursor/typescript/.cursorrules) | [✅](./rules/cursor/react/.cursorrules) | [✅](./rules/cursor/nextjs/.cursorrules) | [✅](./rules/cursor/python/.cursorrules) | [✅](./rules/cursor/go/.cursorrules) | [✅](./rules/cursor/rust/.cursorrules) | [✅](./rules/cursor/vue/.cursorrules) | [✅](./rules/cursor/svelte/.cursorrules) | [✅](./rules/cursor/java/.cursorrules) | |
| 64 | +| Claude Code | `CLAUDE.md` | [✅](./rules/claude-code/typescript/CLAUDE.md) | [✅](./rules/claude-code/react/CLAUDE.md) | [✅](./rules/claude-code/nextjs/CLAUDE.md) | [✅](./rules/claude-code/python/CLAUDE.md) | [✅](./rules/claude-code/go/CLAUDE.md) | [✅](./rules/claude-code/rust/CLAUDE.md) | [✅](./rules/claude-code/vue/CLAUDE.md) | [✅](./rules/claude-code/svelte/CLAUDE.md) | [✅](./rules/claude-code/java/CLAUDE.md) | |
| 65 | +| Copilot | `copilot-instructions.md` | [✅](./rules/copilot/typescript/.github/copilot-instructions.md) | [✅](./rules/copilot/react/.github/copilot-instructions.md) | [✅](./rules/copilot/nextjs/.github/copilot-instructions.md) | [✅](./rules/copilot/python/.github/copilot-instructions.md) | [✅](./rules/copilot/go/.github/copilot-instructions.md) | [✅](./rules/copilot/rust/.github/copilot-instructions.md) | [✅](./rules/copilot/vue/.github/copilot-instructions.md) | [✅](./rules/copilot/svelte/.github/copilot-instructions.md) | [✅](./rules/copilot/java/.github/copilot-instructions.md) | |
| 66 | +| Windsurf | `.windsurfrules` | [✅](./rules/windsurf/typescript/.windsurfrules) | [✅](./rules/windsurf/react/.windsurfrules) | [✅](./rules/windsurf/nextjs/.windsurfrules) | [✅](./rules/windsurf/python/.windsurfrules) | [✅](./rules/windsurf/go/.windsurfrules) | [✅](./rules/windsurf/rust/.windsurfrules) | [✅](./rules/windsurf/vue/.windsurfrules) | [✅](./rules/windsurf/svelte/.windsurfrules) | [✅](./rules/windsurf/java/.windsurfrules) | |
| 67 | +| Codex | `AGENTS.md` | [✅](./rules/codex/typescript/AGENTS.md) | [✅](./rules/codex/react/AGENTS.md) | [✅](./rules/codex/nextjs/AGENTS.md) | [✅](./rules/codex/python/AGENTS.md) | [✅](./rules/codex/go/AGENTS.md) | [✅](./rules/codex/rust/AGENTS.md) | [✅](./rules/codex/vue/AGENTS.md) | [✅](./rules/codex/svelte/AGENTS.md) | [✅](./rules/codex/java/AGENTS.md) | |
| 68 | +| Gemini CLI | `GEMINI.md` | [✅](./rules/gemini-cli/typescript/GEMINI.md) | [✅](./rules/gemini-cli/react/GEMINI.md) | [✅](./rules/gemini-cli/nextjs/GEMINI.md) | [✅](./rules/gemini-cli/python/GEMINI.md) | [✅](./rules/gemini-cli/go/GEMINI.md) | [✅](./rules/gemini-cli/rust/GEMINI.md) | [✅](./rules/gemini-cli/vue/GEMINI.md) | [✅](./rules/gemini-cli/svelte/GEMINI.md) | [✅](./rules/gemini-cli/java/GEMINI.md) | |
| 69 | +| Aider | `.aider.conf.yml` | [✅](./rules/aider/typescript/.aider.conf.yml) | [✅](./rules/aider/react/.aider.conf.yml) | [✅](./rules/aider/nextjs/.aider.conf.yml) | [✅](./rules/aider/python/.aider.conf.yml) | [✅](./rules/aider/go/.aider.conf.yml) | [✅](./rules/aider/rust/.aider.conf.yml) | [✅](./rules/aider/vue/.aider.conf.yml) | [✅](./rules/aider/svelte/.aider.conf.yml) | [✅](./rules/aider/java/.aider.conf.yml) | |
| 70 | +| Cline | `.clinerules` | [✅](./rules/cline/typescript/.clinerules) | [✅](./rules/cline/react/.clinerules) | [✅](./rules/cline/nextjs/.clinerules) | [✅](./rules/cline/python/.clinerules) | [✅](./rules/cline/go/.clinerules) | [✅](./rules/cline/rust/.clinerules) | [✅](./rules/cline/vue/.clinerules) | [✅](./rules/cline/svelte/.clinerules) | [✅](./rules/cline/java/.clinerules) | |
| 71 | + |
| 72 | +## Tool Rules |
| 73 | + |
| 74 | +### Cursor (`.cursorrules`) |
| 75 | + |
| 76 | +Available stacks: [TypeScript](./rules/cursor/typescript/.cursorrules), [React](./rules/cursor/react/.cursorrules), [Next.js](./rules/cursor/nextjs/.cursorrules), [Python](./rules/cursor/python/.cursorrules), [Go](./rules/cursor/go/.cursorrules), [Rust](./rules/cursor/rust/.cursorrules), [Vue](./rules/cursor/vue/.cursorrules), [Svelte](./rules/cursor/svelte/.cursorrules), [Java](./rules/cursor/java/.cursorrules) |
59 | 77 |
|
60 | 78 | ```bash |
61 | | -cp rules/cursor/<stack>/.cursorrules /path/to/your-project/.cursorrules |
| 79 | +cp rules/cursor/<stack>/.cursorrules /path/to/project/.cursorrules |
62 | 80 | ``` |
63 | 81 |
|
64 | 82 | ### Claude Code (`CLAUDE.md`) |
65 | 83 |
|
66 | | -Available rules: |
67 | | -- [React](rules/claude-code/react/CLAUDE.md) |
68 | | -- [Next.js](rules/claude-code/nextjs/CLAUDE.md) |
69 | | -- [TypeScript](rules/claude-code/typescript/CLAUDE.md) |
70 | | -- [Python](rules/claude-code/python/CLAUDE.md) |
71 | | - |
72 | | -Copy into your project root: |
| 84 | +Available stacks: [TypeScript](./rules/claude-code/typescript/CLAUDE.md), [React](./rules/claude-code/react/CLAUDE.md), [Next.js](./rules/claude-code/nextjs/CLAUDE.md), [Python](./rules/claude-code/python/CLAUDE.md), [Go](./rules/claude-code/go/CLAUDE.md), [Rust](./rules/claude-code/rust/CLAUDE.md), [Vue](./rules/claude-code/vue/CLAUDE.md), [Svelte](./rules/claude-code/svelte/CLAUDE.md), [Java](./rules/claude-code/java/CLAUDE.md) |
73 | 85 |
|
74 | 86 | ```bash |
75 | | -cp rules/claude-code/<stack>/CLAUDE.md /path/to/your-project/CLAUDE.md |
| 87 | +cp rules/claude-code/<stack>/CLAUDE.md /path/to/project/CLAUDE.md |
76 | 88 | ``` |
77 | 89 |
|
78 | | -### GitHub Copilot (`copilot-instructions.md`) |
| 90 | +### Copilot (`copilot-instructions.md`) |
79 | 91 |
|
80 | | -Available rules: |
81 | | -- [TypeScript](rules/copilot/typescript/.github/copilot-instructions.md) |
82 | | -- [React](rules/copilot/react/.github/copilot-instructions.md) |
83 | | -- [Python](rules/copilot/python/.github/copilot-instructions.md) |
84 | | - |
85 | | -Copy into your project root: |
| 92 | +Available stacks: [TypeScript](./rules/copilot/typescript/.github/copilot-instructions.md), [React](./rules/copilot/react/.github/copilot-instructions.md), [Next.js](./rules/copilot/nextjs/.github/copilot-instructions.md), [Python](./rules/copilot/python/.github/copilot-instructions.md), [Go](./rules/copilot/go/.github/copilot-instructions.md), [Rust](./rules/copilot/rust/.github/copilot-instructions.md), [Vue](./rules/copilot/vue/.github/copilot-instructions.md), [Svelte](./rules/copilot/svelte/.github/copilot-instructions.md), [Java](./rules/copilot/java/.github/copilot-instructions.md) |
86 | 93 |
|
87 | 94 | ```bash |
88 | | -cp rules/copilot/<stack>/.github/copilot-instructions.md /path/to/your-project/.github/copilot-instructions.md |
| 95 | +mkdir -p /path/to/project/.github && cp rules/copilot/<stack>/.github/copilot-instructions.md /path/to/project/.github/copilot-instructions.md |
89 | 96 | ``` |
90 | 97 |
|
91 | 98 | ### Windsurf (`.windsurfrules`) |
92 | 99 |
|
93 | | -Available rules: |
94 | | -- [TypeScript](rules/windsurf/typescript/.windsurfrules) |
95 | | -- [React](rules/windsurf/react/.windsurfrules) |
96 | | -- [Python](rules/windsurf/python/.windsurfrules) |
97 | | - |
98 | | -Copy into your project root: |
| 100 | +Available stacks: [TypeScript](./rules/windsurf/typescript/.windsurfrules), [React](./rules/windsurf/react/.windsurfrules), [Next.js](./rules/windsurf/nextjs/.windsurfrules), [Python](./rules/windsurf/python/.windsurfrules), [Go](./rules/windsurf/go/.windsurfrules), [Rust](./rules/windsurf/rust/.windsurfrules), [Vue](./rules/windsurf/vue/.windsurfrules), [Svelte](./rules/windsurf/svelte/.windsurfrules), [Java](./rules/windsurf/java/.windsurfrules) |
99 | 101 |
|
100 | 102 | ```bash |
101 | | -cp rules/windsurf/<stack>/.windsurfrules /path/to/your-project/.windsurfrules |
| 103 | +cp rules/windsurf/<stack>/.windsurfrules /path/to/project/.windsurfrules |
102 | 104 | ``` |
103 | 105 |
|
104 | 106 | ### Codex (`AGENTS.md`) |
105 | 107 |
|
106 | | -Available rules: |
107 | | -- [TypeScript](rules/codex/typescript/AGENTS.md) |
108 | | -- [Python](rules/codex/python/AGENTS.md) |
109 | | - |
110 | | -Copy into your project root: |
| 108 | +Available stacks: [TypeScript](./rules/codex/typescript/AGENTS.md), [React](./rules/codex/react/AGENTS.md), [Next.js](./rules/codex/nextjs/AGENTS.md), [Python](./rules/codex/python/AGENTS.md), [Go](./rules/codex/go/AGENTS.md), [Rust](./rules/codex/rust/AGENTS.md), [Vue](./rules/codex/vue/AGENTS.md), [Svelte](./rules/codex/svelte/AGENTS.md), [Java](./rules/codex/java/AGENTS.md) |
111 | 109 |
|
112 | 110 | ```bash |
113 | | -cp rules/codex/<stack>/AGENTS.md /path/to/your-project/AGENTS.md |
| 111 | +cp rules/codex/<stack>/AGENTS.md /path/to/project/AGENTS.md |
114 | 112 | ``` |
115 | 113 |
|
116 | 114 | ### Gemini CLI (`GEMINI.md`) |
117 | 115 |
|
118 | | -Available rules: |
119 | | -- [TypeScript](rules/gemini-cli/typescript/GEMINI.md) |
120 | | -- [Python](rules/gemini-cli/python/GEMINI.md) |
| 116 | +Available stacks: [TypeScript](./rules/gemini-cli/typescript/GEMINI.md), [React](./rules/gemini-cli/react/GEMINI.md), [Next.js](./rules/gemini-cli/nextjs/GEMINI.md), [Python](./rules/gemini-cli/python/GEMINI.md), [Go](./rules/gemini-cli/go/GEMINI.md), [Rust](./rules/gemini-cli/rust/GEMINI.md), [Vue](./rules/gemini-cli/vue/GEMINI.md), [Svelte](./rules/gemini-cli/svelte/GEMINI.md), [Java](./rules/gemini-cli/java/GEMINI.md) |
121 | 117 |
|
122 | | -Copy into your project root: |
| 118 | +```bash |
| 119 | +cp rules/gemini-cli/<stack>/GEMINI.md /path/to/project/GEMINI.md |
| 120 | +``` |
| 121 | + |
| 122 | +### Aider (`.aider.conf.yml`) |
| 123 | + |
| 124 | +Available stacks: [TypeScript](./rules/aider/typescript/.aider.conf.yml), [React](./rules/aider/react/.aider.conf.yml), [Next.js](./rules/aider/nextjs/.aider.conf.yml), [Python](./rules/aider/python/.aider.conf.yml), [Go](./rules/aider/go/.aider.conf.yml), [Rust](./rules/aider/rust/.aider.conf.yml), [Vue](./rules/aider/vue/.aider.conf.yml), [Svelte](./rules/aider/svelte/.aider.conf.yml), [Java](./rules/aider/java/.aider.conf.yml) |
123 | 125 |
|
124 | 126 | ```bash |
125 | | -cp rules/gemini-cli/<stack>/GEMINI.md /path/to/your-project/GEMINI.md |
| 127 | +cp rules/aider/<stack>/.aider.conf.yml /path/to/project/.aider.conf.yml |
126 | 128 | ``` |
127 | 129 |
|
128 | | -## 🧠 Context Engineering Patterns |
| 130 | +### Cline (`.clinerules`) |
129 | 131 |
|
130 | | -- Role framing: define assistant identity and boundaries upfront. |
131 | | -- Output contracts: specify response format, style, and required sections. |
132 | | -- Repository awareness: include project architecture and coding conventions. |
133 | | -- Task decomposition: force stepwise planning before implementation. |
134 | | -- Safety rails: include forbidden actions and risk escalation rules. |
135 | | -- Stack-specific constraints: encode framework, testing, and linting expectations. |
136 | | -- Review loops: require self-checks and explicit verification steps. |
| 132 | +Available stacks: [TypeScript](./rules/cline/typescript/.clinerules), [React](./rules/cline/react/.clinerules), [Next.js](./rules/cline/nextjs/.clinerules), [Python](./rules/cline/python/.clinerules), [Go](./rules/cline/go/.clinerules), [Rust](./rules/cline/rust/.clinerules), [Vue](./rules/cline/vue/.clinerules), [Svelte](./rules/cline/svelte/.clinerules), [Java](./rules/cline/java/.clinerules) |
137 | 133 |
|
138 | | -## 📊 Cross-Tool Comparison |
| 134 | +```bash |
| 135 | +cp rules/cline/<stack>/.clinerules /path/to/project/.clinerules |
| 136 | +``` |
139 | 137 |
|
140 | | -| Feature | Cursor | Claude Code | Copilot | Windsurf | Codex | Gemini CLI | |
141 | | -| --- | --- | --- | --- | --- | --- | --- | |
142 | | -| Primary Config File | `.cursorrules` | `CLAUDE.md` | `copilot-instructions.md` | `.windsurfrules` | `AGENTS.md` | `GEMINI.md` | |
143 | | -| Rule Files In Repo | Yes | Yes | Yes | Yes | Yes | Yes | |
144 | | -| Stack-Specific Layout | Yes | Yes | Yes | Yes | Yes | Yes | |
145 | | -| Best For | IDE pair programming | Agentic terminal coding | Inline suggestions | IDE-native workflows | Terminal coding agents | CLI-first AI workflows | |
| 138 | +## Guides |
146 | 139 |
|
147 | | -## 🤝 Contributing |
| 140 | +- [Context Engineering](./guides/context-engineering.md) |
| 141 | +- [Cross-Tool Comparison](./guides/cross-tool-comparison.md) |
148 | 142 |
|
149 | | -Contributions are welcome. |
| 143 | +## Contributing |
150 | 144 |
|
151 | | -- Add new stack-specific rule files under `rules/<tool>/<stack>/`. |
152 | | -- Keep instructions concrete, testable, and production-oriented. |
153 | | -- Open a PR with a short rationale and example usage. |
| 145 | +Contributions are welcome. Please read [CONTRIBUTING.md](./CONTRIBUTING.md) and open a PR with clear rationale and examples. |
154 | 146 |
|
155 | | -## 📄 License |
| 147 | +## License |
156 | 148 |
|
157 | | -This project is licensed under the [MIT License](./LICENSE). |
| 149 | +Released under the [MIT License](./LICENSE). |
158 | 150 |
|
159 | | -## ⭐ Star This Repo |
| 151 | +## Star This Repo |
160 | 152 |
|
161 | | -If this helps your team ship faster, star the repository and share it with other AI-native developers. |
| 153 | +If this repository helps your team ship faster with AI coding tools, please [star the project](https://github.com/Lay4U/awesome-ai-rules). |
0 commit comments