Centralized AI coding standards and style guides with automated sync across GitHub Copilot, Cursor, Claude Code, and other AI-powered development tools for consistent code completions.
๐ Setup Guide - Step-by-step instructions for automatic integration with VS Code Copilot, Cursor IDE, and Claude Code.
This repository contains comprehensive coding standards, style guides, and code snippets for multiple programming languages and frameworks. These standards are designed to be consumed by AI coding assistants to ensure consistent, high-quality code generation across your development team.
โโโ csharp-dotnet/
โ โโโ rules.yml # C#/.NET coding standards
โ โโโ styleguide.md # Examples and best practices
โ โโโ snippets/ # Code snippets and templates
โโโ typescript/
โ โโโ rules.yml # TypeScript coding standards
โ โโโ styleguide.md # Examples and best practices
โ โโโ snippets/ # Code snippets and templates
โโโ react/
โ โโโ rules.yml # React coding standards
โ โโโ styleguide.md # Examples and best practices
โ โโโ snippets/ # Code snippets and templates
โโโ sql/
โ โโโ rules.yml # SQL coding standards
โ โโโ styleguide.md # Examples and best practices
โ โโโ snippets/ # Code snippets and templates
โโโ python/
โ โโโ rules.yml # Python coding standards
โ โโโ styleguide.md # Examples and best practices
โ โโโ snippets/ # Code snippets and templates
โโโ java-spring-boot/
โ โโโ rules.yml # Java/Spring Boot coding standards
โ โโโ styleguide.md # Examples and best practices
โ โโโ snippets/ # Code snippets and templates
โโโ dart-flutter/
โ โโโ rules.yml # Dart/Flutter coding standards
โ โโโ styleguide.md # Examples and best practices
โ โโโ snippets/ # Code snippets and templates
โโโ .ai-rules-index.json # Index file for AI tools
โโโ sync-config.json # Configuration for syncing with AI tools
โโโ README.md # This file
This repository serves several key purposes:
- Consistency: Ensure all developers and AI assistants follow the same coding standards
- Quality: Maintain high code quality through well-defined best practices
- Efficiency: Speed up development with AI-powered code completion that follows your standards
- Education: Provide clear examples and guidance for developers
- Integration: Seamlessly integrate with popular AI coding tools
- Naming conventions and code organization
- Dependency injection patterns
- Async/await best practices
- LINQ usage guidelines
- Testing with xUnit/NUnit
- Error handling and logging
- Type safety and type annotations
- Modern JavaScript features
- Function and class patterns
- Error handling strategies
- Testing with Jest/Vitest
- Component structure and organization
- Hooks usage and custom hooks
- State management patterns
- Performance optimization
- Accessibility guidelines
- Testing with React Testing Library
- Schema design and normalization
- Query optimization
- Indexing strategies
- Security best practices
- Stored procedures and functions
- Transaction handling
- PEP 8 compliance
- Type hints and annotations
- Async/await patterns
- Data structures and algorithms
- Testing with pytest
- Error handling and context managers
โ For detailed setup instructions, see SETUP.md
GitHub Copilot can reference these standards through the .ai-rules-index.json file. To use:
- Ensure this repository is accessible to your GitHub account
- The
.ai-rules-index.jsonfile provides metadata about available rules - Copilot will automatically suggest code that follows these standards
Quick Start: See VS Code Copilot Setup for automatic integration steps.
Cursor can load these rules to provide context-aware suggestions:
- Configure
sync-config.jsonwith your repository settings - Cursor will sync rules and provide completions based on your standards
- Use
@rulesin Cursor to explicitly reference specific standards
Quick Start: See Cursor IDE Setup for automatic integration steps.
Claude Code uses CLAUDE.md files to load project-specific instructions:
- Create a
CLAUDE.mdfile in your project root referencing these standards - Claude Code automatically reads
CLAUDE.mdand follows the rules during coding sessions - Use
/initin Claude Code to auto-generate a starterCLAUDE.md
Quick Start: See Claude Code Setup for detailed integration steps.
The standardized format (rules.yml + styleguide.md) can be consumed by:
- Tabnine
- Codeium
- Amazon CodeWhisperer
- Any tool supporting custom rule definitions
โ New to setup? See SETUP.md for automatic integration with VS Code Copilot, Cursor IDE, and Claude Code.
Each language folder contains:
- rules.yml: Machine-readable rules with priority levels and examples
- styleguide.md: Human-readable guide with comprehensive examples showing โ good and โ bad practices
- snippets/: Reusable code templates
The rules are structured to be easily parsed:
rules:
category_name:
- rule: "Description of the rule"
priority: "high|medium|low|critical"
example: "Code example"- critical: Must follow (security, correctness)
- high: Should follow (best practices, maintainability)
- medium: Recommended (code quality, readability)
- low: Optional (style preferences)
The sync-config.json file configures automatic syncing:
{
"sync_enabled": true,
"tools": ["copilot", "cursor", "claude-code", "tabnine"],
"update_frequency": "daily"
}To add or update standards:
- Edit the appropriate
rules.ymlfile - Update the corresponding
styleguide.mdwith examples - Add any useful snippets to the
snippets/folder - Update
.ai-rules-index.jsonif adding new categories - Submit a pull request
- Keep rules concise and actionable
- Provide clear examples for each rule
- Specify priority levels appropriately
- Include both positive and negative examples in styleguides
- Test rules with AI tools before submitting
These rules include security best practices:
- Input validation and sanitization
- Secure authentication and authorization
- Protection against common vulnerabilities (SQL injection, XSS, etc.)
- Secure data storage and transmission
For questions or issues:
- Create an issue in this repository
- Contact your development team lead
- Refer to the styleguides for detailed examples
Planned additions:
- Java coding standards
- Go coding standards
- Kotlin coding standards
- GraphQL best practices
- Docker and container standards
- CI/CD pipeline configurations
- API design guidelines
- Microservices patterns
Note: These standards are living documents. Regular updates ensure they stay current with evolving best practices and new language features.