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://img.shields.io/badge/License-Proprietary-red.svg)](LICENSE)
[![Maintained](https://img.shields.io/badge/Maintained-Yes-success.svg)](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)