Skip to content

My constantly changing set of cursor rules and prompts

Notifications You must be signed in to change notification settings

hmasing/cursor-rules

Repository files navigation

---
description: 
globs: 
alwaysApply: true
---
# @attach: agent
# @description: Core project documentation and general coding practices. Always loaded for context.

# Cursor User Rules

These rules, effective as of May 2, 2025, guide editing and managing code across any programming language or framework to ensure high-quality, consistent development practices.

## Quick Reference
- For frontend development: @frontend-rules.mdc
- For backend development: @backend-rules.mdc
- For development workflow: @workflow-rules.mdc
- For detailed checklists: @checklists.mdc

## Core Principles
1. **Small, Focused Changes**
   - Make targeted changes to single files/features
   - Get approval for multi-file changes
   - Document scope and rationale

2. **Clean Code**
   - Write self-documenting code
   - Create single-purpose functions
   - Follow consistent naming conventions

3. **Code Organization**
   - Follow standard class/module structure
   - Alphabetize functions and constants
   - Use clear section comments
   - See @backend/class-structure.mdc for details

4. **Error Handling**
   - Log errors with context
   - Provide user-friendly messages
   - Document recovery procedures
   - See @backend/error-handling.mdc for specifics

## Development Workflow
- Check git status before changes
- List modified files before commits
- Follow commit message format: `[Verb] [Brief description]`
- Never commit sensitive data
- Run tests before committing
- See @workflow/git-commits.mdc for details

## Quality Assurance
- Write and maintain tests
- Document public APIs
- Keep documentation current
- Follow security best practices
- See @workflow/testing.mdc and @workflow/documentation.mdc

## Security & Performance
- Use environment variables
- Validate all user input
- Optimize database queries
- Profile before optimization
- See @backend/security.mdc and @backend/performance.mdc

## Code Review
- Request reviews for significant changes
- Document complex decisions
- Address review comments promptly
- Keep PRs focused
- See @workflow/code-review.mdc for guidelines

## System Commands
- Always get approval before execution
- Document command purpose
- Never auto-execute commands
- See @workflow/system-commands.mdc for details

## Additional Guidelines
- Include purpose comments in code
- Ask for clarification when unsure
- Check existing code/configurations
- See @checklists/development.mdc for more

About

My constantly changing set of cursor rules and prompts

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published