Coding & Developmentโจ๏ธcursor๐universal
๐ฏ Cursor Rules & Prompts
A comprehensive, open-source collection of rules and prompts designed to guide Cursor AI in generating better, more consistent code. Enhance code quality, enforce coding standards, and streamline development workflows automatically.
Quick Start
Install this Skill
npx skills add thehimel/cursor-rules-and-prompts# ๐ฏ Cursor Rules & Prompts
> ๐ก **Stop repeating yourself.** Make Cursor AI follow your coding standards automatically.
[](LICENSE)
[](https://github.com)
A comprehensive collection of rules and prompts that transform Cursor from a helpful assistant into a team member who knows your codebase conventions. These rules enforce best practices, maintain code quality, and ensure consistencyโwithout you having to explain the same things over and over.
<div align="left">
<a href=".cursor/rules" style="text-decoration: none; display: inline-block; margin: 10px;">
<img src="https://img.shields.io/badge/๐_RULES-4A90E2?style=for-the-badge&logo=book&logoColor=white" alt="Rules" style="height: 70px;"/>
</a>
<a href=".cursor/prompts" style="text-decoration: none; display: inline-block; margin: 10px;">
<img src="https://img.shields.io/badge/๐ฌ_PROMPTS-50C878?style=for-the-badge&logo=lightbulb&logoColor=white" alt="Prompts" style="height: 70px;"/>
</a>
</div>
## ๐ What This Is
Ever find yourself constantly reminding Cursor to "use `@/` instead of relative paths" or "don't add inline styles"? This repository solves that. ๐คฏ
Instead of manually correcting the AI every time, these rules ensure it follows your standards automatically. Think of it as a coding style guide that the AI actually reads, understands, and applies consistently across your entire project.
> ๐ผ **It's like having a senior developer review every AI-generated change before it hits your codebase.**
## Key Features
โจ **Automatic Enforcement** - Rules apply automatically, no manual intervention needed
๐ฏ **Project-Agnostic** - Works with any tech stack, easily customizable
๐ **Comprehensive** - Covers code style, organization, documentation, and more
๐ **Maintainable** - Well-organized, easy to understand and modify
๐ **Time-Saving** - Stop repeating the same instructions to AI
## ๐ Why Use This
- โ
**Consistency**: Your codebase stays consistent even when multiple people (or AI) work on it
- โก **Less Review Time**: Fewer style issues means faster code reviews
- ๐ **Better Onboarding**: New team members (and AI) understand your patterns immediately
- ๐ก๏ธ **Quality by Default**: Best practices are enforced automatically, not by memory
- โฑ๏ธ **Time Savings**: Stop explaining the same conventions repeatedly
## ๐ก Real-World Example
**โ Before**: You ask Cursor to create a component, and it generates:
```typescript
import { Button } from '../../../components/ui/button';
import { MyType } from '../types';
```
**โ
After**: With these rules, Cursor automatically generates:
```typescript
import { Button } from '@/components/ui/button';
import { MyType } from '@/components/quiz/types';
```
๐ The AI knows your conventions and follows them without being told!
## ๐ Quick Start
### Option 1: Manual Setup
1. ๐ฅ **Clone or copy this repository** into your project
2. ๐ **Place the `.cursor` folder** in your project root
3. โจ **That's it** - Cursor will automatically use these rules
### Option 2: Automatic Sync (Recommended)
Use the sync script to automatically keep your `.cursor` directory updated across all your projects:
```bash
# Add alias to ~/.zshrc (or ~/.bashrc)
alias sync-cursor="~/PycharmProjects/cursor-rules-and-prompts/sync-cursor.sh"
# Reload shell configuration
source ~/.zshrc
# Run sync from any directory
sync-cursor
```
> ๐ **Sync Script:** `sync-cursor.sh`
>
> โ ๏ธ **Important:** The script requires a `.include` file in each destination's `.cursor/` directory to specify what to sync. See [sync-cursor.md](docs/sync-cursor.md) for detailed documentation.
The script will:
- ๐ Sync files from source to all destinations in `~/PycharmProjects/`
- ๐ Use ID-based matching to handle file renames and updates
- ๐ Support path-based syncing via `.include` file
- ๐๏ธ Automatically clean up orphaned files
- ๐ Show progress for each destination
> ๐ก **Note:** The old `fetch-cursor-rules.sh` script is deprecated. Use `sync-cursor.sh` instead. See [sync-cursor.md](docs/sync-cursor.md) for full documentation.
> ๐ฌ The rules are organized by category and apply automatically when you're working in Cursor. No configuration needed.
## ๐ฆ What's Included
This repository contains a growing collection of rules and prompts organized by category. The rules cover areas like:
- ๐จ **Code Style**: Import patterns, component structure, styling conventions
- ๐ **Organization**: File structure, feature organization, code migration
- ๐ **Documentation**: Writing standards, comment style, documentation patterns
- ๐๏ธ **Infrastructure**: Route management, configuration patterns
- ๐ซ **Constraints**: What to avoid, best practices
- ๐ **Dependencies**: Library selection, component usage
> ๐ Rules are stored in `.cursor/rules/` organized by category, and reusable prompts are in `.cursor/prompts/`. The
... (truncated)Repository
115stars
29forks
Details
Related Skills
More coding & development skills you might like
Reticle
Coding & DevelopmentAI agents can generate code, but still struggle to understand what they build. Reticle brings Jev-style machine-native runtime perception to web & desktop applications.
๐คclaude๐universal
1.2k
190
View
agentscope-java
Coding & DevelopmentExpert Java developer skill for AgentScope Java framework - a reactive, message-driven multi-agent system built on Project Reactor. Use when working with reactive programming, LLM integration, agent orchestration, multi-agent systems, or when the user mentions AgentScope, ReActAgent, Mono/Flux, Project Reactor, or Java agent development. Specializes in non-blocking code, tool integration, hooks, pipelines, and production-ready agent applications.
๐universal
6.0k
1.5k
View
ospec
Coding & DevelopmentDocument-driven OSpec workflow for initialization, change/goal routing, validation, archiving, and durable project knowledge.
โจgemini๐คclaude๐ฌgpt๐universal
524
34
View
misakanet-failure-memory
Coding & Development๐ A zero-dependency, git-backed micro-lesson library for AI Agents to asynchronously share and search verified debugging experience. Python stdlib only. | https://misakanet.org
๐คclaudeโจ๏ธcursor๐universal
424
158
View