cursor-handbook
girijashankarj · girijashankarj/cursor-handbook
Công cụ quy tắc mã nguồn mở này cung cấp cho Cursor IDE bộ nhớ vĩnh viễn về các tiêu chuẩn của bạn, đảm bảo chất lượng mã nhất quán trên các dự án và nhóm.
Open-source rules engine for Cursor IDE — 110 rules, agents, skills, commands that give AI permanent memory of your standards. Demo: 30%+ token savings, blocks hardcoded secrets, type-check instead of 100K-token test runs, consistent code across team.
Xem trước
Bạn có thể làm gì với nó
- Đảm bảo tất cả mã được tạo tuân thủ hướng dẫn về phong cách và các thực tiễn tốt nhất của công ty.
- Tự động chặn AI đưa các khóa bí mật cứng vào codebase.
- Thực thi các mẫu kiến trúc hoặc việc sử dụng thư viện cụ thể trên tất cả mã do AI tạo ra.
Kiểm tra an toàn
Dùng được, nhưng nên đọc ghi chú trước.
- ●Trình cài đặt tải script từ xa và chạy thẳng bằng shell.
README.md
Quét tự động các file trong repo. Luôn xem lại code trước khi chạy.
Trích từ README
cursor-handbook
The open-source rules engine for Cursor IDE — 110 rules, agents, and skills that turn your AI into a senior engineer who follows your standards, knows your codebase, and never wastes a token.
Stop teaching your AI the same things every session. cursor-handbook gives Cursor permanent memory of your standards, security policies, and workflows — across every project, every team member, every prompt.
If cursor-handbook helps you, consider giving it a ⭐ — it helps others discover it.
Table of Contents
Ways to use cursor-handbook
Pick the option that fits your workflow:
| Option | Best for |
|---|---|
| 1. Clone & copy | Use the full rules engine in your repo. Clone this repo, copy the .cursor folder into your project, then edit project.json and tailor rules/agents/skills to your stack. |
| 2. Add from GitHub (Cursor UI) | Use rules, skills, or agents without cloning. In Cursor IDE go to Settings → Rules / Skills / Agents, click Add new → Add from GitHub, and paste this repo’s clone URL. Add only what you need. |
| 3. Fork & customize | Maintain your own version. Fork this repo, adapt the .cursor files for your team or product, then use that fork across your projects or share it internally. |
| 4. Pick and choose | Use individual components. Download only the production-ready, generic rules, skills, agents, commands, or hooks you need from this repo and drop them into your existing .cursor setup. |
Improvements welcome. If you want to add or improve rules, skills, hooks, agents, or commands, see CONTRIBUTING.md and open an issue or PR.
Forking? Replace
girijashankarjwith your GitHub org/username in badges, clone URLs,scripts/setup-cursor.sh,.github/CODEOWNERS, and docs before pushing.
The Problem
Every time you open Cursor IDE, your AI assistant starts from zero. It doesn't know your:
- Code conventions and architecture patterns
- Security policies (and happily hardcodes your API keys)
- Testing thresholds (and runs the full 100K-token test suite when you just wanted a type check)
- Handler patterns, naming conventions, or folder structure
You end up repeating yourself, burning tokens, and fixing the same mistakes. cursor-handbook fixes this permanently.
Before vs After
| Before cursor-handbook | After cursor-handbook |
|---|---|
| AI hardcodes API keys | Security rules block it |
| AI runs full test suite (~100K tokens) | Uses type-check (~10K) or single-file tests |
| You repeat conventions every session | Rules remember them — always on |
| Inconsistent code across team | One rules engine, one standard |
| No guardrails on expensive ops | Hooks warn or block dangerous commands |
Who is this for?
| Audience | Benefit |
|---|---|
| Solo developers | Consistent AI behavior without repeating yourself every session |
| Teams | Shared standards; everyone gets the same guardrails and conventions |
| Enterprises | Security, compliance, and token efficiency built in from day one |
How It Works
graph TB
subgraph INPUT ["Your Prompt"]
A[Developer types a prompt in Cursor]
end
subgraph HOOKS_PRE ["Pre-Processing Hooks"]
B[context-enrichment.shInjects project context]
C[shell-guard.shBlocks dangerous commands]
end
subgraph ENGINE ["cursor-handbook Engine"]
D[29 RulesAlways-applied standards]
E[34 AgentsSpecialized AI assistants]
F[21 SkillsStep-by-step workflows]
G[14 CommandsQuick actions]
end
subgraph CONFIG ["Project Settings"]
H[project.jsonYour project settings]
end
subgraph HOOKS_POST ["Post-Processing Hooks"]
I[post-edit-check.shValidates changes]
J[auto-format.shFormats code]
K[coverage-check.shVerifies thresholds]
end
subgraph OUTPUT ["AI Response"]
L[Code that follows YOUR standardswith 30%+ fewer tokens]
end
A --> B --> C --> D
D --> E & F & G
H -.->|configures| D & E & F & G
E & F & G --> I --> J --> K --> L
style INPUT fill:#1a1a2e,stroke:#e94560,color:#fff
style HOOKS_PRE fill:#16213e,stroke:#0f3460,color:#fff
style ENGINE fill:#0f3460,stroke:#533483,color:#fff
style CONFIG fill:#533483,stroke:#e94560,color:#fff
style HOOKS_POST fill:#16213e,stroke:#0f3460,color:#fff
style OUTPUT fill:#1a1a2e,stroke:#00d2ff,color:#fff
What's Inside
%%{init: {'theme': 'neutral'}}%%
mindmap
root((cursor-handbook110 Components))
Rules — 29
Architecture — 3
Backend — 6
Frontend — 4
Security — 3
Database — 3
Cloud — 3
Testing — 3
DevOps — 3
Core — 1
Agents — 34
Architecture — 3
Backend — 7
Frontend — 4
Testing — 4
Database — 2
Security — 3
Cloud — 3
DevOps — 3
Business — 2
AI/ML — 1
Docs — 1
Platform — 1
Skills — 21
Backend — 4
Frontend — 2
Testing — 2
Database — 3
Cloud — 3
DevOps — 4
Docs — 3
Commands — 14
Hooks — 12
Templates — 9
| Layer | Count | What It Does | How It's Triggered |
|---|---|---|---|
| Rules | 29 | Enforces coding standards on every AI interaction | Automatically — always on |
| Agents | 34 | Specialized assistants for complex tasks | On demand — `/age |