Hello, I am sharing my cursor rules by way of illustrating how I work with AI as my development co-pilot. I think it encapsulates a lot of 'good' practices I have come to rely on (and stolen, borrowed, improved) to help me make the most out of my agentic development experience.
This repository contains .mdc files that guide AI coding agents (Cursor, in particular) to follow best practices for development, project management, and code quality. Feel free to mix and match as you see fit.
Fork away. Or, branch and send me a PR for changes.
- EK
If you want to contribute or customize the rules:
-
Clone the repository:
git clone https://github.com/proofgeist/ek-cursor-rules.git cd ek-cursor-rules -
Open in Cursor IDE - The rules in
/rules/are symlinked to.cursor/rules/, so when you edit the.mdcfiles, you're working with the rules actively guiding your development. -
Edit the rules - Make changes to any
.mdcfile in the/rules/directories. The AI assistant will follow these rules as you work on them (meta!). -
Test your changes - The rules apply to this project itself, so you can verify they work as expected.
-
Submit a PR - Follow the conventional commit format enforced by this project.
Note: This "dogfooding" approach means the rules are always tested against themselves, ensuring they work in practice.
For Cursor IDE:
import-cursor-rules.sh(Bash - Unix/Linux/macOS)import-cursor-rules.py(Python - Cross-platform)
For Claude Projects:
sync-to-claude.py(Generates single CLAUDE.md file)
# Cursor IDE: Copy all rules to a new project
./import-cursor-rules.sh /path/to/my-project
# Cursor IDE: Python version (cross-platform)
./import-cursor-rules.py /path/to/my-project
# Claude Projects: Generate lightweight CLAUDE.md (recommended)
./sync-to-claude.py /path/to/my-project
# Claude Projects: Generate full CLAUDE.md with all rules
./sync-to-claude.py --all /path/to/my-project# Create symlinks (changes to source rules affect all projects)
./import-cursor-rules.sh -l symlink /path/to/my-project
# Only import specific rule sets
./import-cursor-rules.sh -r general,git /path/to/my-project
# Python project with force overwrite
./import-cursor-rules.sh -r python -f /path/to/python-project
# View all options
./import-cursor-rules.sh --helpcopy(default): Independent copies, safe for modificationsymlink: Links to source rules, updates automaticallyhardlink: Shared file data, updates with source changesdirsymlink: Directory-level symlink (most efficient)
- Lightweight (default): Core rules only (~10KB, 5 files) - Recommended
- Full (
--all): All rule categories (~200KB, 26 files) - When comprehensive guidance needed
The sync-to-claude.py script consolidates cursor rules into a single CLAUDE.md file for use with Claude Projects.
Lightweight Mode (default):
./sync-to-claude.py /path/to/projectIncludes only essential rules:
- Core directives (project planning, workflow, updates)
- Basic Git practices
- Result: ~10KB file with 5 core rule files
Full Mode (comprehensive):
./sync-to-claude.py --all /path/to/projectIncludes all rule categories:
- General rules, Git, Design, Python, Versioning, Node.js, Database
- Result: ~200KB file with 26 rule files
Why Lightweight?
- Faster AI response times
- Lower token usage
- Focused on core development methodology
- Sufficient for most projects
When to Use Full Mode?
- Technology-specific guidance needed (Python, Node.js, Database)
- Complex projects requiring comprehensive standards
- Reference documentation for team onboarding
Core directives that apply to all projects:
001-core-directive.mdc- Foundation principles and methodology002-pre-work-analysis.mdc- Pre-work analysis and alignment003-during-work-tracking.mdc- Active work progress tracking004-post-work-updates.mdc- Post-work updates and plan sync005-plan-format-standards.mdc- Project plan structure standards006-conflict-resolution.mdc- Conflict detection and resolution007-integration-workflow.mdc- Development integration workflow008-documentation-standards.mdc- Comprehensive documentation standards (consolidated)011-security-standards.mdc- Security best practices and standards
Version control and collaboration standards:
101-git-standards.mdc- Comprehensive Git workflow, commits, branching, PRs, and code review
Design thinking and user experience standards:
201-design-thinking-personas.mdc- User persona requirements and design thinking principles
Specialized directives for Python development:
301-virtual-environment-setup.mdc- Python environment management usinguv302-python-code-standards.mdc- Python coding standards303-python-testing-standards.mdc- Python testing practices304-test-organization.mdc- Test file organization and structure305-test-utilities.mdc- Test utilities and helper functions
Automated versioning and release management:
401-versioning-standards.mdc- Semantic versioning with semantic-release (REQUIRED)
Specialized directives for Node.js development:
501-package-management.mdc- Package management with pnpm (default)502-nodejs-code-standards.mdc- Node.js coding standards and best practices503-nodejs-testing-standards.mdc- Node.js testing with Vitest504-express-api-standards.mdc- Express.js API development standards505-nextjs-vercel-standards.mdc- Next.js framework and Vercel deployment506-better-auth-standards.mdc- Better-Auth authentication implementation507-proofkit-standards.mdc- ProofKit boilerplate for FileMaker web applications508-typescript-standards.mdc- TypeScript coding standards and best practices
Database design and management standards:
601-database-standards.mdc- PostgreSQL as default, schema design, Prisma, migrations, optimization
- Seek first to understand - Promote thoughtful analysis before action
- Small things, loosely coupled - Be functional and modular; keep mutations isolated, avoid side effects
- As simple as possible but no simpler - Balance simplicity with functionality
- Critical thinking encouraged - Don't agree automatically; offer helpful critiques
- Start every project with a plan - Always begin with a project plan
- No changes without approval - Share specific plans and wait for explicit approval
- Surgical changes only - Keep modifications minimal and targeted
- Explain rationale - Always explain why a change is needed
- Test thoroughly - Verify changes work, don't break functionality, test edge cases
- Documentation first - Document approach before coding, explain decisions, keep README current
The system looks for project plans in this order:
docs/PROJECT_PLAN.mdPROJECT_PLAN.md(root directory)- Any file containing "project plan", "roadmap", or "milestones"
User Request → Pre-Work Analysis → Active Work → Post-Work Updates
↓ ↓ ↓ ↓
Plan Check → Conflict Resolution → Progress Track → Plan Update
- ✅ Read plan before starting any work
- ✅ Verify request aligns with current milestone
- ✅ Update plan after completing tasks
- ✅ Note any scope or priority changes
- Every project starts with a comprehensive plan
- AI assistants create plans when missing
- No work proceeds without plan consultation
- Approval-based workflow prevents reckless changes
- Surgical modifications maintain code stability
- Comprehensive testing including edge cases
- Document approach before coding
- Explain all decisions along the way
- Keep project documentation current
- All documentation in
/docsfolder with central home - Comprehensive linking and cross-referencing standards
- Commit message standards
- Branch naming conventions
- Documentation synchronization
- Structured
/docsfolder organization - Central documentation home with navigation
- Comprehensive linking and cross-referencing
- Writing standards for clarity and consistency
- Package Management:
uvas default - Virtual Environment: Automated setup and management
- Test Organization: Structured test files, scripts, and utilities
- Best Practices: Modern Python conventions
- Package Management:
pnpmas default - Testing Framework: Vitest (Jest alternative)
- API Framework: Express.js with best practices
- Web Framework: Next.js with App Router and Server Components
- Deployment: Vercel as default platform
- Authentication: Better-Auth for type-safe auth
- FileMaker Integration: ProofKit for FileMaker web apps
- Type Safety: Comprehensive TypeScript standards
- Default: PostgreSQL
- ORM: Prisma (Node.js) or SQLAlchemy (Python)
- Migrations: Automated with version control
- Security: Parameterized queries, encryption, access control
- Version Management: semantic-release (REQUIRED)
- Commit Format: Conventional Commits (enforced)
- Automation: GitHub Actions for CI/CD
- Changelog: Auto-generated from commits
- Clear development methodology
- Automatic progress documentation
- Integrated quality control
- Consistent project structure
- Always current project status
- Documented decisions and changes
- Clear milestone tracking
- Proactive conflict resolution
- Clear, actionable instructions
- Structured workflow to follow
- Consistent quality standards
- Technology-specific guidance
For comprehensive guides and detailed information:
📖 Full Documentation - Central documentation hub
- Getting Started - Installation, quick start, configuration
- User Guide - Rule categories, best practices (coming soon)
- Developer Guide - Contributing, creating rules (coming soon)
- API Reference - Script documentation (coming soon)
Use the import scripts to set up rules in your projects. The AI assistant will automatically follow the imported rules.
These .mdc files work automatically with AI assistants that support Cursor rules. The assistant will:
- Plan - Start with or create a project plan
- Analyze - Check requests for conflicts or alignment issues
- Approve - Get explicit approval before making changes
- Execute - Make surgical, well-tested modifications
- Document - Update plans and maintain current documentation
The result is a disciplined, quality-focused development process that maintains project direction while ensuring code quality and documentation.