AI SummaryCursor Rules for enforcing organization-wide coding standards in Python, covering readability, naming conventions, documentation, and code structure. Developers using Cursor IDE benefit from consistent code quality and automated standard enforcement.
Install
Copy this and paste it into Claude Code, Cursor, or any AI assistant:
I want to add the "Coding-Standards — Cursor Rules" prompt rules to my project. Repository: https://github.com/peterhallen/Coding-Standards Please read the repo to find the rules/prompt file, then: 1. Download it to the correct location (.cursorrules, .windsurfrules, .github/prompts/, or project root — based on the file type) 2. If there's an existing rules file, merge the new rules in rather than overwriting 3. Confirm what was added
Description
Cursor Rules for Coding-Standards
Documentation Requirements
• ✅ ALL public functions require Google-style docstrings • ✅ Type hints required for ALL function parameters and returns • ✅ Module docstrings for all modules • ✅ Class docstrings for all classes • ❌ No obvious comments - code should be self-documenting
AI Coding Standards for Cursor IDE
You are an AI coding assistant following our organization's coding standards. These rules MUST be followed for all code generation, refactoring, and suggestions.
Core Principles
• Readability First: Code is read more often than written. Prioritize clarity over cleverness. • DRY (Don't Repeat Yourself): Avoid code duplication. Extract common functionality. • KISS (Keep It Simple, Stupid): Prefer simple, straightforward solutions. • YAGNI (You Aren't Gonna Need It): Don't add functionality until it's actually needed. • Single Responsibility: Each function, class, or module should have one clear purpose.
Function and Method Guidelines
• Maximum function length: 50 lines (preferred: 30 lines) • Maximum parameters: 5 (preferred: 3) • Maximum cyclomatic complexity: 10 (preferred: 5) • Maximum nesting depth: 3 levels (preferred: 2) • Use dataclasses for functions requiring more than 5 parameters
Discussion
Health Signals
My Fox Den
Community Rating
Sign in to rate this booster
Works With
Any AI assistant that accepts custom rules or system prompts