Awesome Reviewers
Awesome Reviewers ✨
Ready-to-use system prompts extracted from thousands of code review comments in leading open source repositories. Simply copy and paste into VS Code, Cursor, Claude, or any AI agent.
Reviewers Library (1,790)
Add Repository
All Categories
▼
AI
API
Algorithms
Axios
Axum
CI/CD
Caching
Celery
Code Style
Concurrency
Configurations
Database
Documentation
Error Handling
Fastify
Logging
Migrations
Naming Conventions
NestJS
Networking
Next
Next.js
Null Handling
Observability
Performance Optimization
Pytorch
React
Security
Spring
Temporal
Testing
Vue
All Repositories
▼
Azure/azure-sdk-for-net
Homebrew/brew
JetBrains/kotlin
apache/airflow
apache/mxnet
astral-sh/ruff
astral-sh/uv
aws/aws-sdk-js
axios/axios
boto/boto3
bridgecrewio/checkov
chef/chef
crewaiinc/crewai
deeplearning4j/deeplearning4j
django/django
dotnet/runtime
elastic/elasticsearch
elie222/inbox-zero
expressjs/express
facebook/react
fastapi/fastapi
fastify/fastify
fatedier/frp
getsentry/sentry
getsentry/sentry-php
ghostty-org/ghostty
gin-gonic/gin
grafana/grafana
hashicorp/terraform
huggingface/tokenizers
influxdata/influxdb
kubeflow/kubeflow
langchain-ai/langchainjs
langfuse/langfuse
laravel/framework
maplibre/maplibre-native
mui/material-ui
neondatabase/neon
nestjs/nest
netty/netty
nodejs/node
octokit/octokit.net
ollama/ollama
open-telemetry/opentelemetry-python
opencv/opencv
opentofu/opentofu
oven-sh/bun
pola-rs/polars
prowler-cloud/prowler
pydantic/pydantic
pytorch/pytorch
quarkusio/quarkus
rails/rails
salesforce/cloudsplaining
shadcn-ui/ui
spring-projects/spring-boot
spring-projects/spring-framework
tensorflow/swift
tensorflow/tensorflow
tokio-rs/axum
tokio-rs/tokio
torvalds/linux
vercel/ai
vercel/next.js
vercel/turborepo
vitejs/vite
vitessio/vitess
vllm-project/vllm
vuejs/core
zed-industries/zed
All Languages
▼
C
C#
C++
CUDA
Css
Dockerfile
Go
Html
JSON
Java
JavaScript
Json
Kotlin
Markdown
Mdx
Other
PHP
Prisma
Python
Ruby
Rust
Shell
Sql
Swift
TOML
TSX
Terraform
Toml
Txt
TypeScript
Xml
Yaml
⟳
Use environment variables
21
⭐ 45.5K
When working with configurations that require sensitive data (credentials, tokens, passwords), always use environment…
Configurations
Share
Prevent sensitive data exposure
20
⭐ 7.7K
Never log or store sensitive information (passwords, tokens, secrets) in clear text. This common security vulnerabili…
Security
Share
Optimize allocation hotspots
17
⭐ 34.2K
Identify and optimize object allocation in performance-critical paths by applying appropriate allocation strategies b…
Performance Optimization
Share
Extract for clarity
16
⭐ 73.1K
Extract complex or reused logic into focused, well-named methods with single responsibilities. This improves code rea…
Code Style
Share
Protect sensitive data
16
⭐ 7.7K
Never log, display, or store sensitive information like passwords, tokens, or secrets in clear text. This creates sig…
Security
Share
Comprehensive documentation standards
16
⭐ 22.1K
Create clear, well-structured API documentation following proper formatting, correct references, informative examples…
Documentation
Share
Use specific assertion methods
15
⭐ 34K
Choose the appropriate assertion method based on the data type being tested. This improves test readability and provi…
Testing
Share
Optimize regex patterns
14
⭐ 1.9K
When using regular expressions, optimize for both performance and precision to ensure efficient and accurate pattern …
Algorithms
Share
Consistent naming patterns
14
⭐ 2.8K
Follow consistent naming conventions throughout the codebase to improve readability and maintainability:
1. **Client…
Naming Conventions
Share
Handle async operation errors
14
⭐ 8.3K
Always wrap asynchronous operations in try-catch-finally blocks to prevent unhandled promise rejections and ensure pr…
Error Handling
Share
Keep CI configurations minimal
14
⭐ 33.8K
When configuring CI workflows, include only the extensions, tools, and settings that are necessary for the specific t…
CI/CD
Share
Spring code style
spring-projects/spring-framework
13
⭐ 58.4K
Follow Spring Framework’s code style guidelines to ensure consistency across the codebase. Key rules include:
1. **I…
Code Style
Share
Code for readability
13
⭐ 82.9K
Prioritize human readability when writing code. Split complex expressions into steps with meaningful variable names. …
Code Style
Share
Descriptive consistent naming
13
⭐ 32.9K
Use descriptive, consistent naming that follows language and platform conventions. Choose names that clearly communic…
Naming Conventions
Share
Clean up your code
13
⭐ 14K
Maintain clean, professional code by removing development artifacts and improving readability:
1. **Remove debug cod…
Code Style
Share
Design interfaces, not implementations
12
⭐ 62.1K
Create intuitive API interfaces that abstract away implementation details while providing a consistent experience for…
API
Share
Use testify assertion libraries
12
⭐ 19.8K
Replace manual if-error checks with `testify`’s `assert` and `require` packages to make tests more readable, maintain…
Testing
Share
Eliminate redundant constructs
12
⭐ 20.8K
Remove unnecessary coding patterns that add complexity without providing value. Focus on clarity and simplicity by:
…
Code Style
Share
Limit token permissions
12
⭐ 7.9K
Always specify the minimum required permissions for the GITHUB_TOKEN in GitHub Actions workflows to enhance security….
Security
Share
Maintain consistent style
12
⭐ 79.1K
Maintain consistent style patterns throughout the codebase to improve readability, reduce maintenance overhead, and p…
Code Style
Share
Follow support tiers
12
⭐ 44.2K
Configure your Homebrew installation according to the defined support tiers to ensure optimal functionality and suppo…
Configurations
Share
Eliminate code redundancy
11
⭐ 51.7K
Keep your codebase maintainable by eliminating both unnecessary and duplicated code:
1. **Remove debugging artifacts…
Code Style
Share
Minimize allocation hotspots
spring-projects/spring-framework
11
⭐ 58.4K
Reduce object creation in performance-critical paths by carefully evaluating allocation patterns. For frequently inst…
Performance Optimization
Share
Split for better readability
11
⭐ 1.9K
Break long lines and complex structures across multiple lines to improve code readability. Follow these guidelines:
…
Code Style
Share
Optimize for readability
11
⭐ 16.6K
Write code that clearly communicates intent by using appropriate naming and formatting techniques. Improve readabilit…
Code Style
Share
Device-agnostic acceleration code
11
⭐ 91.3K
Avoid hardcoding specific device types like ‘cuda’ in AI code. Instead, use device-agnostic approaches such as device…
AI
Share
Craft actionable errors
11
⭐ 25.9K
Create error messages that provide precise context, avoid unnecessary details, and give users clear actions to take. …
Error Handling
Share
Idempotent error-safe disposers
11
⭐ 112.2K
When implementing resource cleanup logic, especially disposers for explicit resource management, always design for re…
Error Handling
Share
Follow modern C++ guidelines
11
⭐ 1.4K
Adhere to the C++ Core Guidelines for improved code quality, readability, and maintainability. Follow these key pract…
Code Style
Share
Names express clear intent
11
⭐ 50.9K
Choose names that clearly express intent and follow established conventions. Prefer explicit, descriptive names over …
Naming Conventions
Share
Sanitize all inputs
11
⭐ 8.3K
Properly sanitize or escape all user-provided inputs before using them in sensitive contexts to prevent injection att…
Security
Share
Standardize platform-agnostic configuration
10
⭐ 62.1K
Ensure configuration handling is consistent and platform-agnostic by following these guidelines:
1. Use environment …
Configurations
Share
Document code thoroughly
10
⭐ 51.7K
Always include comprehensive documentation for your code through both docstrings and explanatory comments.
For clas…
Documentation
Share
Use proper types
10
⭐ 190.6K
Maintain code clarity by using appropriate type declarations and parameter passing conventions:
1. **Prefer explicit…
Code Style
Share
Complete API documentation
spring-projects/spring-framework
10
⭐ 58.4K
Documentation should be complete, accurate, and follow Spring Framework conventions. Ensure your Javadocs include:
1…
Documentation
Share
Purposeful documentation standards
10
⭐ 1.9K
Documentation should convey purpose and behavior, not just replicate code structure. Each docblock should explain wha…
Documentation
Share
Standardize configuration paths
10
⭐ 14.7K
Follow consistent patterns for storing and referencing configuration files across projects. Place custom configuratio…
Configurations
Share
Next.js directory structure
10
⭐ 11.8K
Keep the Next.js `/app` directory strictly for routing purposes as per framework conventions. Non-routing related cod…
Code Style
Share
Safe null handling
10
⭐ 34.3K
Always implement robust null handling patterns to prevent unexpected behavior and crashes. Consider all edge cases wh…
Null Handling
Share
Extract duplicated code
10
⭐ 34.3K
Identify and extract duplicated code into reusable functions or move common fields to parent structures. This makes t…
Code Style
Share
Consistent descriptive naming
10
⭐ 82.9K
Use clear, descriptive names that follow consistent patterns established in the codebase and broader programming stan…
Naming Conventions
Share
TypeScript naming standards
10
⭐ 15K
Follow consistent naming conventions in TypeScript to improve code clarity, type safety, and developer experience:
1…
Naming Conventions
Share
Handle errors with care
10
⭐ 8.3K
Always implement comprehensive error handling for asynchronous operations, external API calls, and database operation…
Error Handling
Share
Optimize for code readability
10
⭐ 33.8K
Prioritize code readability over clever solutions by: 1. Using early returns to reduce nesting 2. Leveraging modern P…
Code Style
Share
Centralize dependency management
10
⭐ 14K
Manage dependencies at the top level using `` to ensure version consistency across modules and …
Configurations
Share
Restrict public access
10
⭐ 7.7K
Cloud resources should be configured to restrict public network access by default to minimize potential attack surfac…
Networking
Share
Extract focused functions
10
⭐ 7.7K
Break down complex logic into small, well-named functions that each do one thing well. This improves code readability…
Code Style
Share
Consistent naming conventions
10
⭐ 7.7K
Maintain consistent naming patterns throughout the codebase to improve readability and reduce confusion:
1. **Use de…
Naming Conventions
Share
Prefer explicit nil handling
10
⭐ 44.2K
Handle nil values explicitly and consistently to improve code clarity and type safety. Follow these guidelines:
1. U…
Null Handling
Share
Type-safe flexible APIs
10
⭐ 22.1K
Design APIs that favor both type safety and flexibility. Use strongly typed wrappers instead of primitive types, but …
API
Share
Consistent semantic naming
10
⭐ 15.6K
Use clear, consistent, and semantic naming patterns across your codebase to improve readability and maintainability: …
Naming Conventions
Share
Prefer idiomatic Option handling
9
⭐ 62.1K
When handling null values in Rust, use idiomatic Option patterns instead of verbose nested conditionals. This improve…
Null Handling
Share
Avoid magic numbers
9
⭐ 51.7K
Replace hardcoded values and magic numbers in AI model code with named constants or configuration parameters. This im…
AI
Share
Propagate errors with context
9
⭐ 28.1K
Properly propagate errors to callers with sufficient context rather than handling them prematurely or hiding them. Le…
Error Handling
Share
Release locks before waking
9
⭐ 29K
In concurrent systems, it’s critical to release locks before performing operations that might trigger reentrancy or b…
Concurrency
Share
Use consistent error handling
9
⭐ 190.6K
Apply standardized error handling patterns across your codebase for improved reliability and debugging. For new code,…
Error Handling
Share
Preserve API compatibility
9
⭐ 77.6K
When evolving APIs, maintain backward compatibility to avoid breaking client code. Consider these guidelines:
1. **A…
API
Share
Descriptive identifier naming
9
⭐ 1.9K
Choose meaningful, self-explanatory names for variables, parameters, properties, and methods that clearly convey thei…
Naming Conventions
Share
Specific exceptions with context
9
⭐ 16.6K
Always throw the most specific exception type appropriate for the error condition and include contextual information …
Error Handling
Share
Optimize memory access
9
⭐ 16.6K
When implementing performance-critical algorithms, carefully consider memory access patterns. Document alignment assu…
Algorithms
Share
Follow naming patterns
9
⭐ 16.6K
Maintain consistent naming patterns throughout your code to improve readability and maintainability. Follow these gui…
Naming Conventions
Share
Self-documenting identifier names
9
⭐ 57K
Use clear, self-documenting names for variables, methods, and classes that express intent without exposing unnecessar…
Naming Conventions
Share
Layer security defenses
9
⭐ 57K
Implement multiple layers of security throughout your application rather than relying on a single protection mechanis…
Security
Share
Verify token security level
9
⭐ 14.7K
When refreshing or updating authentication tokens, always verify the new token maintains or exceeds the original toke…
Security
Share
Appropriate error handling
9
⭐ 34.3K
Distinguish between implementation errors (invariant violations) and expected failure cases. For implementation error…
Error Handling
Share
Semantic over generic names
9
⭐ 34.2K
Choose specific, descriptive names that clearly convey purpose over generic or abbreviated identifiers. Names should …
Naming Conventions
Share
Document public APIs
9
⭐ 34.2K
All public-facing APIs must be thoroughly documented with clear javadocs. This includes:
1. **Classes and interfaces…
Documentation
Share
Explicit default configurations
9
⭐ 71.8K
Always provide explicit default values for configuration options to improve code readability and maintainability. Use…
Configurations
Share
Choose meaningful identifier names
9
⭐ 71.8K
Names for variables, methods, and classes should be descriptive, semantically accurate, and consistent with establish…
Naming Conventions
Share
Sync documentation with code
9
⭐ 13.6K
Always ensure documentation and comments accurately reflect the actual code implementation. When modifying code, upda…
Documentation
Share
Use transactions for consistency
9
⭐ 8.3K
Always wrap multiple related database operations in a transaction to ensure data consistency and prevent partial upda…
Database
Share
Remove commented code
9
⭐ 8.3K
Commented-out code should be removed from the codebase rather than left as comments. Keeping commented code:
1. Clut…
Code Style
Share
Extract repeated code
9
⭐ 68.8K
Identify and extract repeated code patterns into well-named functions to improve readability, maintainability, and te…
Code Style
Share
Code structure clarity
9
⭐ 32.9K
Write code with clear structural organization that enhances readability and maintainability. Extract duplicated or co…
Code Style
Share
Explicit null handling
9
⭐ 33.8K
Use explicit identity comparisons for null checks and leverage modern PHP null-handling features to create more relia…
Null Handling
Share
Documentation translation guidelines
9
⭐ 86.9K
Maintain consistency and accuracy when translating documentation. Ensure technical terms and special formatting eleme…
Documentation
Share
Name reflects meaning
9
⭐ 73.1K
Choose names that clearly communicate the intent, behavior, and semantics of code elements. Names should be accurate,…
Naming Conventions
Share
Remove debugging artifacts
9
⭐ 14K
Production code should be free from debugging artifacts that reduce readability and maintainability. Remove all debug…
Code Style
Share
Fail gracefully always
9
⭐ 7.9K
Ensure code handles errors robustly by using protective patterns that prevent resource leaks, provide clear diagnosti…
Error Handling
Share
Safe dictionary navigation
9
⭐ 7.7K
Always use the `.get()` method with appropriate default values when accessing dictionaries instead of direct key acce…
Null Handling
Share
Centralize environment variables
9
⭐ 7.7K
All environment variables should be defined in a centralized location (`checkov/common/util/env_vars_config.py`) rath…
Configurations
Share
Documentation quality standards
9
⭐ 5.8K
Ensure documentation is specific, complete, and actionable for developers:
1. **Provide meaningful content** - Avoid…
Documentation
Share
Axum Code Review: Interaction Patterns
9
⭐ 22.1K
When implementing Axum-based applications, it is crucial to ensure that the interaction patterns between components a…
Axum
Share
Vectorize over Python loops
8
⭐ 51.7K
Replace Python loops and list comprehensions with vectorized operations when processing tensors or performing repeate…
Performance Optimization
Share
Catch specific exception types
8
⭐ 51.7K
Avoid using broad exception handlers like `except Exception:` or bare `except:`. Instead, catch specific exception ty…
Error Handling
Share
Prevent concurrent access races
8
⭐ 19.8K
When sharing data across goroutines, always use proper synchronization mechanisms to prevent race conditions. Race co…
Concurrency
Share
Meaningful consistent naming
8
⭐ 19.8K
Use descriptive, semantically clear names that follow consistent patterns throughout the codebase. Names should conve…
Naming Conventions
Share
Names should be descriptive
8
⭐ 60.3K
Use clear, descriptive names while avoiding redundant qualifiers. Choose full words over abbreviations unless the abb…
Naming Conventions
Share
Clear precise documentation
8
⭐ 60.3K
Documentation should use direct, precise language that accurately describes components and their behavior. Maintain c…
Documentation
Share
Validate configurations comprehensively
8
⭐ 28.1K
When implementing configuration systems, ensure comprehensive validation, testing, and documentation. Key requirement…
Configurations
Share
Descriptive, unambiguous identifiers
8
⭐ 28.1K
Choose names that clearly express intent and behavior while avoiding ambiguity. Identifiers should communicate their …
Naming Conventions
Share
Write focused single-purpose tests
8
⭐ 29K
Break down large test cases into smaller, focused tests that each verify a single feature or behavior. Each test shou…
Testing
Share
Optimize algorithmic complexity
8
⭐ 29K
Always consider the time and space complexity implications of your code. Choose data structures and algorithms that m…
Algorithms
Share
Return results not panics
8
⭐ 9.9K
Libraries should never panic as this can crash applications using the library. Always return a `Result` type rather t…
Error Handling
Share
Descriptive specific names
spring-projects/spring-framework
8
⭐ 58.4K
Choose names that are specific, descriptive, and accurately reflect the purpose and domain of variables, methods, cla…
Naming Conventions
Share
Optimize test case design
8
⭐ 77.6K
Write focused, efficient tests that validate core functionality without unnecessary complexity. Key principles:
1. T…
Testing
Share
Follow consistent style conventions
8
⭐ 77.6K
Spring Boot projects maintain specific coding style conventions for consistency and readability. When contributing co…
Code Style
Share
Explicit security configurations
8
⭐ 77.6K
When configuring security-related features, always use the most specific configurer classes to make security decision…
Security
Share
Precise type narrowing
8
⭐ 40.6K
Implement sound type narrowing algorithms that balance precision with correctness. When narrowing types:
1. For dire…
Algorithms
Share
Organize tests for clarity
8
⭐ 57K
Structure tests to maximize clarity and maintainability by: 1. Placing related tests together in appropriate test fil…
Testing
Share
Optimize numerical precision
8
⭐ 91.3K
When implementing AI operations that involve matrix multiplication or neural network components, explicitly support m…
AI
Share
Use configurable default values
8
⭐ 11.8K
Make configuration values flexible and robust by avoiding hardcoded values and providing sensible defaults. This ensu…
Configurations
Share
Specific exception handling
8
⭐ 11.8K
Handle exceptions with specificity rather than using broad catch-all blocks. Catch specific exception types, provide …
Error Handling
Share
Separate configuration lifecycles
8
⭐ 25.9K
Maintain clear separation between different stages of configuration processing by creating dedicated structures for e…
Configurations
Share
Log effectively for debugging
8
⭐ 25.9K
Always include meaningful log messages at appropriate levels to aid in debugging and system monitoring. Follow these …
Logging
Share
Document intent and limitations
8
⭐ 25.9K
Clearly document the intended purpose, scope limitations, and design decisions in your code. For all exported types, …
Documentation
Share
Follow GoDoc conventions
8
⭐ 145.7K
Document code following Go’s official documentation style guide (https://tip.golang.org/doc/comment). All exported fu…
Documentation
Share
Descriptive balanced naming
8
⭐ 145.7K
Choose identifier names that clearly communicate their purpose while maintaining an appropriate balance between brevi…
Naming Conventions
Share
Use specific assertions
8
⭐ 2.8K
Always write assertions that verify specific, expected values rather than simple existence or boolean checks. This en…
Testing
Share
Document public API elements
8
⭐ 2.8K
Every public API element (classes, methods, properties, constructors) must have XML documentation comments that clear…
Documentation
Share
Informative error messages
8
⭐ 112.2K
Error messages should be specific, actionable, and include context that helps developers understand and fix the issue…
Error Handling
Share
Evolve return values
8
⭐ 112.2K
When extending APIs with new capabilities, carefully consider how changes to return values affect consumers. Avoid cr…
API
Share
Technical documentation precision
8
⭐ 133K
Ensure technical documentation is precise, accurate, and correctly formatted to prevent confusion and improve develop…
Documentation
Share
Secure Data Handling in Next.js Applications
8
⭐ 133K
When building Next.js applications that handle sensitive data, it’s crucial to implement robust security measures to …
Next.js
Share
Effective Cache Management in Next.js Applications
8
⭐ 133K
When implementing caching in Next.js applications, it is crucial to be intentional about the caching behavior for eac…
Next.js
Share
Design domain-specific error types
8
⭐ 19K
Create and use domain-specific error types instead of generic errors or anyhow. This improves error handling clarity …
Error Handling
Share
Technical precision matters
8
⭐ 20.8K
When documenting AI models, frameworks, and optimization techniques, precision in language is as important as precisi…
AI
Share
Validate noexcept guarantees
8
⭐ 1.4K
Only mark functions as `noexcept` when you can guarantee they won’t throw exceptions under any circumstances. Common …
Error Handling
Share
Extract repeated code
8
⭐ 13.6K
Follow the DRY (Don’t Repeat Yourself) principle by extracting repeated code patterns into helper functions, constant…
Code Style
Share
Effective API samples
8
⭐ 50.9K
Create clear, comprehensive, and properly structured code samples to document API usage. Follow these principles:
1….
Documentation
Share
Use descriptive names
8
⭐ 30.3K
Names in code should be self-documenting, accurately reflect purpose, and follow consistent conventions. Apply these …
Naming Conventions
Share
Promote code clarity
8
⭐ 30.3K
Write code that prioritizes clarity and maintainability over brevity. This involves several key practices:
1. **Extr…
Code Style
Share
Minimize critical path allocations
8
⭐ 30.3K
Avoid unnecessary memory allocations in performance-critical code paths. These allocations not only consume memory bu…
Performance Optimization
Share
Lock with defer unlock
8
⭐ 30.3K
Always follow the lock-defer-unlock pattern when protecting shared resources with mutexes. Acquire the lock, immediat…
Concurrency
Share
Choose appropriate lock primitives
8
⭐ 30.3K
Select lock types based on access patterns - prefer RWLock over Mutex for read-heavy operations to enable concurrent …
Concurrency
Share
Documentation clarity and formatting
8
⭐ 32.9K
Ensure documentation is clear, precise, and consistently formatted. Key practices include:
1. **Be explicit and unam…
Documentation
Share
Use semantic exceptions
8
⭐ 33.8K
Choose exception types that accurately reflect the nature of the error. Use `LogicException` for developer errors lik…
Error Handling
Share
Precise type annotations
8
⭐ 33.8K
Always use the most specific and accurate type information possible in PHPDoc comments to improve static analysis, ID…
Documentation
Share
Write clear documentation
8
⭐ 34K
Documentation should be clear, precise, and self-contained while following established style conventions. When writin…
Documentation
Share
Isolate configuration concerns
8
⭐ 86.9K
Keep configuration settings separate from application code by using environment variables or dedicated configuration …
Configurations
Share
Document all responses
8
⭐ 86.9K
When designing APIs, thoroughly document all possible responses your endpoints can return, not just the “happy path” …
API
Share
Single source documentation
8
⭐ 67.3K
Maintain documentation with a single source of truth to prevent inconsistencies and reduce maintenance burden. When i…
Documentation
Share
Enforce null safety patterns
8
⭐ 67.3K
Implement comprehensive null safety patterns to prevent runtime errors and ensure predictable behavior. Follow these …
Null Handling
Share
Optimize before implementing
8
⭐ 73.1K
Before implementing algorithms, evaluate their efficiency implications, especially for operations that may be execute…
Algorithms
Share
Document API completely
8
⭐ 14K
All public APIs must have comprehensive and clear documentation that helps developers understand functionality withou…
Documentation
Share
Semantic naming patterns
8
⭐ 33.9K
Names should clearly communicate purpose, relationships, and domain context. Choose identifiers that reveal intent an…
Naming Conventions
Share
Prefer pythonic simplicity
8
⭐ 33.9K
Use Python’s expressive features to write cleaner, more maintainable code by reducing nesting and improving readabili…
Code Style
Share
Extract and organize methods
8
⭐ 7.9K
Break down large, complex methods into smaller, focused methods with clear names that describe their purpose. This im…
Code Style
Share
Write pythonic code
8
⭐ 7.7K
Embrace Python’s idiomatic programming style to make your code more readable, concise, and maintainable. Follow these…
Code Style
Share
Safe dictionary access
8
⭐ 7.7K
Always use safe dictionary access patterns when handling potentially null or missing values. This prevents KeyError a…
Null Handling
Share
Restrict public network
8
⭐ 7.7K
Always configure cloud resources to restrict or disable public network access unless explicitly required for the appl…
Networking
Share
Choose optimal algorithms
8
⭐ 7.7K
Always select appropriate data structures and algorithms based on their performance characteristics and the specific …
Algorithms
Share
Write self-documenting tests
8
⭐ 9.4K
Tests should clearly communicate their purpose and expectations without requiring readers to analyze implementation d…
Testing
Share
Use descriptive action names
8
⭐ 40.9K
Names should clearly indicate purpose and behavior using appropriate action verbs and descriptive terms. This applies…
Naming Conventions
Share
Test through public APIs
7
⭐ 62.1K
Write comprehensive tests that validate functionality through public interfaces rather than testing implementation de…
Testing
Share
Follow logging best practices
7
⭐ 51.7K
Maintain high-quality logging throughout the codebase by following these best practices:
1. **Use appropriate log le…
Logging
Share
Check before access
7
⭐ 51.7K
Always verify that objects, attributes, and variables are not None before accessing their properties, calling their m…
Null Handling
Share
Dynamic configuration needs validation
7
⭐ 19.8K
When implementing dynamic configuration options, validate that the system actually supports runtime changes for that …
Configurations
Share
Descriptive consistent naming
7
⭐ 74K
Choose variable, function, and class names that accurately reflect their purpose while maintaining consistency with e…
Naming Conventions
Share
Structure for readability
7
⭐ 60.3K
Organize code to maximize readability and maintainability. When code becomes complex, break it down into smaller, mor…
Code Style
Share
Redact URL credentials
7
⭐ 60.3K
Always redact sensitive credentials in URLs before logging, displaying in error messages, or serializing to prevent a…
Security
Share
Organize tailwind classes
7
⭐ 90.6K
Structure your Tailwind CSS classes for readability and maintainability. Instead of long chains of conditional classe…
Code Style
Share
Structure conditional compilation
7
⭐ 29K
Use organized structural patterns for conditional compilation to improve code maintainability and readability. Avoid …
Configurations
Share
Follow naming conventions
7
⭐ 29K
Choose names that follow established API conventions and guidelines to create a consistent, intuitive codebase:
1. F…
Naming Conventions
Share
Meaningful consistent names
7
⭐ 190.6K
Choose names that are both semantically precise and follow consistent conventions. Names should accurately reflect be…
Naming Conventions
Share
Use AssertJ correctly
spring-projects/spring-framework
7
⭐ 58.4K
Spring Framework tests must use AssertJ for assertions rather than JUnit’s `Assertions`, Spring’s `Assert` class, or …
Testing
Share
Maintain consistent naming patterns
7
⭐ 77.6K
Follow established naming patterns and conventions throughout the codebase to ensure consistency and clarity. This in…
Naming Conventions
Share
Consistent observability data
7
⭐ 77.6K
When implementing observability features, always ensure consistency in your data model, especially with tags and attr…
Observability
Share
Use data providers effectively
7
⭐ 1.9K
Organize your test suite by using data providers to consolidate similar test cases rather than creating multiple test…
Testing
Share
Evolve API safely
7
⭐ 1.9K
When modifying existing APIs, implement changes that maintain backward compatibility while enabling new functionality…
API
Share
Minimize mocks verify behavior
7
⭐ 41.3K
Write tests that verify actual system behavior rather than implementation details by minimizing mock usage and focusi…
Testing
Share
Simplify code expressions
7
⭐ 16.6K
Strive for clarity by simplifying code expressions and reducing unnecessary complexity. Complex or verbose expression…
Code Style
Share
Choose error strategies deliberately
7
⭐ 40.6K
Make deliberate choices about error handling strategies based on the context. Decide between early returns with appro…
Error Handling
Share
Database-specific query optimization
7
⭐ 57K
Leverage database-specific features to optimize queries and improve performance. Different database engines have uniq…
Database
Share
Configure at proper scope
7
⭐ 57K
Place configuration options at their proper scope within the framework hierarchy. Avoid tight coupling between compon…
Configurations
Share
Meaningful error communication
7
⭐ 14.7K
Error handling should be designed to provide clear, actionable information to developers while avoiding redundancy. F…
Error Handling
Share
Document configuration comprehensively
7
⭐ 14.7K
Configuration properties should be thoroughly documented with explicit details about constraints, units, default valu…
Configurations
Share
API evolution strategy
7
⭐ 14.7K
Design APIs with future extensibility in mind by using parameter objects instead of direct method parameters. When an…
API
Share
Document code rationale
7
⭐ 24.4K
Add clear comments that explain the “why” behind non-obvious code decisions, complex logic, or special-case handling….
Documentation
Share
Consistent term capitalization
7
⭐ 24.4K
Follow consistent capitalization rules for technical terms, acronyms, and library names throughout your codebase and …
Naming Conventions
Share
Meaningful consistent naming
7
⭐ 11.8K
Use names that clearly describe the purpose and behavior of variables, methods, classes, and files, while maintaining…
Naming Conventions
Share
Specify configuration behaviors
7
⭐ 25.9K
When implementing configuration features (variables, flags, resources), thoroughly document their behavior in all sce…
Configurations
Share
Optimize code location scope
open-telemetry/opentelemetry-python
7
⭐ 2.1K
Place code in the most specific and appropriate location to improve findability and maintainability. Follow these pri…
Code Style
Share
Future-proof API design
open-telemetry/opentelemetry-python
7
⭐ 2.1K
Design APIs that can evolve without breaking existing code. Use keyword-only arguments (with `*,`) for optional param…
API
Share
Use proper assertions
7
⭐ 82.9K
Write tests with proper assertions to ensure reliability and maintainability. Follow these guidelines:
1. **Check fo…
Testing
Share
Use optimized functions
7
⭐ 82.9K
When implementing algorithms, prefer using OpenCV’s built-in optimized functions over writing custom implementations….
Algorithms
Share
Maintain consistent style
7
⭐ 2.8K
Follow established patterns consistently throughout the codebase to improve readability and maintainability:
1. **Us…
Code Style
Share
Version APIs with care
7
⭐ 112.2K
When introducing new API features or changes, implement proper versioning to maintain stability and backward compatib…
API
Share
Public over internal APIs
7
⭐ 112.2K
When designing or implementing APIs, always prefer publicly documented APIs over internal ones. Internal APIs may cha…
API
Share
Benchmark before optimizing code
7
⭐ 112.2K
Performance optimizations should be validated through benchmarks before implementation. This helps prevent premature …
Performance Optimization
Share
Simplify control flow
7
⭐ 34.2K
Streamline code by simplifying control flow structures to improve readability. Eliminate unnecessary nesting and verb…
Code Style
Share
Proper asynchronous error handling
7
⭐ 71.8K
Ensure errors in asynchronous operations and event-based systems are handled consistently to prevent unexpected behav…
Error Handling
Share
Descriptive identifier names
7
⭐ 71.8K
Choose identifier names (variables, functions, parameters, classes) that clearly describe their purpose, content, or …
Naming Conventions
Share
Structure endpoints for REST
7
⭐ 19K
Organize API endpoints hierarchically by resource type and use appropriate HTTP methods based on operation semantics….
API
Share
Clear consistent identifier names
7
⭐ 19K
Choose clear, consistent, and non-redundant names for identifiers across the codebase. Follow these guidelines:
1. U…
Naming Conventions
Share
Simplify for readability
7
⭐ 20.8K
Complex expressions, especially nested ternary operations, reduce code readability and maintainability. Prefer simple…
Code Style
Share
Consistent naming patterns
7
⭐ 20.8K
Maintain consistent naming conventions throughout the codebase to enhance readability and reduce confusion. This appl…
Naming Conventions
Share
Modern C++ style practices
7
⭐ 1.4K
Apply modern C++ features and consistent syntax patterns to improve code readability and safety. Follow these guideli…
Code Style
Share
Surface errors to users
7
⭐ 13.6K
Always provide user-visible feedback for errors instead of only logging to the console. This ensures users are aware …
Error Handling
Share
Falsy vs null checks
7
⭐ 13.6K
Distinguish between falsy values (0, ‘’, false, null, undefined) and null/undefined values in your code. Use explicit…
Null Handling
Share
Cache expensive operations
7
⭐ 13.6K
Identify and cache results of computationally expensive or repetitive operations instead of recalculating them multip…
Performance Optimization
Share
Use comprehensive JSDoc
7
⭐ 15K
Always use JSDoc format (`/** */`) instead of regular comments (`//`) for documenting classes, functions, and interfa…
Documentation
Share
Preserve API backward compatibility
7
⭐ 15K
When modifying existing APIs, maintain backward compatibility by implementing changes in a non-breaking way. Use meth…
API
Share
Simplify code structure
7
⭐ 15.1K
Strive to simplify code structure by eliminating unnecessary complexity. This includes:
1. **Move conditions higher …
Code Style
Share
Precise workflow triggers
7
⭐ 15.1K
Configure CI/CD workflows to trigger precisely based on relevant file path changes. This minimizes unnecessary builds…
CI/CD
Share
Go export naming conventions
7
⭐ 15.1K
In Go, the first letter of an identifier (function, variable, struct field, etc.) determines its visibility outside t…
Naming Conventions
Share
Use configuration property providers
7
⭐ 50.9K
Always use Gradle’s Provider API when accessing project, system, or Gradle properties in your build configuration. Th…
Configurations
Share
Test edge cases
7
⭐ 50.9K
Ensure tests verify both basic functionality and edge cases. Tests that only cover the happy path can miss critical b…
Testing
Share
Minimize unnecessary work
7
⭐ 50.9K
Optimize performance by reducing the amount of computation performed, especially on data that won’t appear in the fin…
Performance Optimization
Share
Keep code clearly organized
7
⭐ 50.9K
Maintain code readability and organization by extracting focused, well-named functions and using appropriate scoping….
Code Style
Share
Design extensible stable APIs
7
⭐ 50.9K
When designing public APIs, prioritize extensibility while maintaining backward compatibility and implementation hidi…
API
Share
Use testify assertions
7
⭐ 30.3K
Always use the testify package (require/assert) in tests instead of standard Go testing assertions. The testify libra…
Testing
Share
Validate environment variables strictly
7
⭐ 8.3K
Enforce strict validation of environment variables using Zod schemas with explicit environment-specific rules. Requir…
Configurations
Share
Safe concurrent programming
7
⭐ 68.8K
When working with concurrent code, carefully manage shared resources and synchronization to prevent race conditions, …
Concurrency
Share
Follow documentation conventions
7
⭐ 68.8K
Ensure documentation adheres to established style guidelines and technical standards:
1. **Use proper terminology an…
Documentation
Share
Use modern PHPUnit attributes
7
⭐ 33.8K
Prefer modern PHPUnit attributes over PHPDoc annotations for improved type safety, IDE support, and code readability …
Testing
Share
Technical term consistency
7
⭐ 86.9K
When working with multilingual codebases or documentation, maintain consistent naming conventions for technical terms…
Naming Conventions
Share
Sync versus async tests
7
⭐ 86.9K
Choose the appropriate testing approach based on your test requirements. For standard API endpoint testing, use `Test…
Testing
Share
Standardize dependency version notation
7
⭐ 67.3K
When specifying dependencies in package.json, follow consistent version notation patterns that align with your projec…
Configurations
Share
Follow StandardJS when modifying
7
⭐ 67.3K
When modifying existing code, update the touched lines to follow StandardJS conventions while preserving the style of…
Code Style
Share
Clear intention in names
7
⭐ 67.3K
Choose names that clearly communicate intention and follow established conventions. This applies to variables, functi…
Naming Conventions
Share
Use descriptive identifier names
7
⭐ 84.2K
Choose clear, descriptive names for variables, functions, and classes that accurately convey their purpose and follow…
Naming Conventions
Share
Document with examples
7
⭐ 7.9K
Always include comprehensive documentation with clear examples for properties, methods, and code patterns. Documentat…
Documentation
Share
Consistent descriptive naming patterns
7
⭐ 7.9K
Use clear, descriptive names that follow consistent patterns across the codebase. For methods and properties:
1. Use…
Naming Conventions
Share
Meaningful identifier names
7
⭐ 7.7K
Choose descriptive and semantic identifiers that clearly convey purpose, role, and behavior. Avoid vague, generic nam…
Naming Conventions
Share
Validate nullability explicitly
7
⭐ 79.1K
Always validate null or undefined values before using them to prevent crashes and undefined behavior. When implementi…
Null Handling
Share
Assert before cast
7
⭐ 79.1K
Always validate values before performing unsafe operations like dynamic casting. When a value could be null, zero, or…
Null Handling
Share
Standardize API integration patterns
7
⭐ 44.2K
Establish consistent patterns for API integrations by following these guidelines:
1. Document API endpoint usage spe…
API
Share
Optimize collection operations
7
⭐ 44.2K
Use Ruby’s built-in collection methods to write more efficient and readable code. This reduces algorithmic complexity…
Algorithms
Share
Prevent algorithmic pitfalls
7
⭐ 9.4K
Avoid common algorithmic errors that lead to incorrect results or inefficient code by following these practices:
1. …
Algorithms
Share
Follow naming conventions
7
⭐ 9.4K
Use consistent and appropriate naming conventions based on the context in Python code:
1. **Classes**: Use `CamelCas…
Naming Conventions
Share
Defensive null value handling
7
⭐ 9.4K
Always handle potential null/None values defensively by: 1. Using `.get()` for dictionary access instead of direct ke…
Null Handling
Share
Design stable APIs
7
⭐ 5.8K
When creating or modifying APIs, carefully consider what becomes part of your public API surface to ensure backward c…
API
Share
Check before dereferencing
7
⭐ 5.8K
Always verify objects are not null before dereferencing them, particularly when using methods that might return null …
Null Handling
Share
Defensive null checking
7
⭐ 7.6K
Always perform explicit null/undefined checks before accessing properties or using values that could be null or undef…
Null Handling
Share
Prefer Rust structural patterns
6
⭐ 62.1K
Use Rust’s structural patterns to write more idiomatic and maintainable code. This includes:
1. Use early returns to…
Code Style
Share
Consider algorithmic complexity
6
⭐ 62.1K
When implementing algorithms, be mindful of their computational complexity and choose appropriate data structures for…
Algorithms
Share
Use self-documenting names
6
⭐ 51.7K
Variable, function, and parameter names should accurately reflect their purpose, behavior, and content. Choosing desc…
Naming Conventions
Share
Stable documentation links
6
⭐ 51.7K
Ensure all documentation links are stable, consistent, and correctly targeted to improve navigation and long-term mai…
Documentation
Share
Process configurations consistently
6
⭐ 51.7K
Ensure that configuration data is processed consistently and correctly throughout the codebase. This includes:
1. **…
Configurations
Share
Optimize data structures
6
⭐ 19.8K
Choose and implement data structures with careful consideration of algorithmic complexity, memory usage, and Go’s spe…
Algorithms
Share
Extract shared code patterns
6
⭐ 19.8K
Identify and extract repeated code patterns into reusable functions to improve maintainability and reduce duplication…
Code Style
Share
Ensure documentation accuracy
6
⭐ 74K
Documentation must precisely reflect the current codebase implementation. When documenting features, options, or APIs…
Documentation
Share
Make errors user actionable
6
⭐ 60.3K
Error messages should provide clear, actionable information that helps users understand and resolve the problem. Each…
Error Handling
Share
Know your implicit configurations
6
⭐ 28.1K
When working with Turborepo, be aware of implicit configurations and special files that affect behavior even when not…
Configurations
Share
Eliminate code duplication
6
⭐ 28.1K
Avoid duplicating logic, patterns, or data across the codebase. When similar code appears in multiple places, extract…
Code Style
Share
Use Option methods idiomatically
6
⭐ 29K
When dealing with Optional values, prefer Rust’s built-in Option methods over manual null checks. This makes code mor…
Null Handling
Share
Structural configuration approaches
6
⭐ 29K
When working with feature flags and conditional compilation, prefer structural approaches over scattered configuratio…
Configurations
Share
Prefer explicit over concise
6
⭐ 29K
Choose explicit and unambiguous names over concise but unclear ones. When a method, type, or variable has a specific …
Naming Conventions
Share
Organize code logically
6
⭐ 29K
Group related code elements together with a consistent and logical structure. Place stable fields and functionality f…
Code Style
Share
Optimize memory allocation
6
⭐ 29K
Be deliberate about memory allocation patterns to improve performance. Implement these practices:
1. **Pre-allocate …
Performance Optimization
Share
Network API design consistency
6
⭐ 29K
When designing networking APIs, maintain consistency with existing interfaces while ensuring proper cross-platform co…
Networking
Share
Follow import style
6
⭐ 29K
Tokio projects follow specific import conventions for consistency and readability. Adhere to these guidelines:
1. Us…
Code Style
Share
Flexible consistent API patterns
6
⭐ 29K
Design APIs with flexibility and consistency by leveraging established patterns and avoiding unnecessary constraints….
API
Share
Design error handling carefully
6
⭐ 29K
When implementing error handling, balance between propagation and recovery. Design error types to preserve context wh…
Error Handling
Share
Simplify for readability
6
⭐ 9.9K
Prioritize code readability by using simpler and more direct expressions. When possible, return values directly inste…
Code Style
Share
Descriptive purpose-driven naming
6
⭐ 45.5K
Choose identifiers that accurately describe their purpose and behavior, not just their type or how they’re used. Name…
Naming Conventions
Share
Contextual null checks
6
⭐ 45.5K
Use type-appropriate null checking strategies based on the context of your data. For primitive values, ensure they ex…
Null Handling
Share
Choose efficient implementations
6
⭐ 190.6K
When implementing algorithms, prioritize both correctness and performance by selecting appropriate data structures, o…
Algorithms
Share
Use appropriate collections
spring-projects/spring-framework
6
⭐ 58.4K
Choose the right collection implementation for each algorithmic task to optimize both performance and readability. Us…
Algorithms
Share
Meaningful exception design
6
⭐ 77.6K
Design exceptions to provide clear context, preserve stack traces, and propagate correctly through your system. Key p…
Error Handling
Share
Documentation clarity principles
6
⭐ 77.6K
When writing technical documentation, adhere to these core principles to ensure clarity and effectiveness:
1. **Use …
Documentation
Share
Document configuration properties completely
6
⭐ 77.6K
Configuration properties should be fully documented with clear descriptions, explicit default values, and proper meta…
Configurations
Share
Concrete bean return types
6
⭐ 77.6K
When defining `@Bean` methods in Spring configurations, use concrete return types rather than interfaces while using …
Spring
Share
Alphabetical ordering requirement
6
⭐ 77.6K
Always maintain alphabetical ordering for lists of elements including dependencies, modules, configuration entries, a…
Code Style
Share
Use descriptive identifiers
6
⭐ 41.3K
Choose variable, parameter, field, and class names that clearly communicate their purpose and context. Favor specific…
Naming Conventions
Share
Structure logs with context
6
⭐ 41.3K
Use structured logging with appropriate context and log levels to maximize the value of log messages. Include relevan…
Logging
Share
Explicit null handling
6
⭐ 1.9K
Always be explicit and consistent when handling null values to improve code clarity and prevent subtle bugs. This app…
Null Handling
Share
Feature flag rollouts
6
⭐ 41.3K
Use feature flags to gate new functionality for controlled rollouts. This allows for quick enabling/disabling without…
Configurations
Share
Optimize common paths
6
⭐ 16.6K
Design algorithms that optimize for the most common execution paths by prioritizing frequent scenarios in conditional…
Algorithms
Share
Model actual hardware costs
6
⭐ 16.6K
Base optimization decisions on accurate hardware cost models rather than outdated assumptions. Modern architectures h…
Performance Optimization
Share
Document configuration intent
6
⭐ 16.6K
Configuration settings should be self-documenting with clear intent. When adding temporary workarounds, conditional f…
Configurations
Share
Handle nulls with Option
6
⭐ 40.6K
Use Rust’s Option type and its methods effectively to handle nullable values. This improves code clarity and safety b…
Null Handling
Share
Prefer simpler expressions
6
⭐ 57K
Always choose the simplest, most readable way to express your code logic. Unnecessary complexity makes code harder to…
Code Style
Share
Minimize unnecessary object allocations
6
⭐ 57K
Avoid creating unnecessary objects, especially in frequently executed code paths. This includes being mindful of impl…
Performance Optimization
Share
Minimize public API surface
6
⭐ 57K
Design APIs with a minimal public surface area by carefully controlling which methods and properties are exposed. Sta…
API
Share
Follow documentation conventions
6
⭐ 57K
Maintain consistent formatting and style in all documentation to improve readability and professionalism:
1. **Use p…
Documentation
Share
Document APIs clearly
6
⭐ 57K
When designing and documenting APIs, prioritize clarity and completeness through concrete examples and accurate param…
API
Share
Thread-safe state management
6
⭐ 14.7K
When managing state accessed by multiple threads, ensure thread safety through appropriate synchronization mechanisms…
Concurrency
Share
Graceful API evolution
6
⭐ 91.3K
When modifying, deprecating, or replacing APIs, ensure a smooth transition experience for developers by following the…
API
Share
Standardize dependency management
6
⭐ 24.4K
Maintain consistent dependency management practices across CI workflows to ensure reliable builds and tests. Use the …
CI/CD
Share
Maintain code consistency
6
⭐ 24.4K
Ensure code follows consistent patterns throughout the codebase, even when duplicating code is necessary. When simila…
Code Style
Share
Least privilege principle
6
⭐ 11.8K
Always follow the principle of least privilege by granting the minimum permissions necessary for functionality. This …
Security
Share
Optimize memory allocation patterns
6
⭐ 34.3K
Minimize memory allocations and optimize allocation patterns to improve performance. Key practices:
1. Pre-allocate …
Performance Optimization
Share
Names reveal clear intent
6
⭐ 34.3K
Choose names that clearly communicate intent and context, avoiding ambiguity or confusion. Variable and function name…
Naming Conventions
Share
Explicit null handling
6
⭐ 34.3K
Always be explicit and consistent about how null values are handled in operations and documentation. This clarity pre…
Null Handling
Share
Structure tests thoroughly
6
⭐ 25.9K
Create well-structured tests with thorough coverage of both expected success and error conditions. Name test cases de…
Testing
Share
Safe lock patterns
6
⭐ 25.9K
When implementing concurrent operations, ensure locks are acquired and released properly in all execution paths. Alwa…
Concurrency
Share
Reduce code nesting
6
⭐ 25.9K
Minimize nesting levels and complexity in your code to improve readability and maintainability. Use early returns ins…
Code Style
Share
Write purposeful comments
open-telemetry/opentelemetry-python
6
⭐ 2.1K
Comments should explain “why” and “how” rather than restating what is already obvious from the code. Focus on providi…
Documentation
Share
Sanitize observability data exports
open-telemetry/opentelemetry-python
6
⭐ 2.1K
When exporting observability data (metrics, traces, logs) to external systems, properly sanitize all data fields to e…
Observability
Share
Use OpenCV error mechanisms
6
⭐ 82.9K
Always use OpenCV’s built-in error handling mechanisms instead of C++ exceptions or custom error handling. This ensur…
Error Handling
Share
Prevent null vulnerabilities
6
⭐ 82.9K
Use container classes and smart pointers instead of manual memory allocation to prevent null pointer dereferences and…
Null Handling
Share
Cross-platform API design rules
6
⭐ 82.9K
Design public APIs to work seamlessly across different programming languages and platforms. Follow these key principl…
API
Share
Clear API contracts
6
⭐ 82.9K
Design APIs with clear contracts that behave exactly as their names and signatures suggest. Functions should do preci…
API
Share
Optimize with standard library
6
⭐ 145.7K
When implementing algorithms, prefer using Go’s standard library over custom implementations or external dependencies…
Algorithms
Share
Use nullable for optionals
6
⭐ 2.8K
When a property or parameter represents an optional value that might be absent in requests or responses, use nullable…
Null Handling
Share
Prefer clarity over cleverness
6
⭐ 112.2K
Write code that prioritizes readability and maintainability over cleverness or excessive optimization. Avoid overly c…
Code Style
Share
Handling Dynamic Content in Next.js Components
6
⭐ 133K
When implementing Next.js components that rely on dynamic content (e.g. random values, current time), it is crucial t…
Next.js
Share
Use null validation utilities
6
⭐ 34.2K
Consistently use utility methods like `ObjectUtil.checkNotNull()` or `Objects.requireNonNull()` to validate that para…
Null Handling
Share
Memory ordering needs barriers
6
⭐ 34.2K
Ensure proper memory ordering in concurrent code by using appropriate memory barriers and atomic operations based on …
Concurrency
Share
Structure behavior-driven tests properly
6
⭐ 71.8K
Organize tests using behavior-driven development (BDD) patterns to improve clarity and maintainability. Group related…
Testing
Share
Follow protocol standards
6
⭐ 71.8K
When implementing networking features, strictly adhere to protocol specifications and standards to ensure proper inte…
Networking
Share
Optimize cargo dependencies
6
⭐ 19K
Maintain clean and efficient dependency configurations in Cargo.toml files by following these practices:
1. **Use wo…
Configurations
Share
Minimize unnecessary allocations
6
⭐ 19K
Avoid allocations and cloning when they don’t provide sufficient benefit relative to their performance cost. Balance …
Performance Optimization
Share
Log level appropriately
6
⭐ 19K
Select the appropriate log level based on operational significance and ensure messages are clear, accurate, and forma…
Logging
Share
Keep files focused small
6
⭐ 19K
Maintain code organization by keeping files focused on a single responsibility and splitting large files into smaller…
Code Style
Share
Optimize iteration patterns
6
⭐ 20.8K
When iterating through collections, choose the most efficient iteration pattern based on what information you actuall…
Algorithms
Share
Use theme utilities consistently
6
⭐ 96.1K
Always use theme utilities for consistent styling across the application instead of hard-coded values. Replace direct…
Code Style
Share
Meaningful and consistent names
6
⭐ 96.1K
Use descriptive, accurate identifiers that follow established conventions and maintain consistency throughout your co…
Naming Conventions
Share
Handle errors by severity
6
⭐ 1.4K
Choose error handling mechanisms based on error severity and recoverability:
1. Use throws for unrecoverable errors …
Error Handling
Share
Consistent API practices
6
⭐ 1.4K
Maintain consistency in API design, documentation, and implementation across all supported platforms to improve devel…
API
Share
Preserve error handling context
6
⭐ 13.6K
Always preserve error context by using specific error types, safe error handling patterns, and meaningful error messa…
Error Handling
Share
Maintain naming consistency
6
⭐ 13.6K
Use consistent and descriptive names for variables, components, and functions throughout the codebase. When the same …
Naming Conventions
Share
Hook and state correctness
6
⭐ 13.6K
Ensure React hooks and state updates follow best practices to prevent subtle bugs:
1. **Call hooks unconditionally**…
React
Share
Prefer nullish coalescing
6
⭐ 15K
When handling null or undefined values, use modern JavaScript patterns to write more robust and maintainable code:
1…
Null Handling
Share
Prefer descriptive errors
6
⭐ 50.9K
When handling errors in your code, always provide detailed context in error messages to aid debugging. Use Kotlin’s s…
Error Handling
Share
Wrap errors with context
6
⭐ 30.3K
Always wrap errors with meaningful context using fmt.Errorf and %w verb. Include relevant identifiers (filenames, IDs…
Error Handling
Share
Follow API conventions
6
⭐ 30.3K
Design APIs following modern conventions and best practices to improve usability, maintainability, and consistency ac…
API
Share
Choose optimal data structures
6
⭐ 30.3K
Select data structures based on specific access patterns and performance requirements. When both fast lookup and pred…
Algorithms
Share
Minimize redundant operations
6
⭐ 8.3K
Optimize application performance by preventing unnecessary renders, calculations, and network operations. Implement p…
Performance Optimization
Share
Handle nulls with types
6
⭐ 8.3K
Enforce type safety by properly handling null and undefined values through TypeScript types and explicit checks. Avoi…
Null Handling
Share
Enforce atomic database operations
6
⭐ 8.3K
Replace check-then-act patterns with atomic database operations to prevent race conditions in concurrent environments…
Concurrency
Share
Explicit null validation
6
⭐ 68.8K
Always validate objects for null/nil before accessing their properties, and establish consistent patterns for handlin…
Null Handling
Share
Descriptive semantic names
6
⭐ 68.8K
Always use descriptive variable, parameter, function, and constant names that clearly convey their purpose and behavi…
Naming Conventions
Share
Document code behavior
6
⭐ 83K
Document the “why” and “how” of your code, not just what it does. Add clear comments to explain:
1. Non-obvious beha…
Documentation
Share
Robust SSH integration
6
⭐ 32.9K
When implementing SSH integration in your application, follow these practices to ensure reliability across different …
Networking
Share
Document configs comprehensively
6
⭐ 32.9K
Configuration options must be documented comprehensively with:
1. Clear, descriptive name using appropriate platform…
Configurations
Share
Organize code logically
6
⭐ 95.9K
Maintain a clean and logical code structure by properly organizing code according to its functionality and purpose:
…
Code Style
Share
Name indicates clear purpose
6
⭐ 33.8K
Names should clearly indicate their purpose, type, and behavior. This applies to methods, variables, and parameters. …
Naming Conventions
Share
Cache expensive operations
6
⭐ 33.8K
Identify and cache results of expensive operations that may be called repeatedly during a request lifecycle, especial…
Performance Optimization
Share
Consistent test code style
6
⭐ 34K
Maintain consistent and clear testing patterns by following these guidelines: use strict equality assertions, prefer …
Code Style
Share
Concurrent operations completion management
6
⭐ 34K
When running concurrent operations in tests, ensure all operations complete before concluding the test. Race conditio…
Concurrency
Share
Use configuration access methods
6
⭐ 73.1K
When accessing configuration settings, always use the appropriate type-safe accessor methods provided by the configur…
Configurations
Share
Robust test assertions
6
⭐ 73.1K
Use precise, informative assertions in tests to provide clear feedback when tests fail and verify the correct behavio…
Testing
Share
Prefer callbacks over blocking
6
⭐ 73.1K
Always structure concurrent code to use asynchronous callbacks instead of blocking operations. Blocking calls like Co…
Concurrency
Share
Measure before optimizing performance
6
⭐ 73.1K
Before implementing performance optimizations, measure and validate the impact through benchmarks. This applies espec…
Performance Optimization
Share
Write focused efficient tests
6
⭐ 84.2K
Tests should be focused, efficient and meaningful. Follow these guidelines:
1. Avoid testing implementation details …
Testing
Share
Use connection by alias
6
⭐ 84.2K
When working with database operations in Django projects that might use multiple database backends, always access dat…
Database
Share
Validate and document nulls
6
⭐ 14K
Always handle null values explicitly and consistently throughout your codebase to prevent null pointer exceptions. Fo…
Null Handling
Share
Structure errors with intent
6
⭐ 33.9K
Implement error handling with clear intent and proper propagation. Follow these principles:
1. Use structured try/ca…
Error Handling
Share
Write comprehensive test cases
6
⭐ 50.8K
Tests should thoroughly cover all code paths and edge cases. Each test case should: 1. Test distinct scenarios in sep…
Testing
Share
Strict props event handling
6
⭐ 50.8K
Enforce strict typing and consistent handling of component props and events to ensure type safety, runtime validation…
Vue
Share
Evolve APIs gracefully
6
⭐ 50.8K
When modifying or extending APIs, prioritize backward compatibility while providing clear migration paths for future …
API
Share
Choose semantic descriptive names
6
⭐ 50.8K
Names should be clear, descriptive and follow consistent patterns. Choose names that accurately reflect the purpose a…
Naming Conventions
Share
Avoid redundant computations
6
⭐ 50.8K
Identify and eliminate redundant operations that cause performance bottlenecks by caching expensive function results,…
Performance Optimization
Share
Never commit secrets
6
⭐ 7.9K
Private cryptographic keys, certificates with private keys, and other secrets must never be committed to source code …
Security
Share
Memoize expensive operations
6
⭐ 7.9K
Cache results of expensive operations, especially shell commands and external queries, to avoid redundant executions….
Performance Optimization
Share
Keep actions versions current
6
⭐ 7.9K
Always use the latest stable versions of GitHub Actions components in CI/CD workflows to avoid deprecated features, s…
CI/CD
Share
Externalize configuration values
6
⭐ 7.9K
Avoid hardcoding configuration values directly in scripts, especially for values that might change between environmen…
Configurations
Share
Choose semantic algorithms
6
⭐ 7.9K
Select algorithms and data operations that match the semantic intent of your code rather than using convenient but po…
Algorithms
Share
Document configuration consistently
6
⭐ 7.7K
Ensure all configuration options are clearly documented and follow consistent naming and syntax conventions. This inc…
Configurations
Share
Check exceptions consistently
6
⭐ 79.1K
Always check for exceptions immediately after operations that might throw them, especially before using the results i…
Error Handling
Share
Minimize unnecessary operations
6
⭐ 44.2K
Optimize performance by eliminating redundant operations and arranging code to avoid unnecessary computations, especi…
Performance Optimization
Share
Follow established naming patterns
6
⭐ 44.2K
Names should be descriptive and consistent with existing patterns in the codebase. This applies to methods, variables…
Naming Conventions
Share
Clear error recovery paths
6
⭐ 44.2K
Implement error handling that provides both clear recovery paths for users and graceful degradation for the system. T…
Error Handling
Share
Clear code examples
6
⭐ 44.2K
Documentation should include clear, actionable code examples that users can reliably follow. Avoid using ambiguous pl…
Documentation
Share
Comprehensive API documentation
6
⭐ 9.4K
Always provide comprehensive API documentation that includes accurate examples, complete parameter descriptions, and …
Documentation
Share
Use domain-specific type names
6
⭐ 5.8K
Types should be named with clear domain context rather than generic terms. Avoid single-word or overly generic names …
Naming Conventions
Share
Minimize memory allocations
6
⭐ 5.8K
Reduce garbage collection pressure and improve application performance by avoiding unnecessary memory allocations. Th…
Performance Optimization
Share
Document code reasoning
6
⭐ 5.8K
Add clear, concise comments that explain the “why” behind complex logic, non-obvious decisions, and implicit behavior…
Documentation
Share
Prefer simpler code constructs
6
⭐ 22.1K
Always opt for simpler, more idiomatic code constructs over complex or verbose alternatives. This includes using buil…
Code Style
Share
Semantic naming conventions
6
⭐ 7.6K
Use descriptive, semantic names for all code elements that clearly indicate their purpose and behavior. Follow consis…
Naming Conventions
Share
Early return after errors
6
⭐ 7.6K
When handling errors in asynchronous functions, always return immediately after invoking a callback with an error to …
Error Handling
Share
Document APIs thoroughly
6
⭐ 7.6K
All public API elements must be thoroughly documented with JSDoc annotations that clearly explain their purpose, para…
Documentation
Share
Validate user-controlled paths
6
⭐ 40.9K
Always validate and sanitize user-provided inputs used in file path operations to prevent path traversal attacks. Pat…
Security
Share
Standardize API parameter handling
6
⭐ 40.9K
Use consistent parameter handling patterns across API endpoints to ensure maintainability and predictable behavior. F…
API
Share
Avoid code duplication
6
⭐ 40.9K
Extract repeated code patterns into reusable functions, variables, or constants to improve maintainability and reduce…
Code Style
Share
Verify AI model capabilities
6
⭐ 15.6K
Always verify and accurately document AI model capabilities, supported formats, and limitations before implementation…
AI
Share
Type-safe null handling
6
⭐ 15.6K
Use TypeScript’s type system and modern JavaScript features to prevent null reference errors.
**TypeScript type saf…
Null Handling
Share
Keep tests simple
6
⭐ 15.6K
Tests should be straightforward, explicit, and free from complex logic or indirection. Avoid “magic” in tests that ma…
Testing
Share
Use structured model metadata
5
⭐ 62.1K
Represent AI model information using structured data rather than hardcoded enumerations or conditionals. Store capabi…
AI
Share
Scope dependencies appropriately
5
⭐ 62.1K
Configure dependencies with their minimum necessary scope to maintain clean architecture and improve build times. Key…
Configurations
Share
Document configuration constraints clearly
5
⭐ 62.1K
When defining configuration options, always clearly document parameter constraints, valid ranges, and behaviors. For …
Configurations
Share
Choose domain-specific semantic names
5
⭐ 62.1K
Names should clearly reflect their domain-specific meaning and purpose, avoiding generic or ambiguous terms. This app…
Naming Conventions
Share
Validate algorithmic operations carefully
5
⭐ 51.7K
Mathematical and logical operations require careful validation to ensure correctness. Common issues include:
1. Oper…
Algorithms
Share
Remove unnecessary code elements
5
⭐ 51.7K
Keep code clean and maintainable by removing unnecessary elements that add complexity without value:
1. Remove unuse…
Code Style
Share
Preserve API compatibility
5
⭐ 51.7K
When modifying API interfaces, parameters, or argument behavior, ensure backward compatibility is maintained to preve…
API
Share
Optimize memory allocation
5
⭐ 19.8K
Always allocate data structures with appropriate initial capacity and use memory-efficient data types to reduce memor…
Performance Optimization
Share
Runtime-agnostic API design
5
⭐ 74K
When designing APIs for systems that support multiple JavaScript runtimes, prioritize decoupling server state from us…
API
Share
Propagate errors with context
5
⭐ 74K
Always propagate errors with proper context and recovery strategy. Use try-catch blocks for both synchronous and asyn…
Error Handling
Share
Environment variable management
5
⭐ 74K
When working with environment variables in Vite applications, be explicit about variable loading behavior and precede…
Configurations
Share
Secure configuration defaults
5
⭐ 60.3K
Establish secure default configurations in project metadata files to prevent accidental publishing and ensure proper …
Configurations
Share
Optimize CI/CD commands
5
⭐ 60.3K
Design CI/CD workflows to be efficient, consistent, and purposeful across all environments. When writing or modifying…
CI/CD
Share
Environment variable best practices
5
⭐ 60.3K
When implementing environment variable configuration:
1. Follow standard environment variable conventions: - Use upp…
Configurations
Share
Meaningful consistent identifiers
5
⭐ 90.6K
Choose descriptive, semantically accurate names for variables, types, and components that clearly communicate their p…
Naming Conventions
Share
Validate performance impact first
5
⭐ 28.1K
Always validate performance changes through profiling or benchmarking before implementation, and favor memory-efficie…
Performance Optimization
Share
Design ergonomic APIs
5
⭐ 28.1K
Create APIs that are both easy to use correctly and hard to use incorrectly. Focus on:
1. **Use pattern matching for…
API
Share
Structure feature flags strategically
5
⭐ 29K
Design feature flags to minimize dependency bloat while maximizing flexibility for users. Each optional dependency sh…
Configurations
Share
Structure API doc blocks
5
⭐ 29K
Each public API documentation block should follow a consistent structure:
1. Start with a single-line summary that c…
Documentation
Share
Socket configuration guidance
5
⭐ 29K
When implementing networking APIs, always clearly document socket modes, configuration options, and platform-specific…
Networking
Share
Optimize hot paths
5
⭐ 29K
Identify and optimize frequently executed code paths to improve performance. Hot paths have a significant impact on o…
Performance Optimization
Share
Graceful error handling
5
⭐ 29K
Prioritize graceful error handling over panicking by providing fallbacks and propagating rich context. When operation…
Error Handling
Share
Fast deterministic tests
5
⭐ 29K
Avoid using real sleeps or delays in tests as they significantly slow down the test suite and can introduce flakiness…
Testing
Share
Design flexible APIs
5
⭐ 29K
When designing APIs, prioritize flexibility, ergonomics, and intuitiveness to create better user experiences. APIs sh…
API
Share
Minimize memory allocations
5
⭐ 9.9K
Avoid unnecessary memory allocations to improve performance. Each allocation has both CPU and memory overhead that ca…
Performance Optimization
Share
Handle nullable types idiomatically
5
⭐ 9.9K
Use Rust’s idiomatic patterns when working with Option and Result types to prevent panics and improve code clarity. …
Null Handling
Share
Use precise semantic names
5
⭐ 45.5K
Choose names that accurately reflect the purpose and semantics of the entity being named. Avoid overloaded or ambiguo…
Naming Conventions
Share
Prefer modern authentication
5
⭐ 45.5K
Always use modern identity-based authentication methods instead of static credentials when accessing external systems…
Security
Share
Include descriptive documentation
5
⭐ 45.5K
Provide complete, clear descriptions for all configuration elements in documentation. Every output, variable, argumen…
Documentation
Share
Document function behavior completely
5
⭐ 45.5K
Function and method documentation should accurately describe behavior, parameters, and any non-obvious aspects of the…
Documentation
Share
Consolidate related code
5
⭐ 45.5K
Organize code to keep related functionality together. When functions serve similar purposes or operate on the same da…
Code Style
Share
Validate quantization parameters carefully
5
⭐ 190.6K
When implementing quantized operations in ML models, thoroughly validate quantization parameters to ensure correctnes…
AI
Share
Validate before dereference
5
⭐ 190.6K
Always check that pointers, optional values, and results of type casts are valid before dereferencing or using them. …
Null Handling
Share
Optimize loop operations
5
⭐ 190.6K
Minimize expensive operations within inner loops to improve performance. Key practices include:
1. Extract loop-inva…
Performance Optimization
Share
Informative error messages
5
⭐ 190.6K
Error messages should be informative, actionable, and concise to help users quickly understand and fix issues. Follow…
Error Handling
Share
Handle dynamic shapes
5
⭐ 190.6K
When implementing tensor-based algorithms, avoid assumptions about fixed tensor shapes by not relying on direct shape…
Algorithms
Share
Teach by example
5
⭐ 6.1K
Present concepts through clear, focused examples that demonstrate features positively rather than through comparisons…
Documentation
Share
Respect annotation processing order
spring-projects/spring-framework
5
⭐ 58.4K
When designing Spring components, pay careful attention to the order in which annotations are processed, especially f…
Spring
Share
Design for API extension
spring-projects/spring-framework
5
⭐ 58.4K
When designing APIs, prioritize extensibility by providing clear extension points and avoiding direct exposure of imp…
API
Share
Cleanup error handling
spring-projects/spring-framework
5
⭐ 58.4K
When handling resources that require cleanup (like streams, connections, or transactions), ensure that errors during …
Error Handling
Share
API boundary null handling
spring-projects/spring-framework
5
⭐ 58.4K
Establish consistent null handling patterns at API boundaries to prevent null pointer exceptions and improve code cla…
Null Handling
Share
Property description conventions
5
⭐ 77.6K
When documenting configuration properties in Spring Boot applications, follow these conventions for clarity and consi…
Documentation
Share
Secure sensitive data
5
⭐ 41.3K
Always protect sensitive data through proper encryption, secure cookies, and careful exception handling to prevent in…
Security
Share
Remove unnecessary code elements
5
⭐ 41.3K
Keep code clean and maintainable by removing unnecessary elements. This includes:
1. Omit type annotations when Type…
Code Style
Share
Prevent N+1 database queries
5
⭐ 41.3K
Avoid N+1 database queries by using appropriate Django ORM features like select_related(), prefetch_related(), and bu…
Database
Share
Propagate errors with context
5
⭐ 1.9K
Always propagate errors appropriately by rethrowing caught exceptions and maintaining error context. Catch exceptions…
Error Handling
Share
Document API changes
5
⭐ 1.9K
When documenting API changes, particularly breaking changes, follow these practices to ensure clarity and ease of mig…
API
Share
Defensive null checking
5
⭐ 41.3K
Implement defensive null checking to prevent NoneType errors, KeyError, and IndexError exceptions. When accessing dic…
Null Handling
Share
Prevent null references
5
⭐ 16.6K
Use defensive coding practices to prevent null reference exceptions by properly handling potentially null values thro…
Null Handling
Share
Maintainable test structure
5
⭐ 16.6K
Write tests that are maintainable, self-documenting, and that promote good testing practices:
1. **Use proper assert…
Testing
Share
Document code meaningfully
5
⭐ 16.6K
Provide meaningful documentation that enhances code maintainability and understanding. Follow these practices:
1. **…
Documentation
Share
Cache expensive computations
5
⭐ 16.6K
Avoid recomputing expensive operations by caching results when they will be used multiple times. This applies to meth…
Performance Optimization
Share
Avoid busy waiting
5
⭐ 16.6K
When implementing concurrent code that waits for conditions to be met, avoid busy-wait loops that continuously consum…
Concurrency
Share
Abstract traversal patterns
5
⭐ 16.6K
When implementing algorithms that operate on complex data structures (trees, graphs, dominator structures), abstract …
Algorithms
Share
Use descriptive identifiers
5
⭐ 40.6K
Avoid abbreviations in variable, parameter, and method names to improve code readability and maintainability. Use des…
Naming Conventions
Share
Profile allocations before optimization
5
⭐ 40.6K
Before implementing data structures or algorithms, analyze allocation patterns and optimize for common cases. Key str…
Performance Optimization
Share
Document component behavior comprehensively
5
⭐ 40.6K
Documentation should clearly explain the purpose, behavior, and relationships between code components using accessibl…
Documentation
Share
Consider algorithmic complexity tradeoffs
5
⭐ 40.6K
When implementing algorithms or data structures, carefully evaluate the tradeoffs between computational complexity, m…
Algorithms
Share
Write complete API examples
5
⭐ 57K
Always provide complete, context-rich code examples in API documentation. Examples should show the full usage context…
Documentation
Share
Place configurations appropriately
5
⭐ 57K
Choose the right location and scope for your Rails configuration options to improve maintainability and clarity:
1. …
Configurations
Share
Initialize nil-prone variables
5
⭐ 57K
Always initialize variables that might be nil to appropriate default values to prevent unexpected behavior. For boole…
Null Handling
Share
Prefer Optional over nulls
5
⭐ 14.7K
Use Java’s Optional API instead of null checks to improve code readability, safety, and maintainability. When dealing…
Null Handling
Share
Optimize algorithmic operations
5
⭐ 14.7K
Before implementing or modifying algorithms, carefully evaluate data structure properties and operation costs. Always…
Algorithms
Share
Name for meaning first
5
⭐ 14.7K
Choose names that prioritize domain meaning and clarity over implementation details. This applies to methods, variabl…
Naming Conventions
Share
Document public APIs
5
⭐ 14.7K
All public APIs, interfaces, and methods should include comprehensive JavaDoc that clearly explains their purpose, pa…
Documentation
Share
Clear database configuration examples
5
⭐ 14.7K
Database configuration examples in documentation should be correct, minimal, and include proper context. Provide only…
Database
Share
Use higher-level iterations
5
⭐ 91.3K
When working with multiple sequences that need to be combined, prefer higher-level iteration abstractions over nested…
Algorithms
Share
Prevent null pollution
5
⭐ 91.3K
Design your code to minimize the unexpected introduction of None values into data structures and APIs. Use immutable …
Null Handling
Share
Handle errors specifically
5
⭐ 91.3K
Always be explicit and specific when handling errors rather than using catch-all approaches or implicit conventions. …
Error Handling
Share
Robust error messaging
5
⭐ 24.4K
Create clear, specific, and actionable error messages that help users understand and resolve issues, while implementi…
Error Handling
Share
Eliminate redundant computation
5
⭐ 24.4K
Identify and eliminate redundant or duplicate computation paths in your code, especially for expensive operations lik…
Algorithms
Share
Cache expensive computations
5
⭐ 24.4K
Implement strategic caching and memoization for expensive or frequently repeated computations to avoid redundant work…
Performance Optimization
Share
Secure authentication flows
5
⭐ 11.8K
Implement authentication flows that protect sensitive information and follow secure credential management practices: …
Security
Share
Safe attribute access patterns
5
⭐ 11.8K
Implement consistent patterns for safely accessing potentially null or undefined attributes and dictionary values. Th…
Null Handling
Share
Prioritize code readability
5
⭐ 11.8K
Write code that optimizes for human readability and understanding. Complex expressions, while technically correct, ca…
Code Style
Share
Consistent naming patterns
5
⭐ 11.8K
Follow systematic naming conventions for types, interfaces, and functions to enhance code readability and navigabilit…
Naming Conventions
Share
Hide implementation details
5
⭐ 34.3K
Design public APIs to hide implementation details and focus on the user’s mental model of the system. Avoid exposing …
API
Share
Explicit configuration precedence
5
⭐ 34.3K
Implement a clear configuration resolution chain that follows a consistent precedence pattern: explicit parameters fi…
Configurations
Share
Evaluate algorithmic complexity tradeoffs
5
⭐ 34.3K
When implementing algorithms, carefully evaluate tradeoffs between performance optimizations and code maintainability…
Algorithms
Share
Document with examples
5
⭐ 25.9K
Always include clear, contextual examples when documenting APIs, interfaces, or command-line functionality. Examples …
API
Share
Defensive null handling
5
⭐ 25.9K
Always initialize data structures before use, particularly before accessing them in loops or conditional blocks. Chec…
Null Handling
Share
Clear concise documentation
5
⭐ 25.9K
Write documentation that is direct, consistent, and appropriately detailed. Follow these principles:
1. **Use direct…
Documentation
Share
Optimize configuration structure
open-telemetry/opentelemetry-python
5
⭐ 2.1K
Structure configuration files like tox.ini to maximize maintainability and efficiency. Use factor prefixes (e.g., “te…
Configurations
Share
Handle exceptions appropriately
open-telemetry/opentelemetry-python
5
⭐ 2.1K
When implementing error handling logic, be deliberate about which exception types you catch and where you handle them…
Error Handling
Share
Follow Python naming conventions
open-telemetry/opentelemetry-python
5
⭐ 2.1K
Use consistent Python naming conventions to improve code readability and maintainability:
1. Use snake_case for func…
Naming Conventions
Share
Configuration source precedence
open-telemetry/opentelemetry-python
5
⭐ 2.1K
Define and document a clear precedence order when configurations come from multiple sources (code parameters, environ…
Configurations
Share
Optimize memory allocation patterns
5
⭐ 82.9K
Prefer efficient memory allocation patterns to improve performance. Key practices:
1. Use RAII containers (like Mat)…
Performance Optimization
Share
Optimize container access
5
⭐ 82.9K
Choose efficient container types and optimize access patterns in performance-critical code. Avoid operations that cau…
Performance Optimization
Share
Maintain code consistency
5
⭐ 82.9K
Keep code clean and consistent with established project conventions. This includes:
1. Follow existing formatting st…
Code Style
Share
Guard optional dependencies
5
⭐ 82.9K
Configuration management requires careful handling of optional dependencies in both build scripts and source code. Al…
Configurations
Share
Use idiomatic Go flow
5
⭐ 145.7K
Follow Go’s idiomatic control flow patterns to improve code readability and maintainability. Key practices include:
…
Code Style
Share
Use environment variables
5
⭐ 145.7K
Use environment variables instead of hardcoding configuration values such as file paths, port numbers, or system-spec…
Configurations
Share
Guard against nil
5
⭐ 145.7K
Always check for nil values and successful type assertions before accessing or dereferencing objects, especially when…
Null Handling
Share
Document synchronization intent
5
⭐ 145.7K
Always clearly document the purpose and scope of synchronization primitives (mutexes, read-write locks) by:
1. Placi…
Concurrency
Share
Comprehensive test coverage
5
⭐ 145.7K
Test functions should provide comprehensive coverage of both expected and edge cases. Include tests for:
1. **Bounda…
Testing
Share
Clear recoverable error messages
5
⭐ 145.7K
Error messages should be clear, actionable, and indicate whether recovery is possible. When designing error handling:…
Error Handling
Share
Abstract model operations cleanly
5
⭐ 145.7K
When implementing AI model operations, create clean abstractions through interfaces that separate core mathematical o…
AI
Share
Design intuitive API methods
5
⭐ 2.8K
When designing API methods, prioritize intuitive usage patterns and backwards compatibility. Follow these guidelines:…
API
Share
Use modern C++ features
5
⭐ 112.2K
Embrace modern C++20 features throughout the codebase to improve code readability, maintainability, and performance. …
Code Style
Share
Thread-safe resource management patterns
5
⭐ 112.2K
Ensure thread-safe access to shared resources while following proper resource management patterns. When implementing …
Concurrency
Share
Standardize null pointer checks
5
⭐ 112.2K
Always use standard null-checking patterns like CHECK_NOT_NULL for pointer validation instead of manual null checks. …
Null Handling
Share
Propagate errors with context
5
⭐ 112.2K
Always propagate errors with their original context instead of swallowing them or throwing new errors that hide the o…
Error Handling
Share
Minimize configuration dependencies
5
⭐ 112.2K
Keep configuration dependencies minimal and platform-aware. Avoid including unnecessary configuration files or extern…
Configurations
Share
Follow consistent naming patterns
5
⭐ 112.2K
Maintain consistent naming conventions throughout the codebase to improve readability and reduce confusion. Adhere to…
Naming Conventions
Share
Document with precise accuracy
5
⭐ 112.2K
Maintain precise and accurate documentation through both JSDoc annotations and explanatory comments. Ensure all techn…
Documentation
Share
Behavior-focused test design
5
⭐ 112.2K
Tests should focus on verifying behavior rather than implementation details to ensure they remain robust during refac…
Testing
Share
Write robust assertions
5
⭐ 133K
When writing tests, ensure assertions can handle non-deterministic content while providing clear failure context: use…
Testing
Share
Optimize Next.js Resource Utilization
5
⭐ 133K
As a code reviewer, I recommend the following practices to optimize resource utilization when implementing Next.js ap…
Next.js
Share
Release resources consistently
5
⭐ 34.2K
Always ensure resources are properly released, especially in exception paths. Use try-finally blocks to guarantee cle…
Error Handling
Share
Use consistent curly braces
5
⭐ 71.8K
Always use curly braces for conditional statements and loops, even for single-line bodies. This maintains consistency…
Code Style
Share
Strategic dependency configuration
5
⭐ 71.8K
Configure dependencies in package.json strategically based on how they’re used in your project:
1. **Direct dependen…
Configurations
Share
Standardize null safety patterns
5
⭐ 71.8K
Use modern JavaScript features and utility functions consistently for null/undefined checks. Prefer optional chaining…
Null Handling
Share
Preserve public API stability
5
⭐ 71.8K
When modifying or extending public interfaces, ensure changes maintain backward compatibility and follow proper versi…
API
Share
Preserve API interface stability
5
⭐ 71.8K
When modifying or extending public API interfaces, ensure backward compatibility and proper versioning. Follow these …
API
Share
Modern null safety patterns
5
⭐ 71.8K
Leverage modern JavaScript features and utility functions for safer null/undefined handling. This reduces code verbos…
Null Handling
Share
Avoid testing anti-patterns
5
⭐ 71.8K
Ensure your tests actually validate functionality by avoiding common testing anti-patterns:
1. **Don’t mock what you…
Testing
Share
Use descriptive identifiers
5
⭐ 19K
Choose clear, meaningful names for variables, parameters, and constants that convey their purpose without requiring a…
Naming Conventions
Share
Stage configuration changes gradually
5
⭐ 19K
When introducing configuration changes that affect multiple system components, implement them in stages to ensure smo…
Configurations
Share
Hierarchical semantic naming
5
⭐ 19K
Use hierarchical prefixes and clear descriptive names to indicate the domain, source, and purpose of code elements. T…
Naming Conventions
Share
Flexible documented configurations
5
⭐ 19K
Create configuration interfaces that are flexible, well-documented, and future-proof. When designing configuration pa…
Configurations
Share
Document concurrency design decisions
5
⭐ 19K
Always document key concurrency design decisions in code, including: 1. Locking protocols and ordering between multip…
Concurrency
Share
Design metrics for insights
5
⭐ 19K
Design metrics that provide actionable insights while maintaining system efficiency. Follow these key principles:
1….
Observability
Share
Comprehensive code documentation
5
⭐ 19K
Properly document code with clear, accurate, and useful comments using the correct syntax based on context:
1. Use `…
Documentation
Share
Use intent-revealing names
5
⭐ 20.8K
Choose names that clearly reveal the purpose, behavior, or type of the code elements they represent. A good name shou…
Naming Conventions
Share
Hybridization compatible operations
5
⭐ 20.8K
When implementing neural network models that will be hybridized for performance optimization, use operations that are…
AI
Share
Explain optimization mechanisms
5
⭐ 20.8K
When implementing or documenting performance optimizations, clearly explain the mechanism and expected performance be…
Performance Optimization
Share
Document all parameters
5
⭐ 20.8K
Always provide complete and accurate documentation for all function parameters, especially when adding new ones. Each…
Documentation
Share
Configure CSS layers
5
⭐ 96.1K
When integrating Material UI with other styling solutions like Tailwind CSS v4, proper configuration of CSS layers is…
Configurations
Share
Structure documentation effectively
5
⭐ 1.4K
Documentation should prioritize clear organization with a logical flow to help developers find information quickly. A…
Documentation
Share
Self-documenting code naming
5
⭐ 1.4K
Method, parameter, and variable names should clearly describe their purpose and behavior, making code self-documentin…
Naming Conventions
Share
Prefer safe null handling
5
⭐ 1.4K
Use explicit, safe practices when dealing with potentially null resources to prevent memory leaks and undefined behav…
Null Handling
Share
Document public API completely
5
⭐ 1.4K
All public APIs (files in `include/`) must have comprehensive documentation using either Doxygen-style or triple-slas…
Documentation
Share
Validate all inputs
5
⭐ 13.6K
All user-controlled inputs must be validated and sanitized before use to prevent injection attacks, unauthorized acce…
Security
Share
Use structured logging framework
5
⭐ 13.6K
Replace all console.* calls with an appropriate structured logging framework using proper log levels. This ensures co…
Logging
Share
Memoize computed values
5
⭐ 13.6K
Cache the results of expensive operations and component renders to avoid redundant calculations during re-renders. Th…
Performance Optimization
Share
Ensure deterministic query results
5
⭐ 13.6K
Always ensure database queries produce deterministic results by including explicit ORDER BY clauses when using LIMIT …
Database
Share
Avoid array mutations
5
⭐ 13.6K
Always clone arrays before performing operations that would mutate the original array, especially when working with c…
Code Style
Share
Validate untrusted input
5
⭐ 15K
Always validate and sanitize user-provided inputs before using them in sensitive contexts like SQL queries, file path…
Security
Share
Throw meaningful errors
5
⭐ 15K
Always throw specific, actionable errors instead of returning unexpected values or simply logging issues. Error messa…
Error Handling
Share
Optimize model token usage
5
⭐ 15K
Implement token-efficient patterns when working with AI models to optimize costs and performance. Key practices inclu…
AI
Share
Follow documentation standards
5
⭐ 15K
Ensure all documentation follows established templates and includes required sections. When referencing components, a…
Documentation
Share
Use modern JavaScript idioms
5
⭐ 15.1K
Favor modern JavaScript syntax and clean code practices to improve readability and maintainability. This includes:
1…
Code Style
Share
Structured documentation with examples
5
⭐ 15.1K
Create comprehensive documentation with clear structure and practical examples. Documentation should include:
1. **S…
Documentation
Share
Standardize makefile patterns
5
⭐ 15.1K
Maintain consistent Makefile patterns across all components to improve build reliability and developer experience in …
CI/CD
Share
Environment variable management
5
⭐ 15.1K
Manage environment variables in Docker configurations with appropriate scope, placement, and documentation:
1. **Set…
Configurations
Share
Centralize configuration values
5
⭐ 15.1K
Store all configuration values in dedicated configuration files rather than hardcoding them throughout the applicatio…
Configurations
Share
Consider operation time complexity
5
⭐ 50.9K
When implementing operations that manipulate collections or perform repeated actions, carefully consider the time com…
Algorithms
Share
Structured logging best practices
5
⭐ 30.3K
Use structured logging with appropriate field types and context to make logs more useful for troubleshooting. Choose …
Logging
Share
Stable schema identifiers
5
⭐ 30.3K
Use persistent identifiers for schema elements rather than relying on positional information or enumeration, which ca…
Database
Share
Prefer explicit nullability
5
⭐ 30.3K
Always make nullable states explicit in your code by leveraging Rust’s type system. Use `Option` rather than senti…
Null Handling
Share
Manage complete cache lifecycle
5
⭐ 30.3K
Implement comprehensive cache lifecycle management focusing on three key aspects:
1. Idempotent Creation: Make cache…
Caching
Share
Maintain code readability
5
⭐ 30.3K
Ensure code remains readable and maintainable by following these practices:
1. **Combine case statements with identi…
Code Style
Share
Handle errors by criticality
5
⭐ 30.3K
Choose error handling strategies based on operation criticality:
1. For critical operations that could corrupt data …
Error Handling
Share
Descriptive semantic naming
5
⭐ 30.3K
Create identifiers that clearly convey meaning through descriptive names and appropriate types. Two key practices imp…
Naming Conventions
Share
Clear configuration parameters
5
⭐ 30.3K
Configuration parameters should be descriptively named, well documented, and have sensible defaults that are visible …
Configurations
Share
Transactional verified migrations
5
⭐ 8.3K
Enhance database migration reliability by wrapping changes in transactions with pre-check and post-verification steps…
Migrations
Share
Time precision matters
5
⭐ 8.3K
When implementing algorithms involving date and time calculations, maintain precise control over time components to a…
Algorithms
Share
Prevent async race conditions
5
⭐ 8.3K
Always guard against race conditions when working with asynchronous code. Implement these patterns to avoid unpredict…
Concurrency
Share
Names reflect semantic purpose
5
⭐ 8.3K
Choose names that reflect the semantic purpose rather than implementation details or temporal characteristics. Names …
Naming Conventions
Share
Standardize observability semantic conventions
5
⭐ 68.8K
When implementing observability features (logs, metrics, traces), use consistent semantic conventions to ensure data …
Observability
Share
Proper shell quoting
5
⭐ 68.8K
Always use proper quoting in shell scripts (especially GitHub Actions workflows) to prevent word splitting, globbing,…
Code Style
Share
Function design principles
5
⭐ 68.8K
Design functions for maximum reusability, clarity, and maintainability. Follow these principles:
1. **Pass complete …
Code Style
Share
Close resources with errors
5
⭐ 68.8K
Always close resources (files, streams, connections) and properly handle their Close() errors. For read operations, C…
Error Handling
Share
Use if-unwrap with optionals
5
⭐ 32.9K
Always use Zig’s if-unwrap pattern (`if (optional) |value| {…}`) when working with optional values instead of force…
Null Handling
Share
Handle errors completely
5
⭐ 95.9K
Always handle errors comprehensively by checking return values, implementing proper error propagation, and ensuring r…
Error Handling
Share
Connection lifecycle management
5
⭐ 95.9K
Implement comprehensive lifecycle management for network connections. Ensure proper initialization, authentication, m…
Networking
Share
Manage dependencies wisely
5
⭐ 33.8K
When configuring dependencies in composer.json files, follow these guidelines to ensure maintainable and reliable con…
Configurations
Share
Escape column names properly
5
⭐ 33.8K
Always use the appropriate wrapping/escaping mechanism when generating SQL to prevent syntax errors and SQL injection…
Database
Share
Design flexible APIs
5
⭐ 33.8K
When designing APIs, prioritize flexibility and developer experience by:
1. **Accept broader parameter types** - Use…
API
Share
Type-safe API designs
5
⭐ 34K
Design APIs with strong type safety to improve developer experience and catch errors at compile time. Avoid using any…
API
Share
Properly Handle Errors in Fastify Applications
5
⭐ 34K
When implementing error handling in Fastify applications, it is important to always throw instances of the Error clas…
Fastify
Share
Preserve error context
5
⭐ 34K
When handling errors, always ensure the original error context is preserved and properly surfaced. Error information …
Error Handling
Share
Null safe patterns
5
⭐ 34K
Use concise null checking patterns to prevent runtime errors and improve code readability when handling potentially u…
Null Handling
Share
Explicit Configuration Usage in Fastify
5
⭐ 34K
When using the Fastify framework in TypeScript, ensure that all configuration options are explicitly declared and pro…
Fastify
Share
Consistent JSDoc standards
5
⭐ 34K
Document all public APIs and significant internal functions with comprehensive JSDoc comments that include accurate d…
Documentation
Share
Adhere to Fastify Coding Conventions
5
⭐ 34K
When implementing code that uses the Fastify package in TypeScript, ensure the following conventions are followed: av…
Fastify
Share
Protocol-specific error handling
5
⭐ 86.9K
Handle errors and responses appropriately based on the network protocol being used. Different protocols have differen…
Networking
Share
Consistent code examples
5
⭐ 86.9K
Maintain consistent formatting and styling in code examples throughout your NestJS application documentation. This en…
NestJS
Share
REST principles first
5
⭐ 67.3K
When designing APIs with Express, prioritize proper REST principles and HTTP semantics over convenience. This ensures…
API
Share
Propagate errors properly
5
⭐ 67.3K
Always forward errors to the framework’s error handling pipeline instead of swallowing them or handling them inconsis…
Error Handling
Share
Handle streams properly
5
⭐ 67.3K
When transferring data over HTTP, properly implement streaming mechanisms to prevent memory exhaustion and potential …
Networking
Share
Ensure test completion
5
⭐ 67.3K
Tests must properly terminate by following appropriate asynchronous patterns. For asynchronous tests, always invoke t…
Testing
Share
Prevent redundant operations
5
⭐ 73.1K
In distributed database systems, prevent redundant operations that can overload cluster resources. When implementing …
Database
Share
Version annotation in docs
5
⭐ 84.2K
Always include appropriate version annotations when documenting new features or changes in behavior. Use `.. versiona…
Documentation
Share
Use semantic HTML elements
5
⭐ 84.2K
Structure HTML templates using semantically appropriate elements rather than generic containers. Replace non-semantic…
Code Style
Share
Structure logs effectively
5
⭐ 84.2K
When implementing logging in your application, structure your log messages and parameters consistently to improve rea…
Logging
Share
Preserve error handling context
5
⭐ 84.2K
When handling exceptions, preserve the original error context and provide clear, actionable error messages. This help…
Error Handling
Share
Graceful API evolution
5
⭐ 84.2K
When evolving APIs, prioritize backward compatibility and provide clear migration paths. For any significant change: …
API
Share
Comments versus docstrings usage
5
⭐ 84.2K
Choose between comments and docstrings based on the documentation’s purpose and scope. Use docstrings for API-level d…
Documentation
Share
User-friendly documentation examples
5
⭐ 14K
Documentation should guide users toward best practices through clear examples. Begin with positive patterns before co…
Documentation
Share
Use logging best practices
5
⭐ 14K
Adopt these logging best practices to ensure consistent, efficient, and meaningful logs:
1. **Use Lombok’s `@Slf4j` …
Logging
Share
Numerical stability practices
5
⭐ 14K
When implementing machine learning algorithms, ensure numerical correctness and stability by following these practice…
AI
Share
Descriptive error context
5
⭐ 14K
Error messages should be specific, descriptive, and include context to help with debugging. Avoid generic messages li…
Error Handling
Share
Model-agnostic AI code
5
⭐ 33.9K
When building applications that interact with AI models, avoid hardcoding model-specific behavior and instead design …
AI
Share
Maintain consistent code style
5
⭐ 50.8K
Follow project-wide code style conventions to ensure consistency and readability. Key practices include:
1. Use cons…
Code Style
Share
Explicit nullish checks
5
⭐ 50.8K
When checking for the absence of values, use explicit nullish checks rather than relying on JavaScript’s falsy behavi…
Null Handling
Share
Secure credential management
5
⭐ 7.9K
When handling passwords, certificates, or keys in your code, implement secure encryption and storage mechanisms to pr…
Security
Share
Prefer guard clauses
5
⭐ 7.9K
Use guard clauses with early returns for null checking instead of wrapping code in conditional blocks. This improves …
Null Handling
Share
Explicit configuration over implicit
5
⭐ 7.9K
Always define explicit configuration defaults rather than relying on implicit behavior or autovivification. Configura…
Configurations
Share
Use appropriate logging levels
5
⭐ 7.7K
Select the correct logging level based on the importance and visibility requirements of the information. Choose WARNI…
Logging
Share
Thorough test assertions
5
⭐ 7.7K
Ensure tests thoroughly validate functionality through comprehensive assertions. When writing tests:
1. Assert all r…
Testing
Share
Strategic exception management
5
⭐ 7.7K
Choose the appropriate error handling strategy based on the context and severity of potential failures. Use exception…
Error Handling
Share
Strategic error handling
5
⭐ 7.7K
Choose appropriate error handling strategies based on the nature of the error and recovery potential:
1. **Raise exc…
Error Handling
Share
Document configuration options
5
⭐ 7.7K
Always provide comprehensive documentation for all configuration options, including environment variables, feature fl…
Configurations
Share
Choose optimal data structures
5
⭐ 7.7K
Select the most appropriate data structure based on the specific operations your algorithm needs to perform. This cho…
Algorithms
Share
Use memory pools
5
⭐ 79.1K
Reuse memory with buffer pools for temporary allocations instead of creating new buffers each time. This reduces memo…
Performance Optimization
Share
Network API compatibility
5
⭐ 79.1K
When implementing networking APIs that mirror Node.js functionality, ensure both behavior and error patterns match No…
Networking
Share
Match filenames to contents
5
⭐ 79.1K
Files should be named to clearly reflect their primary contents:
1. When a file contains a single primary type: -…
Naming Conventions
Share
Descriptive identifier names
5
⭐ 79.1K
Choose clear, consistent, and accurate identifiers that precisely reflect behavior and follow established patterns. T…
Naming Conventions
Share
Clean all error paths
5
⭐ 79.1K
Ensure all error paths properly clean up resources and handle errors appropriately. This includes:
1. Using errdefer…
Error Handling
Share
Simplify complex code blocks
5
⭐ 44.2K
Break down complex code blocks and expressions into simpler, more readable components. Complex boolean logic, nested …
Code Style
Share
Actions workflow best practices
5
⭐ 44.2K
Use GitHub Actions native features and follow best practices to create maintainable, secure, and reliable CI workflow…
CI/CD
Share
Write clear examples
5
⭐ 9.4K
Create comprehensive code examples in documentation that demonstrate common operations and use proper formatting. Use…
Documentation
Share
Consistent method interfaces
5
⭐ 9.4K
Design APIs with consistent method interfaces across related resources to improve usability and reduce learning curve…
API
Share
Configure proxies with schemes
5
⭐ 9.4K
When configuring proxies in AWS SDK clients, always include the complete URL scheme in proxy definitions. Match the s…
Networking
Share
Specific exceptions for clarity
5
⭐ 5.8K
Use specific exception types with meaningful error messages rather than generic exceptions to improve error handling,…
Error Handling
Share
Preserve API compatibility
5
⭐ 5.8K
When evolving APIs, maintain backward compatibility to prevent breaking changes for existing consumers.
Key approac…
API
Share
Maintain clean code structure
5
⭐ 5.8K
Keep code clean and well-organized by: 1. Removing unnecessary elements: - Delete commented-out code that is no lo…
Code Style
Share
Centralize configuration values
5
⭐ 5.8K
Configuration values should be defined once and referenced throughout your project to ensure consistency and simplify…
Configurations
Share
Prefer descriptive over brief
5
⭐ 22.1K
Choose clear, descriptive names over abbreviated or shortened versions. Names should be self-documenting and follow R…
Naming Conventions
Share
Documentation consistency standards
5
⭐ 22.1K
Maintain consistent documentation formatting standards across all project files, especially in changelogs, code examp…
Documentation
Share
Consistent axum Usage in TypeScript
5
⭐ 22.1K
When implementing TypeScript code that uses the axum package, maintain consistent and idiomatic usage: always use low…
Axum
Share
Type-safe API interfaces design
5
⭐ 107K
Design API interfaces with strong type safety while maintaining excellent developer experience. Prefer explicit types…
API
Share
Standardize null value checks
5
⭐ 107K
Always use consistent patterns and utility functions for handling null and undefined values. This improves code relia…
Null Handling
Share
Specific test assertions
5
⭐ 107K
When writing tests, explicitly assert specific conditions and expected values rather than relying on general success/…
Testing
Share
Proxy protocol handling
5
⭐ 107K
When implementing HTTP clients with proxy support, ensure the connection to the proxy uses the protocol specified in …
Networking
Share
Documentation reflects reality
5
⭐ 107K
Always ensure documentation accurately represents the actual code behavior and implementation details. Include import…
Documentation
Share
Consistent method behaviors
5
⭐ 107K
Design API methods with predictable behavior patterns that follow common conventions. Methods that modify objects dir…
API
Share
Complete error handling chain
5
⭐ 107K
Implement comprehensive error handling throughout the codebase by ensuring all error scenarios are properly caught, t…
Error Handling
Share
Structured test resource management
5
⭐ 7.6K
Organize tests with proper resource lifecycle management to ensure reliability and maintainability. Create test resou…
Testing
Share
Content integrity verification
5
⭐ 7.6K
When handling HTTP responses, especially with streaming data, properly verify content integrity and length to prevent…
Networking
Share
Validate nulls explicitly
5
⭐ 40.9K
Always check for null values before using them, and use Python’s idiomatic patterns to make these checks concise and …
Null Handling
Share
Use system configuration defaults
5
⭐ 40.9K
Always use the configuration system’s default values instead of hardcoding defaults in the code. This ensures consist…
Configurations
Share
Maintain code consistency
5
⭐ 40.9K
Ensure consistency throughout the codebase by following established patterns for both UI components and code structur…
Code Style
Share
Internationalize ui text
5
⭐ 40.9K
All user interface text must be internationalized using the appropriate i18n module instead of hardcoded strings. Thi…
Documentation
Share
Handle exceptions with specificity
5
⭐ 40.9K
Use specific exception types and avoid masking errors through overly broad exception handling or default values. This…
Error Handling
Share
Documentation best practices
5
⭐ 40.9K
Documentation should follow established best practices to ensure clarity, consistency, and usefulness:
1. **Use prop…
Documentation
Share
Verify properties before logging
5
⭐ 15.6K
When logging object properties, always verify that the property names exactly match the actual structure of the objec…
Logging
Share
Maintain API naming consistency
5
⭐ 15.6K
When working with AI model interfaces and result objects, ensure consistent property naming across related components…
AI
Share
Document API schemas
5
⭐ 15.6K
Add comprehensive JSDoc comments to all API interfaces, types, and schema definitions. This documentation should:
1….
Documentation
Share
Consistent provider options
5
⭐ 15.6K
When designing APIs that support multiple providers or service integrations, implement consistent patterns for handli…
API
Share
Protect render loop performance
4
⭐ 62.1K
Ensure render loop operations stay within frame time budget (typically 16.67ms for 60fps). Avoid expensive computatio…
Performance Optimization
Share
Contextualize don’t panic
4
⭐ 62.1K
Always provide meaningful context for errors and avoid code that can panic in production. Use `.context()` or `.with_…
Error Handling
Share
Background process blocking operations
4
⭐ 62.1K
Always move potentially blocking operations to background threads to maintain UI responsiveness. Use appropriate spaw…
Concurrency
Share
Document AI model capabilities
4
⭐ 51.7K
Provide clear, comprehensive documentation for AI model capabilities, especially for multimodal features and deployme…
AI
Share
Use parameterized queries
4
⭐ 19.8K
Always use parameterized queries with bind variables instead of string concatenation or formatting when constructing …
Database
Share
Standardize error wrapping patterns
4
⭐ 19.8K
Use consistent error wrapping patterns to preserve error context and ensure proper error code propagation. Always: 1….
Error Handling
Share
Metric design best practices
4
⭐ 19.8K
Design metrics to be reliable and maintainable by following these key principles:
1. Initialize metrics with zero va…
Observability
Share
Log levels and clarity
4
⭐ 19.8K
Choose appropriate log levels and write clear, meaningful log messages that provide necessary context without creatin…
Logging
Share
Explicit nil handling
4
⭐ 19.8K
Always handle nil values explicitly in your code to improve clarity and prevent subtle bugs. When a function needs to…
Null Handling
Share
Environment-portable configuration management
4
⭐ 19.8K
Ensure all configurations are environment-portable and follow current best practices for the target platforms. This i…
Configurations
Share
Use optional patterns
4
⭐ 74K
Choose the most appropriate pattern for handling potentially undefined or null values. When designing types, prefer o…
Null Handling
Share
Optimize glob operations
4
⭐ 74K
When using glob patterns for file system operations, ensure optimal performance and consistent behavior by configurin…
Algorithms
Share
Minimize memory allocations
4
⭐ 74K
Choose methods and patterns that reduce unnecessary memory allocations and object creation to improve performance. Wh…
Performance Optimization
Share
Manage configuration inheritance carefully
4
⭐ 74K
When designing configuration systems, establish clear default values and inheritance patterns. Follow these principle…
Configurations
Share
Leverage native tooling
4
⭐ 74K
Prioritize native or Rust-based implementations of build tools over their JavaScript counterparts to significantly im…
Performance Optimization
Share
Evolve APIs with compatibility
4
⭐ 74K
When evolving APIs, maintain backwards compatibility while introducing new features by following a staged deprecation…
API
Share
Document code purposefully
4
⭐ 74K
High-quality code documentation improves maintainability and helps other developers understand your intentions. Follo…
Documentation
Share
Clean configuration organization
4
⭐ 74K
Organize configuration settings logically and avoid redundancy in project configuration files. Group related options …
Configurations
Share
Break down complex functions
4
⭐ 74K
Improve code readability and maintainability by decomposing large, complex functions into smaller, focused ones. When…
Code Style
Share
Use direct documentation style
4
⭐ 60.3K
Write documentation using direct, clear language that addresses the reader directly. Follow these style guidelines:
…
Documentation
Share
Respect connectivity state
4
⭐ 60.3K
Applications should gracefully handle different network connectivity states and provide appropriate feedback to users…
Networking
Share
Consistent authentication patterns
4
⭐ 60.3K
Design API authentication mechanisms with consistent patterns, clear documentation, and helpful error messages. When …
API
Share
Balance test performance considerations
4
⭐ 60.3K
When writing tests, consider both thoroughness and execution time. For operations with significant overhead (like Pyt…
Testing
Share
React rendering safeguards
4
⭐ 90.6K
This standard ensures your React components render correctly and efficiently, preventing common pitfalls that cause e…
React
Share
Keep build tooling updated
4
⭐ 28.1K
Maintain up-to-date build and CI/CD tooling to leverage the latest features, performance improvements, and security p…
CI/CD
Share
Define API boundaries
4
⭐ 28.1K
Clearly specify what constitutes your public API contract to manage versioning expectations and documentation require…
API
Share
Configuration precision matters
4
⭐ 28.1K
Ensure configuration files are precise and stable to prevent unexpected build failures and runtime issues. This inclu…
Configurations
Share
Choose logging levels wisely
4
⭐ 28.1K
Select appropriate logging levels based on the frequency and importance of the logged operation. Use `trace` for high…
Logging
Share
Boundary case handling
4
⭐ 28.1K
Always handle boundary conditions explicitly in algorithms to prevent unexpected behavior. When implementing algorith…
Algorithms
Share
Secure unsafe code
4
⭐ 29K
When working with unsafe code, follow these practices to minimize security vulnerabilities:
1. **Minimize scope**: L…
Security
Share
Optimize algorithmic efficiency
4
⭐ 29K
Pay careful attention to operations inside loops and recursive functions to avoid unexpected algorithmic complexity. …
Algorithms
Share
Memory ordering needs justification
4
⭐ 29K
When using atomic operations, explicitly justify the choice of memory ordering. Each use of a memory ordering should …
Concurrency
Share
Granular feature flags
4
⭐ 29K
Feature flags should be designed with granularity to ensure dependencies are only required when absolutely necessary….
Configurations
Share
Document null safety assumptions
4
⭐ 29K
When writing code that handles potentially null, undefined, or uninitialized values, always document safety assumptio…
Null Handling
Share
Code block formatting standards
4
⭐ 29K
When documenting code examples and shell commands in project documentation, follow these formatting standards to ensu…
Documentation
Share
Prefer explicit API design
4
⭐ 9.9K
When designing APIs, favor simple and explicit interfaces over flexible but complex ones. This reduces cognitive load…
API
Share
Choose semantically clear identifiers
4
⭐ 9.9K
Select parameter and method names that accurately describe their purpose and behavior, avoiding ambiguous terms that …
Naming Conventions
Share
Choose optimal data structures
4
⭐ 9.9K
Select data structures based on their algorithmic complexity and usage patterns. Consider the tradeoffs between diffe…
Algorithms
Share
Resource cleanup on errors
4
⭐ 45.5K
Always ensure proper resource cleanup in error paths to prevent leaks. Use defer functions with explicit error checki…
Error Handling
Share
Guard shared state
4
⭐ 45.5K
Consistently protect shared state with appropriate synchronization mechanisms and ensure proper cleanup to prevent ra…
Concurrency
Share
Explicit protocol interfaces
4
⭐ 45.5K
Design protocol interfaces with explicit behavior definitions rather than relying on implicit conventions. Clearly sp…
API
Share
Ensure test isolation
4
⭐ 45.5K
Tests should be completely isolated from each other and clean up after themselves to prevent interference.
1. **Use…
Testing
Share
Consistent documentation formatting
4
⭐ 45.5K
Maintain consistent style in documentation files to improve readability and professionalism. Specifically:
1. **Comm…
Code Style
Share
Configuration override precedence
4
⭐ 45.5K
When designing systems with configurations that can be specified at multiple levels (global vs local, environment vs …
Configurations
Share
Clarify test documentation
4
⭐ 45.5K
Ensure all testing-related documentation is clear, accurate, and user-focused. Use precise terminology when describin…
Testing
Share
Choose appropriate API types
4
⭐ 45.5K
Select the simplest data types that satisfy requirements when designing API signatures. Avoid using complex types (li…
API
Share
Tensor-aware control flow
4
⭐ 190.6K
When working with TensorFlow tensors, avoid using Python comparison operators (`<`, `>=`, `==`) or conditional checks…
AI
Share
Complete docstring structure
4
⭐ 190.6K
Function documentation should follow a consistent structure that includes all necessary components to be complete and…
Documentation
Share
Centralize configuration settings
4
⭐ 190.6K
Place configuration settings in centralized, appropriate locations rather than duplicating them across multiple files…
Configurations
Share
Mathematical precision matters
4
⭐ 6.1K
When implementing mathematical algorithms, ensure precise terminology and correct implementation of mathematical conc…
Algorithms
Share
Document environment variables
4
⭐ 6.1K
When using configurable components, clearly document all relevant environment variables and their effects. Include ex…
Configurations
Share
Use environment-independent defaults
spring-projects/spring-framework
4
⭐ 58.4K
When designing configuration options, avoid relying on environment-specific defaults such as system character encodin…
Configurations
Share
Spring annotation best practices
spring-projects/spring-framework
4
⭐ 58.4K
When working with Spring annotations, follow these guidelines to avoid common issues:
1. **Use interface types for d…
Spring
Share
Minimize lock contention
spring-projects/spring-framework
4
⭐ 58.4K
When implementing thread-safe code, minimize the scope and duration of locks to reduce contention and improve perform…
Concurrency
Share
Consistent style conventions
spring-projects/spring-framework
4
⭐ 58.4K
Apply consistent formatting and organization conventions throughout the codebase to enhance readability and maintaina…
Code Style
Share
Explicit security documentation
4
⭐ 77.6K
Always provide explicit and accurate documentation for security-related configurations, including:
1. Use proper con…
Security
Share
Thread management best practices
4
⭐ 41.3K
When working with threads or thread pools in concurrent code, follow these practices to improve reliability and debug…
Concurrency
Share
Raise contextual error types
4
⭐ 41.3K
Always raise specific, contextual exception types instead of generic exceptions. Include relevant error details that …
Error Handling
Share
Precise dependency versioning
4
⭐ 1.9K
When specifying dependency version constraints in configuration files, be deliberate about minimum versions based on …
Configurations
Share
Include practical examples
4
⭐ 1.9K
Enhance technical documentation with clear, practical code examples that demonstrate usage. This applies to:
1. Chan…
Documentation
Share
Flexible configuration formats
4
⭐ 1.9K
Support multiple configuration formats where appropriate (string, callable, object) to accommodate different framewor…
Configurations
Share
Balance CI test coverage
4
⭐ 1.9K
Configure CI workflows to optimize both comprehensive testing and resource usage. For resource-intensive tests that m…
CI/CD
Share
Optimize React hook patterns
4
⭐ 41.3K
Design React hooks with performance and maintainability in mind by following these key principles:
1. Minimize useEf…
React
Share
Explicit optional type declarations
4
⭐ 41.3K
Always explicitly declare optional types in interfaces and function parameters rather than relying on runtime checks …
Null Handling
Share
Structure configuration options
4
⭐ 16.6K
Design and document configuration options (feature flags, environment variables, conditional compilation) to be clear…
Configurations
Share
Maintain consistent formatting
4
⭐ 16.6K
Ensure consistent formatting and organization throughout the codebase to improve readability and maintainability. Thi…
Code Style
Share
Decompose complex algorithms
4
⭐ 16.6K
When implementing algorithms, break down complex methods that handle multiple concerns into smaller, more focused met…
Algorithms
Share
Choose appropriate error mechanisms
4
⭐ 16.6K
Use the right error handling mechanism for each scenario: exceptions for recoverable situations, assertions only for …
Error Handling
Share
Support configuration extension patterns
4
⭐ 40.6K
When designing configuration systems, provide both replacement and extension options for list-based settings to give …
Configurations
Share
Maintain focused module structure
4
⭐ 40.6K
Keep modules focused and well-organized by grouping related functionality together and splitting large files into log…
Code Style
Share
Leverage existing API utilities
4
⭐ 40.6K
When implementing or consuming APIs, always prefer using existing utility methods and abstractions over manual implem…
API
Share
Optimize hot paths
4
⭐ 237K
In performance-critical code paths that execute frequently, optimize to reduce unnecessary operations that can impact…
Performance Optimization
Share
Balance constraints with flexibility
4
⭐ 237K
When designing APIs, carefully evaluate constraints imposed on consumers. Each limitation should serve a clear purpos…
API
Share
Understand query method behavior
4
⭐ 57K
When working with database queries in Active Record, it’s essential to understand the precise behavior of query metho…
Database
Share
Optimize cache headers
4
⭐ 57K
Use appropriate HTTP cache headers based on content mutability. For immutable assets (like digest-stamped files), app…
Caching
Share
Human-readable configuration values
4
⭐ 57K
When writing configuration files, prioritize human readability and maintainability by using descriptive expressions i…
Configurations
Share
Efficient data processing
4
⭐ 57K
When implementing algorithms that process large data streams or collections, use a chunking approach rather than proc…
Algorithms
Share
Contextual error messages
4
⭐ 57K
Error messages should provide sufficient context to understand and debug the problem efficiently. Include both the ex…
Error Handling
Share
Content security policy configuration
4
⭐ 57K
Implement Content Security Policy (CSP) configurations appropriately for your application’s context. Use report-only …
Security
Share
Validate database connections explicitly
4
⭐ 14.7K
Always implement explicit database connection validation strategies to ensure robust application behavior during star…
Database
Share
Secure authentication defaults
4
⭐ 14.7K
Configure authentication mechanisms with secure default settings to prevent security vulnerabilities. When implementi…
Security
Share
Documentation style consistency
4
⭐ 14.7K
Maintain consistent documentation style to improve readability and user experience:
1. **Use precise terminology**: …
Documentation
Share
Avoid wildcard imports
4
⭐ 14.7K
Wildcard (star) imports like `import java.util.*;` are prohibited in the codebase as they reduce code readability and…
Code Style
Share
Avoid unnecessary allocations
4
⭐ 14.7K
Minimize object creation and memory allocations, especially in frequently called methods and hot code paths, to reduc…
Performance Optimization
Share
Automate style enforcement
4
⭐ 14.7K
Implement automated code style enforcement using complementary tools rather than relying on manual reviews. Configure…
Code Style
Share
Optimize memory usage
4
⭐ 91.3K
Limit memory consumption in performance-critical paths by conditionally creating large data structures or deferring a…
Performance Optimization
Share
Normalize configuration parameters
4
⭐ 91.3K
Always normalize configuration inputs (especially environment variables) by removing whitespace and applying consiste…
Configurations
Share
Eliminate redundant operations
4
⭐ 91.3K
Avoid unnecessary operations that can impact performance. This includes:
1. Redundant data transformations: - Loa…
Performance Optimization
Share
Design for compatibility
4
⭐ 91.3K
When evolving APIs, prioritize backward compatibility to minimize disruption for existing users. Add new functionalit…
API
Share
Choose appropriate exceptions
4
⭐ 91.3K
Select the proper exception type based on the error scenario to provide clearer error handling and better debugging e…
Error Handling
Share
Write targeted, specific tests
4
⭐ 24.4K
Tests should validate specific, well-defined behaviors with clear assertions that directly relate to what’s being tes…
Testing
Share
Simple defaults, flexible overrides
4
⭐ 24.4K
Design APIs with intuitive defaults for common use cases while providing specialized options for edge cases. This app…
API
Share
Semantic over syntactic
4
⭐ 24.4K
Choose names that clearly communicate the purpose and behavior of your code elements, focusing on semantic meaning ra…
Naming Conventions
Share
Safe attribute access pattern
4
⭐ 24.4K
Always use safe attribute access patterns to handle potentially null or undefined attributes. Instead of direct attri…
Null Handling
Share
Document configuration relationships
4
⭐ 24.4K
When designing configuration options that interact with each other, clearly document these relationships and consider…
Configurations
Share
Consistent configuration patterns
4
⭐ 24.4K
When working with configurations in Pydantic models, maintain consistency by using `ConfigDict()` instead of plain di…
Configurations
Share
Balance documentation thoroughness
4
⭐ 24.4K
Documentation should balance completeness with avoiding redundancy. When documenting complex features:
1. Centralize…
Documentation
Share
Service layer abstraction
4
⭐ 11.8K
Separate business logic and external service interactions from API views by using dedicated service layers. This impr…
API
Share
Parameterize security commands
4
⭐ 11.8K
When writing security-related CLI commands or remediation steps, always use standardized parameter placeholders (e.g….
Security
Share
Memory usage optimization
4
⭐ 11.8K
Optimize memory usage in high-performance applications by implementing explicit memory management techniques. This in…
Performance Optimization
Share
Maintain component consistency
4
⭐ 11.8K
Use a consistent approach when working with components to improve code maintainability and ensure visual coherence th…
Code Style
Share
Ensure migration compatibility
4
⭐ 11.8K
When modifying database schemas through migrations, ensure compatibility with existing data. For new required fields,…
Migrations
Share
Document configuration variables
4
⭐ 11.8K
Always provide complete documentation for configuration variables, including their exact format, purpose, and behavio…
Configurations
Share
Document authentication requirements
4
⭐ 11.8K
When creating or modifying APIs, always provide comprehensive documentation for authentication methods and prerequisi…
API
Share
Prevent deadlock conditions
4
⭐ 34.3K
Carefully manage resource acquisition and release to prevent deadlocks in concurrent code. Deadlocks typically occur …
Concurrency
Share
Prevent cryptic errors
4
⭐ 34.3K
Always implement proper validation and type checking to prevent cryptic error messages. When errors do occur, provide…
Error Handling
Share
Organize tests efficiently
4
⭐ 34.3K
Write maintainable, well-structured tests that are easy to understand and extend. Tests should remain simple and focu…
Testing
Share
Optimize data transformations
4
⭐ 34.3K
When implementing data processing operations, avoid unnecessary data transformations, copies, and conversions that ca…
Database
Share
Design for operation flexibility
4
⭐ 34.3K
When implementing algorithms that operate on data structures (particularly arrays, lists, or collections), design the…
Algorithms
Share
Defer expensive operations
4
⭐ 34.3K
Avoid triggering expensive computations prematurely in your code. Operations like `collect()`, intensive IO operation…
Performance Optimization
Share
Choose appropriate abstractions
4
⭐ 34.3K
When designing APIs, select data types and patterns that match how they will be consumed while facilitating long-term…
API
Share
Proper span lifecycle
4
⭐ 25.9K
Always ensure trace spans are properly closed in all code execution paths to prevent trace leaks that can distort obs…
Observability
Share
Prevent backing array surprises
4
⭐ 25.9K
When modifying slices in Go, be aware that appending to a slice with available capacity will modify the backing array…
Algorithms
Share
Minimize API surface
4
⭐ 25.9K
Design APIs with minimal exposed surface by encapsulating implementation details within packages. When designing APIs…
API
Share
Write reliable test cases
open-telemetry/opentelemetry-python
4
⭐ 2.1K
Create deterministic and reliable test cases by following these guidelines:
1. Use hardcoded values instead of rando…
Testing
Share
Return collections not None
open-telemetry/opentelemetry-python
4
⭐ 2.1K
Return empty collections (lists, dicts, sets) instead of None when representing empty states. This reduces null check…
Null Handling
Share
Prevent recursive logging calls
open-telemetry/opentelemetry-python
4
⭐ 2.1K
Avoid implementing logging calls that could trigger recursive logging patterns, which can lead to infinite loops and …
Logging
Share
Precise configuration specifications
open-telemetry/opentelemetry-python
4
⭐ 2.1K
Ensure configuration files use tool-specific syntax and conventions while leveraging appropriate defaults. Be intenti…
Configurations
Share
Place attributes correctly
open-telemetry/opentelemetry-python
4
⭐ 2.1K
When implementing observability with OpenTelemetry, place attributes at the appropriate level in the telemetry hierar…
Observability
Share
Pin dependency versions
open-telemetry/opentelemetry-python
4
⭐ 2.1K
Always use exact version pinning (==) for dependencies in requirements files rather than version ranges. This ensures…
Configurations
Share
Choose data structures wisely
open-telemetry/opentelemetry-python
4
⭐ 2.1K
Select data structures based on your specific access patterns and performance requirements. Using the right data stru…
Algorithms
Share
Optimize for common cases
4
⭐ 82.9K
When implementing algorithms, create specialized versions for common cases to improve performance, while maintaining …
Algorithms
Share
Framework synchronization practices
4
⭐ 82.9K
When implementing concurrent code, always use the framework’s provided synchronization primitives rather than direct …
Concurrency
Share
Document properly with references
4
⭐ 82.9K
Always separate code from documentation and use proper referencing techniques. Documentation should be in markdown fi…
Documentation
Share
Reuse buffers strategically
4
⭐ 145.7K
For frequently called methods or hot code paths, reuse allocations instead of creating new buffers on each call. This…
Performance Optimization
Share
Platform-aware configuration documentation
4
⭐ 145.7K
Always document platform-specific configuration differences and requirements thoroughly. When writing documentation o…
Configurations
Share
Loose API coupling
4
⭐ 145.7K
Maintain a clear separation between API definitions and their implementations by avoiding direct passing of API struc…
API
Share
Use async/await pattern
4
⭐ 2.8K
When designing or documenting API clients, always use the async/await pattern rather than blocking calls. Replace cod…
API
Share
Catch specific exceptions
4
⭐ 2.8K
Always catch specific exception types rather than using general catch blocks. This improves error handling precision,…
Error Handling
Share
Limit environment variable scope
4
⭐ 112.2K
When working with environment variables for configuration:
1. **Reuse existing environment variables** rather than c…
Configurations
Share
Format docs for readability
4
⭐ 112.2K
Documentation should follow consistent formatting and structural patterns to maximize readability and maintainability…
Documentation
Share
Follow naming conventions
4
⭐ 112.2K
Maintain consistent naming conventions across the codebase:
- Use PascalCase for class methods (e.g., `All()`, `Get(…
Naming Conventions
Share
Document non-intuitive code
4
⭐ 112.2K
Add clear comments to explain complex logic, function differences, and non-obvious implementation details. This is es…
Documentation
Share
Descriptive function names
4
⭐ 112.2K
Function and method names should precisely describe their purpose and behavior. Choose names that explicitly communic…
Naming Conventions
Share
Await all promises
4
⭐ 112.2K
Always explicitly await all asynchronous operations, especially in cleanup code paths and resource management. Failin…
Concurrency
Share
Verify documentation references
4
⭐ 133K
When writing or updating documentation, ensure all code examples, installation commands, and project references accur…
Documentation
Share
Proper Use of Suspense in Next.js Components
4
⭐ 133K
When building Next.js applications that leverage server-side rendering (SSR) or Partial Prerendering (PPR), it is ess…
Next.js
Share
Proper Error Handling in Next.js API Routes
4
⭐ 133K
This review focuses on ensuring proper error handling in Next.js API routes. Key principles include validating incomi…
Next.js
Share
Maintain Consistent Naming Conventions in Next.js Code
4
⭐ 133K
As a code reviewer for Next.js projects, ensure that all code artifacts, including component names, file names, and c…
Next.js
Share
Protect network buffer lifecycle
4
⭐ 34.2K
When handling network buffers in protocol implementations, ensure proper lifecycle management to prevent memory leaks…
Networking
Share
Preserve backward compatibility
4
⭐ 34.2K
When evolving APIs in minor versions, always maintain backward compatibility to avoid breaking client code. Follow th…
API
Share
Optimize search operations
4
⭐ 34.2K
Enhance search algorithm performance by prioritizing common cases, using appropriate data structures, and avoiding un…
Algorithms
Share
Configurable over hardcoded
4
⭐ 34.2K
Make configuration parameters configurable rather than hardcoding values, especially for limits, sizes, and threshold…
Configurations
Share
Use consistent control structures
4
⭐ 71.8K
Always use curly braces for control structures (if, for, while, etc.), even for single-line statements. This improves…
Code Style
Share
Structure exception handling patterns
4
⭐ 71.8K
Implement consistent exception handling using framework-provided mechanisms rather than ad-hoc try-catch blocks or ma…
Error Handling
Share
Standardize logger configuration patterns
4
⭐ 71.8K
Maintain consistent logger configuration and usage patterns across the application while leveraging built-in customiz…
Logging
Share
Prevent async race conditions
4
⭐ 71.8K
Design async operations to prevent race conditions, memory leaks, and ensure proper resource cleanup. Key principles:…
Concurrency
Share
Pin dependency versions
4
⭐ 71.8K
Explicitly pin or constrain dependency versions in CI/CD configurations instead of using `latest` tags. This prevents…
CI/CD
Share
Package dependency configuration
4
⭐ 71.8K
Configure dependencies appropriately in package.json based on usage patterns and requirements. This improves package …
Configurations
Share
HTTP header management
4
⭐ 71.8K
When working with HTTP responses, follow these principles for proper header management:
1. **Only set default header…
Networking
Share
Document configuration behaviors
4
⭐ 71.8K
Always document configuration options thoroughly, especially for module and service settings. For each configuration …
Configurations
Share
Configurable log formatting
4
⭐ 71.8K
Design logging systems with customizable formatting and output options. Separate formatting logic into protected meth…
Logging
Share
Benchmark before optimizing
4
⭐ 71.8K
When making performance-critical decisions, always validate your approach with benchmarks using realistic data sizes …
Performance Optimization
Share
Scope JWT authentication tokens
4
⭐ 19K
Always include tenant, timeline, and endpoint identifiers in JWT tokens used for service authentication. This ensures…
Security
Share
Proper Option type usage
4
⭐ 19K
Use Option only for truly optional values that can meaningfully be None. Avoid using Option when a value is always…
Null Handling
Share
Proactive cache warming
4
⭐ 19K
Implement proactive cache warming strategies to minimize performance degradation after system restarts or during cold…
Performance Optimization
Share
Pin GitHub action versions
4
⭐ 19K
Always pin GitHub Actions to specific commit hashes instead of using major/minor version tags (like @v4). This ensure…
CI/CD
Share
Ensure algorithm robustness
4
⭐ 19K
When implementing algorithms, ensure they handle all edge cases correctly and robustly. Code should gracefully manage…
Algorithms
Share
Connection pooling with pipelining
4
⭐ 19K
Implement connection pooling with request pipelining for network services to optimize resource usage and improve thro…
Networking
Share
Graph traversal optimization
4
⭐ 20.8K
When working with graph structures, avoid performing redundant depth-first search (DFS) traversals as each traversal …
Algorithms
Share
Explicit null checks
4
⭐ 20.8K
Always use explicit null checks (`value is None` or `value is not None`) rather than implicit truthiness evaluations …
Null Handling
Share
Comprehensive API documentation
4
⭐ 20.8K
Ensure all API elements are thoroughly documented following a consistent format. This includes:
1. **All function pa…
Documentation
Share
Avoid redundant calculations
4
⭐ 20.8K
Eliminate redundant calculations by identifying and caching frequently used values to improve performance. Consider t…
Performance Optimization
Share
Write user-centric documentation guides
4
⭐ 96.1K
Documentation should be written with the user’s perspective in mind, using clear, action-oriented language and intuit…
Documentation
Share
Use slots for composition
4
⭐ 96.1K
When designing React component APIs, implement the slots pattern using `slots` and `slotProps` props instead of speci…
React
Share
Test behavior not implementation
4
⭐ 96.1K
Focus tests on user behavior and outcomes rather than implementation details. Structure tests to simulate real user i…
Testing
Share
Strict mode-proof hooks
4
⭐ 96.1K
Ensure your React components work correctly in both development (Strict Mode) and production environments by writing …
React
Share
Standardize code formatting patterns
4
⭐ 96.1K
Maintain consistent code formatting patterns across the codebase to improve readability and maintainability. This inc…
Code Style
Share
Standardize build configurations
4
⭐ 96.1K
When configuring module builds, maintain consistent and explicit configuration for different module formats (CJS, ESM…
Configurations
Share
Semantic descriptive naming
4
⭐ 96.1K
Choose names that clearly communicate purpose, behavior, and semantics of code elements. Names should be self-explana…
Naming Conventions
Share
Explicit configuration specifications
4
⭐ 96.1K
When writing configuration files, be explicit and precise about dependencies and versions rather than using broad pat…
Configurations
Share
Event-triggered network requests
4
⭐ 96.1K
When implementing user interactions that trigger network requests, use precise event handling techniques to ensure re…
Networking
Share
Document compatibility boundaries
4
⭐ 96.1K
Clearly communicate your API’s compatibility guarantees and limitations. When designing APIs, explicitly indicate wha…
API
Share
Distinguish Next.js routers
4
⭐ 96.1K
Always provide separate implementation instructions for Next.js App Router (13+) and Pages Router. These routing syst…
Next
Share
Avoid render cycle allocations
4
⭐ 96.1K
Creating new objects, arrays, or functions inside a component’s render cycle causes unnecessary allocations on every …
Performance Optimization
Share
Use proper logging
4
⭐ 1.4K
Always use the project’s standard logging system (mbgl::Log) with appropriate log levels instead of ad-hoc solutions …
Logging
Share
Structured coroutine management
4
⭐ 1.4K
Always bind coroutine scopes to appropriate lifecycles and follow consistent patterns for asynchronous operations. Pr…
Concurrency
Share
Preallocate collection capacity
4
⭐ 1.4K
When the final size of a collection is known before adding elements, use `reserve()` to preallocate memory capacity. …
Performance Optimization
Share
Extract workflow scripts
4
⭐ 1.4K
Move complex scripts out of workflow YAML files into separate, dedicated script files in your repository. This practi…
CI/CD
Share
Enforce clear data ownership
4
⭐ 1.4K
Always establish and maintain clear ownership semantics in concurrent code to prevent data races. This includes:
1. …
Concurrency
Share
Document platform requirements
4
⭐ 1.4K
When setting or changing minimum platform version requirements, always document the specific technical reasons for th…
Configurations
Share
Descriptive named constants
4
⭐ 1.4K
Replace magic numbers and unclear variables with descriptive named constants using appropriate naming conventions. Th…
Naming Conventions
Share
Configure platform-specific builds
4
⭐ 1.4K
Ensure build and distribution configurations are properly documented and optimized for each target platform. For cros…
Configurations
Share
Prevent flaky test timing
4
⭐ 13.6K
Replace non-deterministic timing patterns with reliable alternatives to prevent flaky tests. This includes:
1. Use e…
Testing
Share
Pin dependency versions
4
⭐ 13.6K
Always pin external dependencies to specific versions in CI/CD workflows to ensure build reproducibility, stability, …
CI/CD
Share
Explicit null value checks
4
⭐ 13.6K
Use explicit null/undefined checks instead of truthy/falsy checks when handling potentially null or undefined values….
Null Handling
Share
Configuration value consistency
4
⭐ 13.6K
Maintain consistency in configuration values across the application by following these practices:
1. **Use properly …
Configurations
Share
Use database-native types
4
⭐ 15K
Always leverage database-native data types and appropriate schema design to maximize performance and query capabiliti…
Database
Share
Eliminate redundant code
4
⭐ 15K
Simplify code by eliminating redundancy and unnecessary complexity. This improves readability, reduces potential bugs…
Code Style
Share
Dependency classification standards
4
⭐ 15K
Properly classify dependencies in package.json according to their usage pattern and project guidelines. This ensures …
Configurations
Share
Comprehensive AI documentation
4
⭐ 15K
When documenting AI integrations, provide comprehensive examples that showcase all common initialization and usage pa…
AI
Share
Avoid hardcoded configurations
4
⭐ 15K
Always parameterize values that might vary across different environments or users instead of hardcoding them in your …
Configurations
Share
Standardize network tools
4
⭐ 15.1K
When performing network operations in build scripts or containers, prefer `curl` over `wget` for HTTP requests to sta…
Networking
Share
Prioritize readability over brevity
4
⭐ 15.1K
When writing code, favor readability and maintainability over clever or compact solutions. Break down complex logic i…
Code Style
Share
Pin version dependencies
4
⭐ 15.1K
Explicitly pin version dependencies in configuration files to ensure reproducible builds and prevent breaking changes…
Configurations
Share
Load configurations efficiently
4
⭐ 15.1K
When designing components that require configuration, follow these practices to enhance performance, maintainability,…
Configurations
Share
Follow API conventions
4
⭐ 15.1K
When designing APIs, adhere to established API conventions, particularly Kubernetes API conventions when working with…
API
Share
Externalize configuration parameters
4
⭐ 15.1K
Create configurations that can be easily managed outside your application code. Design configuration parameters to be…
Configurations
Share
Document code thoroughly
4
⭐ 15.1K
Always include appropriate documentation in your code to improve readability, maintainability, and usability:
1. **D…
Documentation
Share
Contextualize and classify errors
4
⭐ 15.1K
Always provide meaningful context when handling errors, and classify them appropriately based on their source. This i…
Error Handling
Share
Centralize configuration constants
4
⭐ 15.1K
Store configuration constants, defaults, and environment variable mappings in dedicated configuration files rather th…
Configurations
Share
Use defensive null checks
4
⭐ 50.9K
When working with properties or methods that could potentially be null, use Kotlin’s null safety features defensively…
Null Handling
Share
Use structured logging fields
4
⭐ 30.3K
Always use structured logging with descriptive field names rather than string interpolation. Include relevant context…
Logging
Share
Prevent nil dereferences
4
⭐ 30.3K
Always verify that pointers, slices, or arrays are non-nil and have sufficient elements before attempting to access t…
Null Handling
Share
Prefer configurable values
4
⭐ 30.3K
Always use configurable values instead of hardcoded defaults when available. This ensures that user preferences are r…
Configurations
Share
Performance-conscious metrics implementation
4
⭐ 30.3K
Implement metrics collection that is both comprehensive and minimally impactful on system performance. Design your me…
Observability
Share
Include explanatory examples
4
⭐ 30.3K
Always enhance documentation with concrete, illustrative examples that demonstrate expected inputs, formats, or outpu…
Documentation
Share
Avoid unnecessary work
4
⭐ 30.3K
When optimizing performance-critical code paths, eliminate redundant operations and unnecessary processing:
1. **Exi…
Performance Optimization
Share
Avoid flaky test patterns
4
⭐ 30.3K
Write reliable tests by avoiding common patterns that can lead to flaky behavior. Specifically:
1. Avoid arbitrary t…
Testing
Share
Test all code paths
4
⭐ 8.3K
Write comprehensive tests that cover all code paths including edge cases, error conditions, and different parameter c…
Testing
Share
Prevent workflow recursion
4
⭐ 8.3K
Control GitHub Actions workflow execution to avoid infinite loops and unnecessary builds. Implement these practices: …
CI/CD
Share
Normalize API responses
4
⭐ 8.3K
Design APIs to return consistent response structures across different data sources or providers. Normalize responses …
API
Share
Handle AI operation failures
4
⭐ 8.3K
Always implement proper error handling for AI service operations. AI services can fail due to rate limiting, network …
AI
Share
Ensure API contract integrity
4
⭐ 8.3K
Maintain strict consistency between API implementation and contract by ensuring: 1. Request/response schemas match ex…
API
Share
Define schema relations correctly
4
⭐ 8.3K
When designing database schemas, ensure relations and constraints are explicitly and correctly defined:
1. Every mod…
Database
Share
Complete hook dependency arrays
4
⭐ 8.3K
Ensure all hooks (useEffect, useCallback, useMemo) explicitly list every dependency used within their callback functi…
React
Share
Cache invariant computations
4
⭐ 8.3K
Avoid repeatedly computing values that don’t change frequently. For data structures, maps, or validation schemas used…
Performance Optimization
Share
Safe property access patterns
4
⭐ 68.8K
Use appropriate null/undefined handling techniques based on the context to prevent runtime errors. Be mindful of the …
Null Handling
Share
Prefer null-safe access
4
⭐ 68.8K
Always use null-safe access patterns when dealing with potentially undefined values to prevent runtime errors and imp…
Null Handling
Share
Optimize performance patterns
4
⭐ 68.8K
Choose efficient implementation patterns that improve performance. Apply these optimizations throughout your code:
1…
Performance Optimization
Share
Name for purpose first
4
⭐ 68.8K
Choose names that lead with their primary purpose or category, followed by specific details. This makes code more dis…
Naming Conventions
Share
Minimize database joins
4
⭐ 68.8K
Prefer direct filtering or specialized service methods over complex JOIN operations, especially when maintaining or r…
Database
Share
Maintain configuration documentation accuracy
4
⭐ 68.8K
Always ensure configuration documentation accurately reflects the current system capabilities, limitations, and featu…
Configurations
Share
Judicious configuration management
4
⭐ 68.8K
Carefully manage configuration options, including feature flags, to balance flexibility with maintainability:
1. **U…
Configurations
Share
Fail-safe security defaults
4
⭐ 68.8K
Always implement security features with fail-safe defaults that deny access or disable insecure functionality unless …
Security
Share
Consistent semantic naming
4
⭐ 68.8K
Use consistent, specific, and semantically appropriate naming conventions throughout the codebase. When creating new …
Naming Conventions
Share
Consistent API versioning approach
4
⭐ 68.8K
Adopt and document a consistent approach to API versioning across your services. The chosen format should be clearly …
API
Share
Component architecture principles
4
⭐ 68.8K
Extract logic that doesn’t render JSX into custom hooks instead of components. Components that don’t return markup cr…
React
Share
Descriptive idiomatic identifiers
4
⭐ 83K
Use descriptive names for variables, types, and interfaces that follow Go language idioms. Avoid single-letter variab…
Naming Conventions
Share
Consistent error patterns
4
⭐ 83K
Implement consistent error handling patterns throughout your codebase to improve readability and maintainability.
**…
Error Handling
Share
Structure user documentation
4
⭐ 32.9K
When documenting complex features or configuration options, structure your documentation with these four key elements…
Documentation
Share
Semantic name clarity
4
⭐ 32.9K
Names should clearly and accurately reflect the purpose of variables, methods, and other identifiers. Follow these pr…
Naming Conventions
Share
Prevent unnecessary memory operations
4
⭐ 32.9K
Avoid redundant memory allocations and copies when simpler alternatives exist. This includes:
1. Use in-place compar…
Performance Optimization
Share
Optimize comparison patterns efficiently
4
⭐ 32.9K
Choose efficient comparison patterns and algorithms based on the data type and use case. Key guidelines:
1. For stri…
Algorithms
Share
In-tree build configurations
4
⭐ 32.9K
Keep all build configuration files (Snapcraft, Flatpak manifests, etc.) in the repository alongside your code to ensu…
CI/CD
Share
Validate with sensible defaults
4
⭐ 95.9K
Implement a comprehensive configuration validation strategy that combines centralized validation functions with appro…
Configurations
Share
Follow Go naming conventions
4
⭐ 95.9K
Adhere to Go’s standard naming conventions for identifiers:
1. **Control visibility with capitalization**: - Use …
Naming Conventions
Share
Optimize migration code
4
⭐ 33.8K
When writing database migration code, prioritize clarity and efficiency to ensure migrations are reliable and maintai…
Migrations
Share
Optimize loop operations
4
⭐ 33.8K
When writing loops, optimize for both readability and performance by following these key principles:
1. **Exit early…
Algorithms
Share
Disable coverage in workflows
4
⭐ 33.8K
Keep code coverage tools disabled in CI/CD workflows unless they’re specifically needed for generating coverage repor…
Testing
Share
Descriptive configuration keys
4
⭐ 33.8K
Configuration keys should clearly indicate their value type, units, or expected format to prevent misunderstandings a…
Configurations
Share
Proper Handling of Promises in Fastify Implementations
4
⭐ 34K
When implementing Fastify applications in TypeScript, it is important to follow consistent patterns for handling prom…
Fastify
Share
Content negotiation design
4
⭐ 34K
When building APIs, implement proper content negotiation to handle various media types in both requests and responses…
API
Share
Consistent descriptive naming
4
⭐ 34K
Use precise, consistent, and descriptive naming conventions throughout your code to enhance readability and maintaina…
Naming Conventions
Share
Benchmark before choosing methods
4
⭐ 34K
Always benchmark different implementation approaches for performance-critical operations before selecting a method. D…
Performance Optimization
Share
Use pytest fixtures effectively
4
⭐ 86.9K
Tests should use pytest fixtures to improve organization, promote test isolation, and avoid code duplication. Fixture…
Testing
Share
Use early returns
4
⭐ 86.9K
Decrease indentation levels in your code by using early returns for edge cases and guard conditions. This approach im…
Code Style
Share
Respect async execution order
4
⭐ 86.9K
When working with asynchronous code, always be mindful of the execution order of operations, particularly with regard…
Concurrency
Share
Proper HTTP status codes
4
⭐ 86.9K
When implementing authentication and authorization systems, use semantically correct HTTP status codes to accurately …
Security
Share
Optimize hot paths
4
⭐ 67.3K
When writing code that will be executed frequently (hot paths), prioritize performance optimizations that reduce over…
Performance Optimization
Share
Optimize dependency automation
4
⭐ 67.3K
Configure automated dependency update tools (like Dependabot) to balance security needs against developer cognitive l…
Configurations
Share
Access settings properly
4
⭐ 67.3K
Always use the provided settings accessor methods (`app.get()`, `app.set()`, `app.enabled()`, `app.disabled()`) to ac…
Configurations
Share
Parallel branch traceability
4
⭐ 73.1K
When implementing algorithms with parallel processing branches, ensure proper traceability and data consistency acros…
Algorithms
Share
Exceptions for critical errors
4
⭐ 73.1K
Use exceptions rather than assertions for handling critical error conditions that need to be caught in production. As…
Error Handling
Share
Defensive null handling
4
⭐ 73.1K
Always handle null references and values defensively to prevent NullPointerExceptions and unexpected behavior. Follow…
Null Handling
Share
Configure type serialization
4
⭐ 73.1K
When working with databases that exchange data with other systems, ensure proper serialization and deserialization of…
Database
Share
Clarity over uncertainty
4
⭐ 73.1K
Technical documentation should use precise language that clearly differentiates between product behavior and user con…
Documentation
Share
Prevent N+1 queries
4
⭐ 84.2K
The N+1 query problem is one of the most common performance bottlenecks in Django applications. This occurs when you …
Database
Share
Optimize computational complexity
4
⭐ 84.2K
Identify and reduce computational complexity in your code by minimizing redundant operations and simplifying algorith…
Algorithms
Share
Measure before optimizing
4
⭐ 84.2K
Always measure performance impact before implementing optimizations and focus on changes with meaningful benefits. Py…
Performance Optimization
Share
Defend against nulls
4
⭐ 84.2K
Always use defensive programming techniques when handling potentially null or empty values to avoid runtime errors. C…
Null Handling
Share
Use modern API methods
4
⭐ 14K
When implementing algorithms with numerical libraries like ND4J, always prefer the most direct and type-safe API meth…
Algorithms
Share
Minimize object allocations
4
⭐ 14K
Avoid creating unnecessary temporary objects or arrays which can impact performance through increased garbage collect…
Performance Optimization
Share
Keep configurations current
4
⭐ 14K
Ensure all configuration elements (dependencies, build settings, preprocessor flags) are up-to-date, documented, and …
Configurations
Share
Fail fast clearly
4
⭐ 14K
Detect and report errors as early as possible with detailed context to prevent silent failures and aid debugging. Val…
Error Handling
Share
Document AI APIs completely
4
⭐ 14K
When developing AI libraries and tools, provide comprehensive and accurate API documentation that helps users navigat…
AI
Share
Cross-platform algorithm optimization
4
⭐ 14K
When implementing algorithms that need to execute efficiently across different platforms, consider both compile-time …
Algorithms
Share
Configurable resource locations
4
⭐ 14K
Always make file paths, temporary directories, and resource locations configurable with reasonable defaults instead o…
Configurations
Share
Compare floating-point safely
4
⭐ 14K
When implementing numerical algorithms, never compare floating-point values directly for equality due to precision er…
Algorithms
Share
Default None not empty
4
⭐ 33.9K
Always use `None` as the default value for optional parameters and class attributes instead of empty collections (`[]…
Null Handling
Share
Pause tracking during side-effects
4
⭐ 50.8K
When executing side-effects in reactive systems (like event handlers, cleanup functions, or async operations), always…
Concurrency
Share
Optimize common search paths
4
⭐ 50.8K
Implement dedicated fast paths for common search patterns while maintaining a complete fallback path for edge cases. …
Algorithms
Share
Guarantee cleanup execution
4
⭐ 50.8K
When implementing features that require cleanup or state restoration, always use try-finally blocks to ensure cleanup…
Error Handling
Share
Use strict test doubles
4
⭐ 7.9K
Always use strict test doubles (instance_double, class_double) instead of basic doubles or OpenStruct in tests. Stric…
Testing
Share
Standardize installation directory paths
4
⭐ 7.9K
Maintain consistent and separate installation paths for different build types to prevent conflicts and improve system…
Configurations
Share
Secure network operations
4
⭐ 7.9K
When performing network operations, prioritize security and configurability to ensure robustness across different env…
Networking
Share
Document configuration decisions
4
⭐ 7.9K
Add clear comments explaining the rationale behind configuration decisions, especially for workarounds, compatibility…
Configurations
Share
Document configuration completely
4
⭐ 7.9K
Always provide complete documentation for configuration options, including defaults, override methods, and security i…
Configurations
Share
Use pytest best practices
4
⭐ 7.7K
Adopt modern pytest features to create maintainable, isolated, and comprehensive tests. This includes:
1. **Prefer p…
Testing
Share
Preserve API compatibility
4
⭐ 7.7K
When modifying existing APIs, function signatures, or return structures, always maintain backward compatibility to pr…
API
Share
Precise configuration validation
4
⭐ 7.7K
Ensure configuration validation logic accurately reflects security intentions and best practices. When writing valida…
Configurations
Share
Use consistent test patterns
4
⭐ 79.1K
Standardize testing by leveraging established patterns and helper functions throughout your test suite. Extract repet…
Testing
Share
Consistent descriptive identifiers
4
⭐ 79.1K
Use camelCase for all variables, parameters, methods, and functions in JavaScript/TypeScript code to maintain consist…
Naming Conventions
Share
Clear accurate documentation
4
⭐ 79.1K
Documentation should be both technically accurate and contextually helpful for developers. Comments and JSDoc entries…
Documentation
Share
Always await promises
4
⭐ 79.1K
Consistently use the `await` keyword when working with Promise-returning functions to ensure proper execution flow an…
Concurrency
Share
Structured environment configuration
4
⭐ 44.2K
Use structured environment variable handling with explicit validation instead of directly accessing ENV hash. Impleme…
Configurations
Share
Correct GitHub Actions annotations
4
⭐ 44.2K
When using GitHub Actions workflow commands for annotations, always include double colons in the syntax (::command::)…
CI/CD
Share
Avoid variable name abbreviations
4
⭐ 44.2K
Use complete, descriptive variable names instead of abbreviations to enhance code readability and maintainability. Sh…
Naming Conventions
Share
Structure for readability
4
⭐ 9.4K
Prioritize code readability by structuring code in a way that makes it easy to understand at a glance. This includes:…
Code Style
Share
Isolate concurrent resources
4
⭐ 9.4K
Create separate instances of non-thread-safe resources for each thread or process in concurrent applications rather t…
Concurrency
Share
Consistent region configuration
4
⭐ 9.4K
Always maintain consistency in region configurations throughout your application. Instead of hardcoding endpoints, us…
Configurations
Share
Write deterministic tests
4
⭐ 5.8K
Tests should be deterministic, reliable, and isolated from external dependencies to ensure consistent results across …
Testing
Share
User-friendly configuration values
4
⭐ 5.8K
Prefer intuitive, user-friendly values for configuration options over technical “magic strings” or codes that require…
Configurations
Share
Standardize environment variables
4
⭐ 5.8K
Ensure environment variable names are consistently spelled, properly referenced, and follow established naming conven…
Configurations
Share
Externalize configuration values
4
⭐ 5.8K
Store configuration values (URLs, demands, pool names) in centralized variables rather than hardcoding them inline. T…
Configurations
Share
Use Option combinators
4
⭐ 22.1K
Instead of verbose conditional logic, prefer Rust’s Option combinators like map, and_then, and filter for handling po…
Null Handling
Share
Structure errors for safety
4
⭐ 22.1K
Create specific error types with appropriate status codes while ensuring sensitive details are logged but not exposed…
Error Handling
Share
Minimize memory allocation overhead
4
⭐ 22.1K
Optimize performance by minimizing unnecessary memory allocations and using allocation-efficient APIs. Key practices …
Performance Optimization
Share
Lock carefully in async
4
⭐ 22.1K
When using locks in async code, follow critical guidelines to avoid deadlocks. Never hold std::sync::Mutex locks acro…
Concurrency
Share
Handle protocol headers properly
4
⭐ 22.1K
When implementing network services, especially proxies and protocol handlers, proper HTTP header management is critic…
Networking
Share
Validate security-critical inputs
4
⭐ 107K
Always validate and sanitize user-supplied inputs before using them in security-sensitive operations. This helps prev…
Security
Share
Robust Axios Usage in TypeScript
4
⭐ 107K
This review focuses on ensuring robust and type-safe usage of the Axios library in TypeScript codebases. Key recommen…
Axios
Share
Proper Error Handling in Axios TypeScript Code
4
⭐ 107K
As a code reviewer, it is important to ensure that Axios-based TypeScript code properly handles and propagates errors…
Axios
Share
Extract for better readability
4
⭐ 107K
Complex expressions and repeated code should be extracted into well-named variables to improve readability and mainta…
Code Style
Share
Maintain consistent formatting
4
⭐ 7.6K
Enhance code readability and maintainability by applying consistent formatting practices throughout your codebase:
1…
Code Style
Share
Safe constraint modification sequence
4
⭐ 40.9K
When modifying constraints in database migrations, follow a safe sequence of operations to prevent integrity errors: …
Migrations
Share
Parameterize similar tests
4
⭐ 40.9K
Write parameterized tests instead of using for loops or duplicating test code for similar test cases. Using pytest’s …
Testing
Share
Optimize collection processing patterns
4
⭐ 40.9K
Use Python’s built-in efficient collection processing methods instead of manual implementations. This reduces code co…
Algorithms
Share
Leverage backend API capabilities
4
⭐ 40.9K
When consuming APIs in frontend applications, utilize the backend capabilities rather than reimplementing equivalent …
API
Share
Explicit version constraints
4
⭐ 40.9K
Always specify explicit version constraints for dependencies in configuration files (like pyproject.toml), particular…
Configurations
Share
Explicit over implicit configuration
4
⭐ 40.9K
Always prefer explicit configuration parameters over inferring behavior from indirect sources like image tags, naming…
Configurations
Share
Ensure deterministic queries
4
⭐ 40.9K
Build SQLAlchemy queries that are both efficient and deterministic to prevent unpredictable results and improve perfo…
Database
Share
Document public API boundaries
4
⭐ 40.9K
Clearly define and document the boundaries between public and internal APIs to guide developers on proper interface u…
API
Share
Context-rich log messages
4
⭐ 40.9K
Ensure log messages provide clear context about what happened, potential consequences, and actionable information for…
Logging
Share
Consistent technical term translation
4
⭐ 40.9K
When localizing an application, maintain consistent conventions for technical terms while respecting language-specifi…
Naming Conventions
Share
Component reuse first
4
⭐ 40.9K
Always prioritize reusing existing components before creating new ones. This practice improves codebase consistency, …
React
Share
Place configurations appropriately
4
⭐ 15.6K
Configuration options should be organized based on their nature and scope of use. Place model-specific configurations…
Configurations
Share
Explicit code organization patterns
4
⭐ 15.6K
Maintain clear and explicit code organization patterns by following these guidelines:
1. Use explicit property visib…
Code Style
Share
Self-explanatory identifier names
3
⭐ 62.1K
Choose identifier names that clearly convey their purpose without requiring users to understand implementation detail…
Naming Conventions
Share
Respect language-specific conventions
3
⭐ 62.1K
Always adhere to the established formatting and syntax conventions of each programming language while maintaining con…
Code Style
Share
Maintain style consistency
3
⭐ 62.1K
Ensure consistent styling is maintained across related elements in the codebase. This applies to:
1. **Visual assets…
Code Style
Share
Maintain consistent naming
3
⭐ 62.1K
Ensure naming follows consistent patterns throughout the codebase in both style and structure:
1. Use agreed-upon ca…
Naming Conventions
Share
Hierarchical configuration organization
3
⭐ 62.1K
Organize configuration settings hierarchically by grouping related settings under meaningful namespaces rather than c…
Configurations
Share
Secure before deployment
3
⭐ 51.7K
Remove or secure development-specific code before deploying to production environments. Development artifacts like de…
Security
Share
Protect shared state
3
⭐ 51.7K
When mutable state (like dictionaries, lists, or counters) is accessed from multiple threads or concurrent tasks, use…
Concurrency
Share
Structured configuration management
3
⭐ 19.8K
Avoid using global configuration singletons that rely on string-based lookups, as they lead to brittle code that’s ha…
Configurations
Share
Robust network handling
3
⭐ 19.8K
Always implement proper network timeout handling and address formatting to ensure robust connectivity across differen…
Networking
Share
Secure workflow permissions
3
⭐ 74K
Define explicit and minimal permissions in GitHub Actions workflows to ensure proper operation while maintaining secu…
CI/CD
Share
Restrict server access
3
⭐ 74K
Always configure server security settings with explicit allowed lists rather than permissive values. Using `true` for…
Security
Share
Short-circuit evaluation strategies
3
⭐ 60.3K
When implementing search or traversal algorithms, use short-circuit evaluation strategically to avoid unnecessary com…
Algorithms
Share
Optimize cache sharing strategies
3
⭐ 60.3K
Select the appropriate cache sharing approach based on your execution environment to maximize performance and efficie…
Caching
Share
Follow established naming conventions
3
⭐ 60.3K
Adhere to established naming conventions for files, variables, functions, and configuration options to maintain consi…
Naming Conventions
Share
Enforce strong optional types
3
⭐ 60.3K
Use strong typing and early validation to handle optional values and prevent null-related issues. Prefer enums and sp…
Null Handling
Share
Declarative constraints over runtime
3
⭐ 60.3K
Design APIs that enforce constraints through type systems and declarative mechanisms rather than runtime checks. This…
API
Share
Prevent object recreations
3
⭐ 90.6K
Avoid creating new objects and functions repeatedly during renders to reduce memory pressure and improve performance….
Performance Optimization
Share
Leverage framework defaults
3
⭐ 90.6K
Avoid redundant or unnecessary configuration by understanding and utilizing default behaviors provided by frameworks …
Configurations
Share
Complete optional chaining
3
⭐ 90.6K
When using optional chaining (`?.`), ensure that **all subsequent operations** in the chain are also protected from n…
Null Handling
Share
Complete configuration paths
3
⭐ 90.6K
Always verify that configuration files include all necessary file paths and extensions, particularly for framework-sp…
Configurations
Share
Validate configuration structures
3
⭐ 28.1K
Ensure configuration files and schemas adhere to their expected structure, location, and uniqueness constraints. When…
Configurations
Share
Use functional null handling
3
⭐ 28.1K
Leverage Rust’s functional operators for handling nullable and optional values. Instead of using unwrap() or explicit…
Null Handling
Share
Use affected mode
3
⭐ 28.1K
Optimize CI pipelines by running tasks only on packages affected by code changes. Use the `–affected` flag in Turbor…
CI/CD
Share
Standardize package manager commands
3
⭐ 28.1K
Ensure all package manager commands in documentation and CI/CD scripts follow the correct syntax for the specific pac…
CI/CD
Share
Semantic naming conventions
3
⭐ 28.1K
Use names that clearly convey the purpose and content of variables, parameters, and properties. When working with obj…
Naming Conventions
Share
Minimize lock duration
3
⭐ 28.1K
When using locks in asynchronous code, minimize the scope and duration for which locks are held, especially across `….
Concurrency
Share
Document configuration alternatives
3
⭐ 28.1K
When documenting commands or tools that can be executed in different ways based on configuration settings (like globa…
Configurations
Share
Document cache strategies
3
⭐ 28.1K
Always provide clear documentation and implementation for caching strategies, including key generation, invalidation …
Caching
Share
Optimize job structure
3
⭐ 29K
Structure CI jobs for clarity, parallelism, and efficiency. Each job should have a single, well-defined purpose to pr…
CI/CD
Share
Optimize CI job structure
3
⭐ 29K
Structure your CI workflows to maximize performance and clarity. Each job should have a single, clear responsibility …
CI/CD
Share
Minimize unsafe code
3
⭐ 29K
When writing code that requires unsafe operations, follow these critical security practices:
1. Minimize the scope o…
Security
Share
Clear command documentation
3
⭐ 29K
When documenting shell commands in technical documentation, use the `shell` language identifier instead of `bash` as …
Documentation
Share
Thread-safe resource sharing
3
⭐ 9.9K
When sharing mutable data between threads, use the `Arc>` pattern to ensure thread safety. `Arc` provides t…
Concurrency
Share
Pythonic API design
3
⭐ 9.9K
Design APIs that follow Python language conventions and idioms rather than blindly mirroring the underlying implement…
API
Share
Purpose-indicating descriptive names
3
⭐ 9.9K
Choose names for variables, methods, parameters, and fixtures that clearly communicate their purpose, content, and be…
Naming Conventions
Share
Optimize workflow triggers
3
⭐ 9.9K
Configure CI workflows with targeted triggers and path filters to balance thoroughness with efficiency. Run critical …
CI/CD
Share
Modular model components
3
⭐ 9.9K
Design machine learning model code with clear component boundaries and proper separation of concerns. Each component …
AI
Share
Manage version constraints
3
⭐ 9.9K
When configuring dependency version constraints in project files, follow these principles:
1. Be explicit about vers…
Configurations
Share
Technical precision matters
3
⭐ 45.5K
When documenting algorithms, data structures, and computational processes, use precise and objective language rather …
Algorithms
Share
Validate tensor inputs safely
3
⭐ 190.6K
When handling tensor inputs that may contain invalid values, use transformational approaches rather than conditional …
Null Handling
Share
Separate test data
3
⭐ 190.6K
Large test data should be separated from test logic to improve readability and maintainability. Move test data into s…
Testing
Share
Training-aware ML APIs
3
⭐ 6.1K
Design machine learning APIs with explicit parameters for distinguishing between training and inference phases rather…
AI
Share
Swift idiomatic naming
3
⭐ 6.1K
Follow Swift’s naming conventions to write more readable, maintainable code. The Swift language emphasizes clarity an…
Naming Conventions
Share
Provide comprehensive examples
3
⭐ 6.1K
API documentation should include complete examples that demonstrate all key usage patterns. When documenting related …
Documentation
Share
Generic algorithm design
3
⭐ 6.1K
When implementing generic algorithms in Swift, follow these best practices to improve code clarity and performance:
…
Algorithms
Share
Format for readability
3
⭐ 6.1K
Code should be formatted to optimize readability. Apply these key practices:
1. **Maintain reasonable line length** …
Code Style
Share
Follow Swift naming conventions
3
⭐ 6.1K
Ensure code follows established Swift naming conventions and remains consistent with domain terminology:
1. Use stan…
Naming Conventions
Share
Document API stability
3
⭐ 6.1K
When working with AI frameworks and machine learning libraries, clearly document the stability state of APIs being us…
AI
Share
Standardize configuration formats
spring-projects/spring-framework
3
⭐ 58.4K
Use consistent, explicit, and well-documented formats in all configuration files to improve readability and prevent m…
Configurations
Share
Package null-safety annotations
spring-projects/spring-framework
3
⭐ 58.4K
All package-info.java files must include both @NonNullApi and @NonNullFields annotations to establish null-safety at …
Null Handling
Share
Optimize CI environment configuration
spring-projects/spring-framework
3
⭐ 58.4K
When configuring CI environments, carefully evaluate whether default dependency versions are sufficient for your proj…
CI/CD
Share
Leverage Kotlin null-safety
spring-projects/spring-framework
3
⭐ 58.4K
Utilize Kotlin’s null-safety features effectively to create cleaner, more robust code:
1. For class properties that …
Null Handling
Share
Database-agnostic SQL syntax
spring-projects/spring-framework
3
⭐ 58.4K
Write SQL statements that conform to standard SQL rather than relying on vendor-specific dialects to ensure portabili…
Database
Share
Clone network headers carefully
spring-projects/spring-framework
3
⭐ 58.4K
When working with HTTP or WebSocket headers in networking code, be cautious about header manipulation, cloning, and l…
Networking
Share
Validate nulls properly
3
⭐ 77.6K
Always use appropriate null validation mechanisms to prevent NullPointerExceptions and ensure code robustness.
For s…
Null Handling
Share
Reference existing configurations
3
⭐ 77.6K
When setting up configuration files, reference existing configuration sources rather than duplicating values or logic…
Configurations
Share
Write comprehensive assertions
3
⭐ 41.3K
When writing tests, ensure your assertions thoroughly verify all relevant aspects of the functionality being tested. …
Testing
Share
Structured metric naming
3
⭐ 41.3K
Create metrics with descriptive, unique names that are distinguishable when viewed in monitoring tools. Avoid generic…
Observability
Share
Simplify feature flag logic
3
⭐ 41.3K
When working with feature flags and configuration conditions, keep your logic clean and up-to-date:
1. **Simplify co…
Configurations
Share
Prefer bulk operations
3
⭐ 41.3K
When implementing functionality that processes multiple items, always consider the performance implications of indivi…
Performance Optimization
Share
Minimize file memory footprint
3
⭐ 1.9K
When handling files in your application, minimize memory usage to optimize performance. Follow these guidelines:
1. …
Performance Optimization
Share
Memoize expensive computations effectively
3
⭐ 41.3K
Prevent unnecessary recalculations and rerenders by properly memoizing expensive computations and derived values in R…
Performance Optimization
Share
Consistent URL design
3
⭐ 41.3K
Design API endpoints with consistent, unambiguous URL patterns to improve usability and maintainability. Follow these…
API
Share
Clear consistent naming patterns
3
⭐ 41.3K
Use clear, consistent naming patterns for variables and event handlers. Avoid abbreviations unless they are widely un…
Naming Conventions
Share
Centralize AI code
3
⭐ 41.3K
Move AI-specific functionality (especially prompts) to dedicated services rather than scattering them throughout the …
AI
Share
API parameter design flexibility
3
⭐ 41.3K
Design API parameters to be extensible and future-proof by using object arguments and explicit type definitions inste…
API
Share
Algorithm structure optimization
3
⭐ 41.3K
Optimize algorithm structure by separating concerns and using appropriate data structures and language features. When…
Algorithms
Share
Validate before access
3
⭐ 16.6K
Always validate parameters and initialize variables before access to prevent null dereference and undefined behavior….
Null Handling
Share
Preserve pointer authentication
3
⭐ 16.6K
When implementing Pointer Authentication (PAC) for security, maintain signed pointers throughout their entire lifecyc…
Security
Share
Platform-agnostic network APIs
3
⭐ 16.6K
When implementing networking functionality, ensure code uses platform-agnostic APIs and appropriate abstraction layer…
Networking
Share
Parameterize configuration values
3
⭐ 16.6K
Extract hard-coded configuration values into variables, parameters, or templates to improve reusability and simplify …
Configurations
Share
Optimize build dependency chains
3
⭐ 16.6K
When configuring build and test processes in CI/CD pipelines, ensure proper dependency chains with clear inputs and o…
CI/CD
Share
Memory ordering matters
3
⭐ 16.6K
When working with shared data in multithreaded environments, memory ordering is critical to prevent race conditions a…
Concurrency
Share
Choose descriptive names
3
⭐ 16.6K
Names should clearly convey purpose and meaning. Parameter, variable, and method names should be self-explanatory and…
Naming Conventions
Share
Verify union attribute access
3
⭐ 40.6K
When working with union types in Python, always verify that all components of the union have the attributes you’re tr…
Null Handling
Share
Structure documentation effectively
3
⭐ 40.6K
Documentation should follow a consistent structure where explanations precede code examples, preferably ending with a…
Documentation
Share
Ensure algorithmic determinism
3
⭐ 40.6K
When implementing algorithms for code analysis, type checking, or pattern matching, ensure they produce consistent an…
Algorithms
Share
Assert exact expectations
3
⭐ 40.6K
Always assert exact expected values in tests rather than using loose assertions. When testing the presence of element…
Testing
Share
Verify performance empirically
3
⭐ 237K
Always validate performance optimizations through measurement rather than assumptions. Run multiple iterations of per…
Performance Optimization
Share
Use appropriate testing methods
3
⭐ 237K
When writing tests, use the appropriate testing utilities and ensure proper test isolation. For testing warning behav…
Testing
Share
Separate conditional paths
3
⭐ 237K
When working with concurrent operations, separate conditional logic from potentially expensive or suspenseful executi…
Concurrency
Share
Optimize React Component Dependencies
3
⭐ 237K
When implementing React components, ensure that dependencies between component state, props, and side effects are acc…
React
Share
Match errors to context
3
⭐ 237K
Choose error handling mechanisms based on the error’s severity and context. For critical issues that should prevent f…
Error Handling
Share
Complete hook dependencies
3
⭐ 237K
Always specify complete dependency arrays in React hooks to prevent bugs from stale closures and avoid unnecessary re…
React
Share
Check property existence first
3
⭐ 237K
Always verify that an object and its properties exist before accessing them to prevent ‘cannot read property of undef…
Null Handling
Share
Wrap threaded code properly
3
⭐ 57K
When working with threads in Rails applications, always wrap application code with `Rails.application.executor.wrap` …
Concurrency
Share
Semantic HTML usage
3
⭐ 57K
Use HTML elements according to their semantic purpose to ensure proper accessibility and code organization. Choose el…
Code Style
Share
Environment-specific logger configuration
3
⭐ 57K
Configure loggers in environment-specific files rather than in application.rb or initializers. Different environments…
Logging
Share
Document performance implications
3
⭐ 57K
Clearly document the performance implications of features and configurations to help users make informed decisions. A…
Performance Optimization
Share
Consistent terminology usage
3
⭐ 57K
Always use consistent terminology for the same concept throughout your codebase, documentation, and user interfaces. …
Naming Conventions
Share
Reuse test patterns
3
⭐ 14.7K
Minimize duplication and improve test maintainability by reusing existing test patterns and leveraging parameterizati…
Testing
Share
Document deployment strategy constraints
3
⭐ 14.7K
Always document and enforce appropriate deployment strategies for different application types in your CI/CD pipeline …
CI/CD
Share
Document dependency versions
3
⭐ 14.7K
When managing dependency versions in configuration files, provide clear documentation to help maintainers understand …
Configurations
Share
Descriptive consistent naming
3
⭐ 14.7K
Use clear, descriptive names instead of cryptic abbreviations, and follow consistent naming patterns across your code…
Naming Conventions
Share
Avoid request-path blocking
3
⭐ 14.7K
Minimize blocking operations in request-handling paths to ensure responsive application performance. Implement cachin…
Performance Optimization
Share
Thread context management
3
⭐ 91.3K
Always explicitly set required thread context and state rather than assuming inheritance from parent threads or other…
Concurrency
Share
Structure for readability
3
⭐ 91.3K
Structure code to maximize readability by reducing unnecessary complexity. Use early returns to minimize nesting leve…
Code Style
Share
Reusable workflow design
3
⭐ 91.3K
Design CI/CD workflows with reusability and clear naming conventions from the start. Use meaningful prefixes that ref…
CI/CD
Share
Reduce code duplication
3
⭐ 91.3K
Eliminate repeated code patterns by using appropriate abstraction techniques. This improves readability, reduces main…
Code Style
Share
Purpose-revealing identifier names
3
⭐ 91.3K
Choose identifier names that clearly reveal their purpose and behavior. Names should be specific, descriptive, and se…
Naming Conventions
Share
Prefer HINTS in CMake
3
⭐ 91.3K
When configuring library searches in CMake, use `HINTS` instead of `PATHS` when you want to prioritize specific locat…
Configurations
Share
Parameterize similar test cases
3
⭐ 91.3K
Instead of duplicating test code or using nested loops, use test parameterization to handle multiple test cases effic…
Testing
Share
Modular configuration design
3
⭐ 91.3K
Configuration systems should be designed with modularity and clarity in mind. When creating configuration classes or …
Configurations
Share
Document configuration decisions
3
⭐ 91.3K
Always document configuration decisions in package metadata files like `pyproject.toml` with clear comments, especial…
Configurations
Share
Consistent code organization
3
⭐ 91.3K
Follow consistent code organization patterns:
1. Place static definitions in .cpp files rather than headers to preve…
Code Style
Share
Check CUDA availability first
3
⭐ 91.3K
Always verify CUDA availability before performing CUDA-specific operations to prevent runtime errors when code runs o…
Pytorch
Share
Structured configuration management
3
⭐ 24.4K
Configuration files should follow official standards, have up-to-date tool settings, and appropriate dependency const…
Configurations
Share
Preserve language conventions
3
⭐ 24.4K
When designing APIs that bridge between programming languages and external data formats (like JSON, XML, etc.), maint…
API
Share
Explicit over implicit
3
⭐ 24.4K
Always prefer explicit configuration settings over relying on implicit defaults or environmental behaviors in CI work…
Configurations
Share
Documentation formatting standards
3
⭐ 24.4K
Maintain consistent documentation formatting to ensure proper rendering and readability. Follow these key practices: …
Code Style
Share
Categorize error types
3
⭐ 24.4K
Distinguish between different categories of errors and handle each appropriately. Specifically:
1. **Validation erro…
Error Handling
Share
Use configuration placeholders
3
⭐ 11.8K
Avoid hardcoding specific values like regions, timeframes, or identifiers in configuration commands, examples, or set…
Configurations
Share
Tenant-aware query optimization
3
⭐ 11.8K
Always include tenant_id filters in database queries for multi-tenant systems to maintain data isolation and improve …
Database
Share
Pin GitHub Actions dependencies
3
⭐ 11.8K
Always pin GitHub Actions to specific commit SHAs rather than using major version references to prevent supply chain …
CI/CD
Share
Parameterize similar tests
3
⭐ 11.8K
Write maintainable tests by using pytest parametrization for similar test cases instead of duplicating test logic. Th…
Testing
Share
Document dependency versioning
3
⭐ 11.8K
Use consistent patterns for specifying dependency versions in configuration files and document reasoning behind versi…
Configurations
Share
Feature flag compatibility
3
⭐ 34.3K
Design code to work correctly with any combination of feature flags. When implementing conditional compilation with f…
Configurations
Share
Favor clarity over brevity
3
⭐ 34.3K
Always prioritize code readability and maintainability over concise but cryptic implementations. Extract repeated log…
Code Style
Share
Database API abstraction
3
⭐ 34.3K
When designing database interaction layers, carefully consider when to create wrapper methods versus allowing direct …
Database
Share
Create demonstrative examples
3
⭐ 34.3K
Include clear, concise examples in documentation that effectively demonstrate functionality. Follow these principles …
Documentation
Share
Consistent naming standards
3
⭐ 34.3K
Maintain consistent and standardized naming throughout the codebase:
1. **Use snake_case for multi-word identifiers*…
Naming Conventions
Share
CI workflow configuration best
3
⭐ 34.3K
Configure GitHub Actions workflows to maximize reliability and maintainability. Follow these key practices:
1. **Alw…
CI/CD
Share
Optimize CI/CD workflows
3
⭐ 25.9K
Configure CI/CD workflows to maximize efficiency and improve developer experience. Consider these key optimization pr…
CI/CD
Share
Names preserve cognitive context
3
⭐ 25.9K
Choose variable, function, and type names that preserve cognitive context by clearly indicating their purpose and rel…
Naming Conventions
Share
Explicit versus dynamic configurations
3
⭐ 25.9K
Prefer explicit hardcoded configurations over dynamic ones when the configuration changes infrequently and control is…
Configurations
Share
Document reference standards
3
⭐ 25.9K
Maintain consistent and accurate reference practices throughout project documentation to enhance usability and mainta…
Documentation
Share
Structured changelog documentation
open-telemetry/opentelemetry-python
3
⭐ 2.1K
Maintain consistent and informative changelog documentation by following these practices:
1. Structure changelogs wi…
Documentation
Share
Maintain consistent naming
open-telemetry/opentelemetry-python
3
⭐ 2.1K
Ensure naming conventions are consistent across your codebase and related repositories. When naming commands, functio…
Naming Conventions
Share
Explicit CI configurations
open-telemetry/opentelemetry-python
3
⭐ 2.1K
Always use explicit, specific configurations in CI/CD pipelines to prevent ambiguity and conflicts. This includes:
1…
CI/CD
Share
Validate tensor dimensions
3
⭐ 82.9K
When implementing AI model inference code, always validate tensor dimensions and shapes before manipulating them. Neu…
AI
Share
Meaningful semantic naming
3
⭐ 82.9K
Choose names that clearly communicate purpose and follow consistent patterns across the codebase:
1. Use generic fun…
Naming Conventions
Share
Feature flag convention
3
⭐ 82.9K
Establish a consistent pattern for feature flags and dependency management in configuration files:
1. Use `WITH_*` o…
Configurations
Share
Cleanup before errors
3
⭐ 82.9K
Always ensure all resources are properly released before raising errors to prevent resource leaks. This practice is e…
Error Handling
Share
Use portable path configurations
3
⭐ 145.7K
Build and configuration scripts should use portable path handling techniques to ensure they work correctly across dif…
Configurations
Share
Optimize AI implementation patterns
3
⭐ 145.7K
When implementing AI systems, prioritize established patterns and optimizations rather than creating new implementati…
AI
Share
Complete null checks
3
⭐ 145.7K
Always perform thorough null checks before dereferencing pointers, and ensure all operations on potentially null obje…
Null Handling
Share
AI memory management
3
⭐ 145.7K
Document and implement proper memory management strategies for AI model inference to prevent out-of-memory errors and…
AI
Share
Abstract configuration access
3
⭐ 2.8K
Use abstraction layers to access configuration settings rather than accessing environment variables, feature flags, o…
Configurations
Share
Use modern nullish operators
3
⭐ 112.2K
When dealing with potentially null or undefined values, use optional chaining (`?.`) and nullish coalescing (`??`) op…
Null Handling
Share
Use appropriate metric types
3
⭐ 112.2K
When instrumenting applications with metrics, choose the correct metric type based on what you’re measuring to ensure…
Observability
Share
Reuse computed values efficiently
3
⭐ 112.2K
Move variable declarations and computations outside of loops when their values don’t change between iterations. This …
Performance Optimization
Share
Resource-aware programming patterns
3
⭐ 112.2K
When optimizing application performance, be mindful of system resource constraints and use appropriate patterns to ha…
Performance Optimization
Share
Export environment variables once
3
⭐ 112.2K
When writing shell scripts, set and export all environment variables at the top of the script rather than modifying t…
Configurations
Share
Write concise idiomatic code
3
⭐ 133K
Favor concise and idiomatic expressions in your Rust code to improve readability and maintainability.
Code Style
Share
Verify workflow configuration integrity
3
⭐ 133K
Carefully review GitHub Actions workflow configurations to prevent subtle errors that can cause CI/CD pipeline failur…
CI/CD
Share
Prefer Existence Checks in Next.js Components
3
⭐ 133K
When working with props, state, or other values in Next.js components that may be null, undefined, or contain error s…
Next.js
Share
Optimize data structure selection
3
⭐ 133K
Choose data structures that match your specific access patterns and performance requirements. The right data structur…
Performance Optimization
Share
Consistent variable style patterns
3
⭐ 133K
Maintain consistent patterns for variable declarations and naming conventions: use const by default for variable decl…
Code Style
Share
Prevent test resource leaks
3
⭐ 34.2K
Always ensure proper cleanup of resources in tests to prevent memory leaks. When using EmbeddedChannel, call readOutb…
Testing
Share
Consistent dependency declarations
3
⭐ 34.2K
Ensure dependency declarations in build configuration files use concrete values rather than variables that may not re…
Configurations
Share
Use topological sorting
3
⭐ 71.8K
When managing dependencies between modules or components, implement a topological sorting algorithm to ensure correct…
Algorithms
Share
Use factory providers
3
⭐ 71.8K
Prefer `useFactory` over `useValue` for better performance in NestJS dependency injection, especially for large objec…
NestJS
Share
Prevent race conditions
3
⭐ 71.8K
When handling concurrent operations in asynchronous environments, avoid mutating shared state that could lead to race…
Concurrency
Share
Parameterize version requirements
3
⭐ 71.8K
Always parameterize tool and runtime versions in CI/CD configurations rather than hardcoding them. This makes your pi…
CI/CD
Share
Optimize critical path iterations
3
⭐ 71.8K
Use appropriate iteration techniques in performance-critical code paths to minimize overhead and maximize execution s…
Performance Optimization
Share
Graph-based dependency management
3
⭐ 71.8K
When managing module dependencies in a system, treat the dependencies as a directed graph and apply appropriate graph…
Algorithms
Share
Secure authentication handling
3
⭐ 19K
Always implement proper authentication checks and protect sensitive credentials throughout your codebase. This includ…
Security
Share
Precise algorithm terminology
3
⭐ 19K
When implementing and documenting algorithms, use precise terminology and be explicit about metrics, operations, and …
Algorithms
Share
Performance test pragmatism
3
⭐ 19K
When designing performance tests, focus on efficiency and meaningful insights rather than exhaustive combinations. Co…
Performance Optimization
Share
Optimize data structures
3
⭐ 19K
When implementing algorithms, prioritize data structure choices that minimize resource usage while maintaining functi…
Algorithms
Share
Handle all error paths
3
⭐ 19K
Ensure comprehensive error handling throughout the codebase by implementing proper error handling blocks, defensive v…
Error Handling
Share
Guard against race conditions
3
⭐ 19K
When working with concurrent operations, always implement proper guards to prevent race conditions between processes….
Concurrency
Share
Extract and reuse
3
⭐ 19K
Create focused utility functions for repeated or complex operations instead of duplicating logic across the codebase….
Code Style
Share
Environment-specific config defaults
3
⭐ 19K
Define appropriate configuration defaults for different environments (development, testing, production) using dedicat…
Configurations
Share
Document API specs completely
3
⭐ 19K
When designing and implementing APIs, always provide comprehensive specifications that clearly document all endpoints…
API
Share
Database before memory
3
⭐ 19K
When working with database systems that also maintain in-memory state, always update the persistent database state be…
Database
Share
Configuration context alignment
3
⭐ 19K
Choose the appropriate configuration context based on how changes will be handled by the system. When defining custom…
Configurations
Share
Configurable cache parameters
3
⭐ 19K
Cache configurations should be runtime-configurable rather than hardcoded, with support for dynamic resizing when con…
Caching
Share
Cache performance preservation
3
⭐ 19K
When implementing database failover or restart mechanisms, ensure performance consistency by preserving and prewarmin…
Database
Share
Avoid flaky tests
3
⭐ 19K
Tests should be designed to be deterministic and reliable to prevent wasted developer time and false confidence.
Tw…
Testing
Share
Adaptive cache expiration strategy
3
⭐ 19K
Design cache expiration policies that align with actual workload patterns rather than arbitrary timeframes. For syste…
Caching
Share
Use explicit optional types
3
⭐ 20.8K
When dealing with values that may be absent or null, always use explicit optional type wrappers instead of implicit n…
Null Handling
Share
Documentation clarity and formatting
3
⭐ 20.8K
When writing documentation (README files, tutorials, API docs), ensure clarity and proper formatting:
1. **Define te…
Documentation
Share
Document environment variables
3
⭐ 20.8K
All environment variables must be documented in the central env_var.md file with clear descriptions of their purpose,…
Configurations
Share
Document API completely
3
⭐ 20.8K
Always provide comprehensive API documentation that clearly specifies:
1. **Parameter types** - Document all accepta…
API
Share
Consistent logging format
3
⭐ 20.8K
Use consistent string formatting in logging statements throughout the codebase. Prefer `%` style placeholders over f-…
Logging
Share
Centralize synchronization logic
3
⭐ 20.8K
When implementing concurrent operations, especially in heterogeneous computing environments (CPU/GPU), centralize syn…
Concurrency
Share
Centralize configuration parameters
3
⭐ 20.8K
Avoid hardcoded paths and duplicated configuration values throughout the code. Instead:
1. Use dedicated configurati…
Configurations
Share
Use design system tokens
3
⭐ 96.1K
Always use design system tokens (theme values, breakpoints, spacing units) instead of hard-coded values. This ensures…
Code Style
Share
Maintain configuration accuracy
3
⭐ 96.1K
Regularly audit configuration files to remove unused entries and ensure all configurations accurately reflect the pro…
Configurations
Share
Explicit configuration resolution
3
⭐ 96.1K
Always use explicit path resolution and document ordering requirements in configuration files to prevent environment-…
Configurations
Share
Effect hook best practices
3
⭐ 96.1K
When using React effect hooks, follow these practices to ensure predictable behavior and prevent memory leaks:
1. **…
React
Share
Document implementation decisions
3
⭐ 96.1K
Add explanatory comments for non-obvious implementation details, especially when maintaining backward compatibility o…
Documentation
Share
Defensively handle nullables
3
⭐ 96.1K
When working with values that could be null or undefined, implement defensive coding patterns to prevent runtime erro…
Null Handling
Share
Consistent component API patterns
3
⭐ 96.1K
Design component APIs with consistent patterns that promote extensibility and clear usage. Prefer generic prop struct…
API
Share
Template instantiation trade-offs
3
⭐ 1.4K
When designing algorithms that accept callbacks or function parameters, consider the trade-off between template funct…
Algorithms
Share
Reserve container capacity early
3
⭐ 1.4K
When using containers like `unordered_map`, `unordered_set`, or vectors in performance-critical code, always pre-allo…
Performance Optimization
Share
Prefer values over pointers
3
⭐ 1.4K
When designing classes and interfaces, prefer passing lightweight objects by value rather than using raw pointers or …
Null Handling
Share
Group related properties
3
⭐ 1.4K
Design APIs by organizing related properties into purpose-specific structures rather than flat parameter lists. This …
API
Share
Externalize configuration values
3
⭐ 1.4K
Use environment variables and external configuration mechanisms instead of hard-coding values in build scripts. This …
Configurations
Share
Externalize config values
3
⭐ 1.4K
Replace hardcoded “magic numbers” and environment-specific logic with externally configurable values. Use preprocesso…
Configurations
Share
DRY class hierarchies
3
⭐ 1.4K
Follow the Don’t Repeat Yourself (DRY) principle when designing class hierarchies. Extract common functionality into …
Code Style
Share
Design evolution-ready APIs
3
⭐ 1.4K
Design APIs that are both explicit in their usage and provide clear evolution paths. When designing APIs:
1. Prefer …
API
Share
Cross-platform CI validation
3
⭐ 1.4K
Always verify that code changes work across all CI platforms before submitting. When addressing a CI issue for one pl…
CI/CD
Share
Validate environment variables strictly
3
⭐ 13.6K
Implement comprehensive validation for environment variables using a schema validation library (e.g., Zod). Include p…
Configurations
Share
Standardize configuration values
3
⭐ 13.6K
Always standardize configuration values to ensure consistency, reproducibility, and maintainability:
1. **Pin specif…
Configurations
Share
Semantically correct status
3
⭐ 13.6K
Use HTTP status codes that accurately reflect the outcome of API operations. This improves API clarity and allows cli…
API
Share
Secure external links
3
⭐ 13.6K
Always add `rel=”noopener noreferrer”` to external links that use `target=”_blank”` to prevent tabnabbing attacks. Th…
Security
Share
Ensure algorithmic precision
3
⭐ 13.6K
When implementing algorithms, ensure they perform exactly the operations needed without introducing unintended side e…
Algorithms
Share
Document data constraints
3
⭐ 13.6K
Explicitly document all input and output constraints directly in API definitions. For inputs, specify validation rule…
API
Share
Database migration best practices
3
⭐ 13.6K
When implementing database schema changes, follow these migration best practices to maintain data integrity and ensur…
Migrations
Share
Consistent database naming
3
⭐ 13.6K
Maintain consistent naming patterns across all database objects. Ensure that:
1. Related object names are aligned (e…
Naming Conventions
Share
Documentation completeness check
3
⭐ 15K
Ensure all documentation is complete, well-formatted, and maximally useful for developers. This includes:
1. **Use p…
Documentation
Share
Constructor over setter
3
⭐ 15K
Prefer passing configuration through constructor parameters rather than setting properties after instantiation. This …
API
Share
Consistent naming conventions
3
⭐ 15K
Maintain consistent and explicit naming conventions across your codebase that reflect:
1. **Component dependencies**…
Naming Conventions
Share
Consistent AI naming
3
⭐ 15K
Use specific and consistent naming conventions when referencing AI services, models, and their parameters throughout …
AI
Share
Chunked data processing
3
⭐ 15K
When processing large arrays or data structures, implement chunked processing to avoid stack size limitations and opt…
Algorithms
Share
AI dependency management
3
⭐ 15K
When integrating AI models and language processing libraries, follow these dependency management best practices:
1. …
AI
Share
Use table-driven tests
3
⭐ 15.1K
In Go, prefer table-driven tests over multiple separate test functions. Table tests allow for concise testing of mult…
Testing
Share
Use snake_case in Python
3
⭐ 15.1K
Follow Python’s PEP 8 naming convention by using snake_case for variables, functions, and methods rather than camelCa…
Naming Conventions
Share
Use appropriate log levels
3
⭐ 15.1K
Always match logging levels to the message’s purpose and severity. Use log.Info for general information, log.Warn for…
Logging
Share
Structured OWNERS files
3
⭐ 15.1K
OWNERS files must follow project documentation standards to properly reflect component ownership and maintainership. …
Documentation
Share
Standardize build configurations
3
⭐ 15.1K
All components should use consistent build configurations and patterns in their CI/CD setup. This includes standardiz…
CI/CD
Share
Specific network access documentation
3
⭐ 15.1K
When documenting network access methods or service connections, always provide specific commands with explicit ports …
Networking
Share
Normalize URL paths
3
⭐ 15.1K
When handling URLs in web applications, consistently normalize path formats to prevent routing and service communicat…
Networking
Share
Mark UI text i18n
3
⭐ 15.1K
All user-facing text in HTML templates should be marked for internationalization using the i18n directive. This inclu…
Documentation
Share
Manage configuration changes
3
⭐ 15.1K
Carefully manage configuration file changes to ensure consistency and minimize unintended impacts across your project…
Configurations
Share
Environment-aware configuration design
3
⭐ 15.1K
Design configurations that work consistently across different environments without requiring environment-specific mod…
Configurations
Share
Document with precision
3
⭐ 15.1K
Write informative, consistent, and precise code comments throughout your codebase. When documenting code:
1. **Be sp…
Documentation
Share
Check before use
3
⭐ 15.1K
Always validate that objects, maps, and other reference types are non-nil before attempting to use them. Use early ni…
Null Handling
Share
Standardize build configurations
3
⭐ 50.9K
Maintain consistent and standardized build configurations across the project to improve maintainability and reduce er…
Configurations
Share
Type over primitives
3
⭐ 30.3K
Use domain-specific types instead of primitives (like strings, []byte, or generic maps) to represent domain concepts …
Algorithms
Share
Secure token lifecycle
3
⭐ 30.3K
Implement comprehensive lifecycle controls for authentication tokens to maintain security throughout token creation, …
Security
Share
Explicit security parameters
3
⭐ 30.3K
Security-critical features should be implemented as required parameters rather than optional parameters or option fun…
Security
Share
Document complete data flows
3
⭐ 30.3K
When documenting database systems, ensure all documentation includes complete end-to-end data flows. Both diagrams an…
Database
Share
Complete schema management
3
⭐ 30.3K
When working with database systems that have flexible schemas (like InfluxDB), ensure complete schema discovery and p…
Database
Share
Sanitize external content
3
⭐ 8.3K
Always sanitize and validate external content before processing or rendering it to prevent security vulnerabilities l…
Security
Share
Remove commented out code
3
⭐ 8.3K
Delete commented-out code instead of retaining it in the codebase. Commented code creates confusion, adds maintenance…
Code Style
Share
Next.js async behavior
3
⭐ 8.3K
Understand and correctly implement the asynchronous behavior of Next.js APIs and components. Follow these guidelines:…
Next
Share
Guard against null chains
3
⭐ 8.3K
Prevent null pointer exceptions by validating object chains before accessing nested properties. Use early returns wit…
Null Handling
Share
Externalize configuration values
3
⭐ 8.3K
Configuration files should not contain hardcoded values for usernames, credentials, hostnames, or environment-specifi…
Configurations
Share
Database type best practices
3
⭐ 8.3K
Select appropriate data types and defaults for database columns to ensure data integrity and simplify application cod…
Database
Share
Proper mocking techniques
3
⭐ 68.8K
Use appropriate mocking approaches for different dependencies in tests to ensure accurate test results and prevent fa…
Testing
Share
Optimize hot paths
3
⭐ 68.8K
Identify and optimize frequently executed code paths by moving invariant calculations and conditional logic outside o…
Algorithms
Share
Measure before optimizing
3
⭐ 68.8K
Performance optimizations should be validated with measurements rather than assumptions. When implementing performanc…
Performance Optimization
Share
Maintain API version compatibility
3
⭐ 68.8K
When implementing or modifying APIs, ensure backward compatibility across versions and client interfaces. Carefully e…
API
Share
Graceful feature availability
3
⭐ 68.8K
When implementing configurable features, ensure they degrade gracefully based on environment conditions like feature …
Configurations
Share
Feature toggle lifecycle
3
⭐ 68.8K
When working with feature toggles and configuration flags, manage their entire lifecycle carefully to prevent breakin…
Configurations
Share
Design token value consistency
3
⭐ 68.8K
When implementing design tokens in code, ensure values accurately represent the intended visual outcome, even if desi…
Code Style
Share
Complete configuration fields
3
⭐ 68.8K
Ensure all plugin configuration files include the complete set of required fields specific to their plugin type. Miss…
Configurations
Share
Write resilient tests
3
⭐ 83K
Tests should be designed to validate behavior without being brittle or sensitive to implementation details. Avoid dir…
Testing
Share
Use standard API constants
3
⭐ 83K
Always use standard library constants for HTTP methods and status codes rather than string literals or numeric values…
API
Share
Precompute over recalculate
3
⭐ 83K
Perform expensive calculations during initialization rather than on each request, and avoid unnecessary operations in…
Performance Optimization
Share
Early return pattern
3
⭐ 83K
Prefer returning early from functions rather than nesting conditions. When a condition can lead to an early exit, han…
Code Style
Share
Configuration file precision
3
⭐ 83K
Ensure configuration files are precisely maintained with correct syntax and compatible version declarations. This inc…
Configurations
Share
Prefer safe optional handling
3
⭐ 32.9K
Always use Swift’s built-in mechanisms for safely handling optional values instead of force unwrapping or manual nil …
Null Handling
Share
Encapsulate implementation details
3
⭐ 32.9K
When designing APIs, create appropriate abstractions that hide platform-specific or low-level implementation details …
API
Share
Define explicit error sets
3
⭐ 32.9K
Always define explicit error sets for functions that can fail, rather than using inferred error sets. This makes erro…
Error Handling
Share
Centralize configuration values
3
⭐ 32.9K
Hardcoded configuration values scattered throughout codebases create maintenance burdens and increase the risk of inc…
Configurations
Share
Centralize configuration management
3
⭐ 32.9K
Avoid hardcoded or duplicated configuration values by centralizing them in a dedicated location. When configurations …
Configurations
Share
Consistent Fastify Integration Patterns
3
⭐ 34K
When implementing integrations and plugins using the Fastify framework, maintain consistent coding patterns and conve…
Fastify
Share
Standardize version transitions
3
⭐ 86.9K
When supporting multiple library versions or preparing for version deprecation in configuration-dependent code, use s…
Configurations
Share
Secure JWT authentication
3
⭐ 86.9K
Implement secure authentication using JWT tokens by following these best practices:
1. **Use secure libraries**: Pre…
Security
Share
Proper response handling
3
⭐ 86.9K
When designing APIs, ensure responses adhere to HTTP semantics by:
1. Using semantic status code constants instead o…
API
Share
Preserve unset field values
3
⭐ 86.9K
When implementing partial updates in FastAPI, use the `exclude_unset` parameter in Pydantic’s `.dict()` or `.model_du…
Null Handling
Share
Explicit exception propagation
3
⭐ 86.9K
Always be explicit about how exceptions are handled, propagated, and recovered from in your code. When catching excep…
Error Handling
Share
Structured release workflows
3
⭐ 67.3K
Implement a clearly defined release strategy that distinguishes between different types of changes. Create separate w…
CI/CD
Share
Purposeful style changes
3
⭐ 67.3K
Code style modifications should accompany functional improvements rather than being submitted as standalone changes. …
Code Style
Share
Implement least privilege
3
⭐ 67.3K
Apply the principle of least privilege for all repository and system access to enhance security. Each role should be …
Security
Share
Stage intensive operations carefully
3
⭐ 73.1K
When implementing operations that consume significant system resources (CPU, memory, I/O), introduce changes graduall…
Performance Optimization
Share
Scope and document configurations
3
⭐ 73.1K
When designing and implementing configuration options, carefully consider two key aspects:
1. **Choose appropriate c…
Configurations
Share
Design for evolution
3
⭐ 73.1K
When designing APIs, prioritize flexibility and independent evolution of components. Avoid tightly coupling related s…
API
Share
Validate security-related inputs
3
⭐ 84.2K
Always validate and sanitize all inputs that influence security-related functionality at the application level, rathe…
Security
Share
Validate configuration changes
3
⭐ 84.2K
Before modifying default configuration settings, thoroughly understand and test their implications. Django’s default …
Configurations
Share
Transaction-aware task enqueuing
3
⭐ 84.2K
When working with background tasks that depend on database changes, ensure tasks are enqueued only after the related …
Celery
Share
Prefer semantic CSS selectors
3
⭐ 84.2K
Use semantic attribute-based selectors instead of structural or overly specific class names when the semantic meaning…
Code Style
Share
Feature flags over vendors
3
⭐ 84.2K
When checking for database backend capabilities, always use feature flags rather than checking specific vendor names….
Configurations
Share
Fail predictably, loudly
3
⭐ 84.2K
Design APIs that fail explicitly and predictably when used incorrectly. When an operation is attempted in an inapprop…
API
Share
Document accessibility decisions
3
⭐ 84.2K
When implementing HTML templates, add clear comments documenting accessibility-related decisions. Explain the purpose…
Documentation
Share
Consider related object cleanup
3
⭐ 84.2K
When implementing migration operations that modify or remove database objects like fields and models, ensure all rela…
Migrations
Share
Break lines for readability
3
⭐ 84.2K
Format code with semantic line breaks that enhance readability rather than adhering strictly to character limits. Whe…
Code Style
Share
Async resource cleanup guarantees
3
⭐ 84.2K
When implementing async context managers, always ensure proper resource cleanup even during task cancellation. Use tr…
Concurrency
Share
Use appropriate logging levels
3
⭐ 14K
Reserve logging statements for their appropriate purposes and levels. Use debugging-level logs (`sd_debug`) for devel…
Logging
Share
Parameterize configuration scripts
3
⭐ 14K
Configuration scripts should use variables for values that might change or are used in multiple places, such as paths…
Configurations
Share
Eliminate redundant code
3
⭐ 14K
Keep code clean by removing all forms of redundancy that affect readability and maintainability. This includes:
1. A…
Code Style
Share
Clear descriptive identifiers
3
⭐ 14K
Choose clear, self-descriptive names for all code identifiers that accurately reflect their purpose and behavior. Met…
Naming Conventions
Share
Avoid environment-specific paths
3
⭐ 14K
Always use environment variables or configuration mechanisms instead of hardcoding paths to compilers, tools, or dire…
Configurations
Share
Always secure your locks
3
⭐ 14K
When using locks or other synchronization mechanisms in concurrent code, always release locks in a finally block to e…
Concurrency
Share
Validate configurations up front
3
⭐ 33.9K
Always validate configuration parameters and environment variables at initialization time, providing clear error mess…
Configurations
Share
Typed API client abstractions
3
⭐ 33.9K
When designing API clients, encapsulate responses in typed objects rather than passing raw JSON throughout your codeb…
API
Share
Thread safety first
3
⭐ 33.9K
When implementing features that may run concurrently, always ensure thread safety using appropriate synchronization m…
Concurrency
Share
Test behavior not calls
3
⭐ 33.9K
Tests should validate actual system behavior rather than just verifying method calls. When writing tests, focus on as…
Testing
Share
Explicit over implicit
3
⭐ 33.9K
Always explicitly configure important system components rather than relying on implicit defaults or environment varia…
Configurations
Share
Clear AI component interfaces
3
⭐ 33.9K
When designing AI components and tools, use domain-specific terminology and provide clear interface documentation to …
AI
Share
Vue component type safety
3
⭐ 50.8K
When defining Vue components with TypeScript, use appropriate component definition patterns to ensure proper type inf…
Vue
Share
Use environment flags consistently
3
⭐ 50.8K
Feature flags like `__DEV__` and `__COMPAT__` are critical configuration mechanisms that control environment-specific…
Configurations
Share
Lifecycle effects management
3
⭐ 50.8K
Properly manage component lifecycle effects and cleanup in React components to prevent memory leaks and performance i…
React
Share
Standardize shell flags
3
⭐ 7.9K
Always use `set -eou pipefail` at the beginning of shell scripts to ensure consistent error handling and behavior acr…
Code Style
Share
Remove commented code
3
⭐ 7.9K
Avoid leaving commented-out code in the codebase. Version control systems already track the history of changes, makin…
Code Style
Share
Fail fast principle
3
⭐ 7.9K
Design CI/CD pipelines to fail quickly and visibly rather than masking errors through excessive retries or complex co…
CI/CD
Share
Clear abstraction boundaries
3
⭐ 7.9K
Design APIs with clear and consistent abstraction boundaries to maintain code quality and prevent interface leakage b…
API
Share
Validate configurations correctly
3
⭐ 7.7K
When writing validation logic for configurations, ensure you’re using the appropriate operators that correctly test f…
Configurations
Share
Support all target environments
3
⭐ 7.7K
When managing dependency configurations (Pipfiles, requirements.txt, lock files), ensure compatibility with all suppo…
Configurations
Share
Comprehensive security scanning
3
⭐ 7.7K
Always configure security scanning tools with comprehensive coverage and readable output to maximize vulnerability de…
Security
Share
Backward compatible parameters
3
⭐ 7.7K
When evolving API function signatures, maintain backward compatibility by making new parameters optional with sensibl…
API
Share
Verify assertions properly
3
⭐ 79.1K
Ensure test assertions correctly validate the intended behavior by:
1. **Awaiting promise assertions** when testing …
Testing
Share
Technical documentation accuracy
3
⭐ 79.1K
Documentation must precisely reflect the current state of the codebase to prevent confusion and ensure developers can…
Documentation
Share
Respect existing configurations
3
⭐ 79.1K
When integrating with external services or tools, design your configuration options to respect users’ existing enviro…
Configurations
Share
Never swallow errors
3
⭐ 79.1K
Always ensure errors are properly surfaced rather than silently ignored. Silent error handling can lead to confusing …
Error Handling
Share
Maintain portable config values
3
⭐ 79.1K
Always use portable, environment-agnostic values in configuration files. Avoid hardcoded absolute paths, system-speci…
Configurations
Share
Deterministic lock management
3
⭐ 79.1K
Always ensure locks are acquired and released in a deterministic manner in concurrent code. Use `defer` statements im…
Concurrency
Share
Use ASCII-only URLs
3
⭐ 44.2K
URLs in code should exclusively use ASCII characters for maximum security and compatibility. This prevents potential …
Networking
Share
Structure test fixtures clearly
3
⭐ 44.2K
Test fixtures should clearly separate input parameters from expected outputs to enhance readability and maintainabili…
Testing
Share
Secure API URL parsing
3
⭐ 44.2K
When parsing API endpoint URLs, implement rigorous input validation using precise regular expressions. This includes:…
API
Share
Prevent injection vulnerabilities
3
⭐ 44.2K
Always sanitize input data before using it in sensitive operations to prevent injection vulnerabilities. This applies…
Security
Share
Fail with messages
3
⭐ 44.2K
Functions and scripts should never fail silently. When detecting error conditions, always provide clear error message…
Error Handling
Share
Environment variable safety
3
⭐ 44.2K
When configuring environment variables, especially those related to paths, implement these safety practices:
1. Vali…
Configurations
Share
Document non-obvious decisions
3
⭐ 44.2K
Always add clear comments explaining non-obvious code decisions such as magic numbers, arbitrary values, truncation l…
Documentation
Share
Document CI pipeline comprehensively
3
⭐ 44.2K
Ensure CI/CD pipeline documentation accurately reflects the complete workflow, including job dependencies, execution …
CI/CD
Share
Manage test environments
3
⭐ 9.4K
When writing tests that interact with environment variables or configuration settings, always (1) preserve the origin…
Configurations
Share
Demonstrate canonical API patterns
3
⭐ 9.4K
Always provide examples that demonstrate the recommended and most current API usage patterns. This includes:
1. Usin…
API
Share
Consistent naming standards
3
⭐ 9.4K
Follow standard Python naming conventions consistently throughout code and documentation. Use underscores instead of …
Naming Conventions
Share
Avoid hidden performance costs
3
⭐ 9.4K
When designing APIs that interact with remote services, be cautious about implementing convenience features that may …
Performance Optimization
Share
Surface errors appropriately
3
⭐ 5.8K
Ensure errors are visible and properly handled rather than silently processed or hidden. Provide mechanisms for devel…
Error Handling
Share
Prefer identity-based authentication
3
⭐ 5.8K
Always prioritize modern identity-based authentication methods over traditional username/password credentials. This i…
Security
Share
Follow formatting standards
3
⭐ 5.8K
Maintain consistent code formatting by adhering to the defined standards in the .editorconfig file and Azure SDK impl…
Code Style
Share
Descriptive consistent identifiers
3
⭐ 5.8K
Use clear, descriptive identifiers that accurately reflect their purpose, and maintain consistent naming patterns thr…
Naming Conventions
Share
Centralize pipeline configurations
3
⭐ 5.8K
Use centralized templates and variables for pipeline configurations instead of duplicating or hardcoding values. This…
CI/CD
Share
Document feature flags
3
⭐ 22.1K
When configuring feature flags in Cargo.toml, ensure they are properly structured and documented. Chain feature depen…
Configurations
Share
Proper Axios Configuration and Usage
3
⭐ 107K
When implementing code that uses the Axios library in TypeScript, it is important to follow best practices for config…
Axios
Share
Consistent Naming Conventions for Axios Requests and Responses
3
⭐ 107K
When using the Axios library in TypeScript, it is important to follow consistent naming conventions to improve code r…
Axios
Share
Configuration property standards
3
⭐ 107K
Always define configuration properties with sensible defaults and consistent naming conventions. When adding new conf…
Configurations
Share
Validate configurations with clarity
3
⭐ 7.6K
Configuration validation should use explicit checks and clear conditional logic to improve code readability and preve…
Configurations
Share
Test configuration precedence
3
⭐ 7.6K
When implementing systems that load configuration from multiple sources, always test the precedence rules explicitly …
Configurations
Share
Limit cache size
3
⭐ 7.6K
Always implement size constraints on caches to prevent memory leaks and performance degradation. Unbounded caches can…
Caching
Share
Follow established testing patterns
3
⭐ 7.6K
When writing tests, use existing patterns and infrastructure already established in the codebase rather than creating…
Testing
Share
Explicit verified configurations
3
⭐ 7.6K
Always specify configuration values explicitly and verify their accuracy against official documentation or tests. Thi…
Configurations
Share
Document APIs completely
3
⭐ 7.6K
Always provide complete, clear, and contextually rich documentation for all public APIs. Documentation should:
1. Us…
Documentation
Share
Follow naming conventions
3
⭐ 40.9K
Use proper naming conventions to make code more readable and maintainable:
1. **Functions should start with verbs** …
Naming Conventions
Share
Enforce authentication boundaries
3
⭐ 40.9K
Implement strict authentication boundaries and access controls to prevent security vulnerabilities:
1. When multiple…
Security
Share
Document intentional choices
3
⭐ 40.9K
Add explanatory comments for non-obvious code decisions that might appear incorrect, unusual, or suboptimal to future…
Documentation
Share
Validate pattern matching
3
⭐ 15.6K
When implementing algorithms that involve pattern matching or data parsing, ensure robustness across all edge cases a…
Algorithms
Share
Test before documenting
3
⭐ 15.6K
Always thoroughly test API features and endpoints before documenting them, especially when integrating with third-par…
API
Share
Provide actionable examples
3
⭐ 15.6K
Documentation should include concrete, executable code examples rather than vague instructions. Make your examples co…
Documentation
Share
Document configuration decisions
3
⭐ 15.6K
When modifying configuration files (package.json, tsconfig.json, etc.), document the reasoning behind significant cha…
Configurations
Share
Async error callbacks
3
⭐ 15.6K
When handling asynchronous operations, especially those that might continue running in the background after the main …
Error Handling
Share
Proper documentation linking
2
⭐ 62.1K
Documentation should use appropriate linking strategies to ensure content remains accessible and navigable across all…
Documentation
Share
Precise test pattern matching
2
⭐ 62.1K
When identifying test patterns in code, use specific equality predicates (`#eq?`) instead of list inclusion predicate…
Testing
Share
Minimize credential exposure lifetime
2
⭐ 62.1K
Credentials and secrets should never be stored persistently in memory or written to files. Instead, use ephemeral pat…
Security
Share
Explicit over implicit
2
⭐ 62.1K
When designing APIs, prioritize explicit parameter identification over implicit context. APIs with clear, unambiguous…
API
Share
Document configuration clearly
2
⭐ 62.1K
When adding or modifying configuration parameters, especially in JSON settings files, ensure they are clearly documen…
Code Style
Share
Optimize tensor memory operations
2
⭐ 51.7K
When working with PyTorch tensors, use memory-efficient operations that avoid unnecessary copies. Specify memory form…
Pytorch
Share
Optimize GPU execution
2
⭐ 51.7K
Ensure GPU code is optimized for both proper thread utilization and correct architecture dispatching:
1. **Maximize …
Performance Optimization
Share
Match reference names
2
⭐ 51.7K
Ensure that filenames and paths referenced in scripts, commands, or configuration files exactly match the actual name…
Naming Conventions
Share
Environment-aware configuration values
2
⭐ 51.7K
When creating configuration files or defining configuration constants, ensure they properly adapt to different enviro…
Configurations
Share
Combine identical CSS
2
⭐ 51.7K
When multiple CSS selectors share identical styling properties, combine them using comma separation rather than dupli…
Code Style
Share
AI model persistence
2
⭐ 51.7K
When containerizing AI applications, ensure proper model persistence by mounting volumes to the default cache locatio…
AI
Share
Validate environment configurations
2
⭐ 19.8K
Ensure that all environment-specific configurations work properly across all target environments, particularly when m…
Configurations
Share
Size fields appropriately
2
⭐ 19.8K
When designing database schemas, choose field types and sizes that accommodate both current and anticipated future da…
Database
Share
Pin environment versions
2
⭐ 19.8K
Always use explicit version tags for CI/CD environments (runners, containers, images, tool versions) instead of float…
CI/CD
Share
Manage workflow state transitions
2
⭐ 19.8K
When working with temporal workflows, always implement explicit state transitions rather than abrupt deletions. Workf…
Temporal
Share
Justify CI resource additions
2
⭐ 19.8K
Before adding new resources (Dockerfiles, jobs, images) to CI/CD pipelines, provide clear justification for their nec…
CI/CD
Share
Document configuration precedence
2
⭐ 19.8K
When implementing multiple configuration methods (e.g., config files, command-line flags, environment variables), cle…
Configurations
Share
Database configuration best practices
2
⭐ 19.8K
When implementing or modifying database-related configurations, follow these principles:
1. Use semantically appropr…
Database
Share
Consistent database APIs
2
⭐ 19.8K
Design database APIs with consistent patterns for response structures and error handling. Follow established conventi…
Database
Share
Clear metric documentation
2
⭐ 19.8K
When adding, modifying, or deprecating metrics, ensure comprehensive and clear documentation. Include:
1. Descriptiv…
Observability
Share
Avoid skipping e2e tests
2
⭐ 19.8K
Do not use the `skip_e2e` flag to bypass end-to-end tests that fail. Instead, fix the test implementation by providin…
Testing
Share
Vue component import handling
2
⭐ 74K
When working with Vue single-file components, pay special attention to how imports are processed, particularly with q…
Vue
Share
Targeted yet comprehensive
2
⭐ 74K
Write focused tests that verify specific functionality without unnecessary setup, while still ensuring complete cover…
Testing
Share
Separate configuration responsibilities
2
⭐ 74K
Design configuration files with clear separation of responsibilities and maintain flexibility for future changes. Avo…
Configurations
Share
Self-referential worker URLs
2
⭐ 74K
When creating Web Workers for network communication, use self-referential URL patterns that are resilient to file ren…
Networking
Share
React transformation tool clarity
2
⭐ 74K
When working with React in Vite projects, be precise about which transformation tools (Babel, SWC, Oxc, esbuild) hand…
React
Share
Precise documentation language
2
⭐ 74K
Use specific and clear language in all documentation to improve user understanding and avoid ambiguity. Favor precise…
Documentation
Share
Explicit version requirements
2
⭐ 74K
Always specify explicit Node.js version requirements in configuration files to ensure compatibility with language fea…
Configurations
Share
Document protocol configurations clearly
2
⭐ 74K
When documenting network protocol configurations (TLS, HTTP/2, CORS), provide specific details about required options…
Networking
Share
Configure SSR environments
2
⭐ 74K
When implementing server-side rendering in Next.js projects that use Vite as a bundler, ensure proper environment sep…
Next
Share
Complete deployment commands
2
⭐ 74K
Always ensure build commands in CI/CD configurations include all necessary steps for successful deployment, particula…
CI/CD
Share
Code example consistency
2
⭐ 74K
Ensure code examples in documentation and comments are syntactically correct and properly marked with the appropriate…
Code Style
Share
Clean network resources
2
⭐ 74K
Always properly close and clean up network connections to prevent memory leaks and resource exhaustion. When establis…
Networking
Share
Test deployment edge cases
2
⭐ 60.3K
Ensure that code paths handling different deployment environments (installation prefixes, target directories, etc.) h…
Testing
Share
Optimize docker build caching
2
⭐ 60.3K
Leverage Docker BuildKit’s cache and bind mount capabilities to dramatically improve CI build times and reduce image …
CI/CD
Share
Document build configurations
2
⭐ 60.3K
When setting Rust build configurations, especially in CI/Docker environments, explicitly document optimization choice…
Configurations
Share
Cache sharing strategy
2
⭐ 60.3K
When implementing caching in build systems, carefully configure cache sharing behavior based on your concurrency requ…
Caching
Share
Avoid unnecessary constraints
2
⭐ 60.3K
When specifying dependencies and version requirements in project configuration files, avoid adding unnecessary constr…
Configurations
Share
Use concise methods
2
⭐ 90.6K
Prefer built-in methods and properties that achieve the same result with less code. This improves readability, reduce…
Code Style
Share
Preprocess data early
2
⭐ 90.6K
Transform and prepare data structures at their source rather than during consumption. This includes flattening nested…
Algorithms
Share
Optimize documentation for usability
2
⭐ 90.6K
When creating component documentation, prioritize the developer experience by providing clear, usable examples and co…
Documentation
Share
Consistent import paths
2
⭐ 90.6K
Establish and follow consistent import path conventions throughout the codebase. Prefer aliased imports using the pro…
Code Style
Share
Verify test commands
2
⭐ 28.1K
Always verify that test commands documented in project guides work exactly as written. Test commands should be copy-p…
Testing
Share
Use workspace dependencies consistently
2
⭐ 28.1K
Always use workspace-level dependency declarations (`workspace = true`) rather than specifying exact versions in indi…
Configurations
Share
Use JSDoc deprecation standards
2
⭐ 28.1K
When marking code as deprecated, use JSDoc standards to provide clear guidance for developers. Always use the `@depre…
Documentation
Share
Use environment-aware configurations
2
⭐ 28.1K
Configure paths and system references dynamically to ensure they work across all environments (development, testing, …
Configurations
Share
Link terms, provide examples
2
⭐ 28.1K
When writing technical documentation, link to related concepts the first time they are mentioned, and include concret…
Documentation
Share
Hybrid monorepo testing
2
⭐ 28.1K
When working with tests in a monorepo, implement a hybrid testing approach that balances local development experience…
Testing
Share
Handle errors appropriately
2
⭐ 28.1K
Implement appropriate error handling strategies based on the criticality of operations. For non-critical operations t…
Error Handling
Share
Graceful error recovery
2
⭐ 28.1K
Implement error handling that accumulates diagnostics rather than failing immediately, especially for operations that…
Error Handling
Share
Framework-specific entrypoints organization
2
⭐ 28.1K
When creating libraries that integrate with Next.js or other frameworks, organize your code with separate entrypoints…
Next
Share
Design for testability
2
⭐ 28.1K
Extract complex logic into separate, pure functions to improve testability. Functions with clear inputs and outputs a…
Testing
Share
Consider config generation methods
2
⭐ 28.1K
When implementing code to handle configuration files like lockfiles or environment settings, carefully consider the t…
Configurations
Share
Test production configurations too
2
⭐ 29K
Include testing configurations that mirror production environments to catch issues that might only manifest in releas…
Testing
Share
Test diverse configurations
2
⭐ 29K
Configure test suites to run under multiple specialized environments to catch issues that might not appear in standar…
Testing
Share
Simplify configuration flags
2
⭐ 29K
Keep configuration flags, feature toggles, and build settings concise and well-organized. Use simpler names where app…
Configurations
Share
Version AI dependencies appropriately
2
⭐ 9.9K
When adding or updating dependencies for AI/ML libraries in your project, follow these two key practices:
1. **Set a…
AI
Share
Use explicit assertions
2
⭐ 9.9K
Tests should assert specific expected values rather than just verifying general functionality. This practice makes te…
Testing
Share
Test algorithmic behavior
2
⭐ 9.9K
When testing algorithms, verify their actual functionality rather than just checking for proper instantiation or prop…
Algorithms
Share
Smart configuration defaults
2
⭐ 9.9K
Prefer smart configuration defaults that auto-detect the environment instead of requiring explicit configuration flag…
Configurations
Share
Robust workflow configurations
2
⭐ 9.9K
Ensure CI/CD workflow configuration files follow best practices for maintainability and correctness:
1. Use centrali…
Configurations
Share
Prioritize tokenizer simplicity
2
⭐ 9.9K
When implementing AI model components like tokenizers, favor simplicity over rarely-used features that significantly …
AI
Share
Flexible tokenizer implementation
2
⭐ 9.9K
When implementing tokenizers for AI models, ensure flexibility and robust behavior across different contexts:
1. Ini…
AI
Share
Document for comprehension
2
⭐ 9.9K
Add comprehensive documentation that helps others understand both the interface and implementation of your code. This…
Documentation
Share
Consistent API design
2
⭐ 9.9K
When designing and modifying APIs, ensure consistency in parameter naming, default values, and which functionality is…
API
Share
Secure checkout configurations
2
⭐ 45.5K
When configuring GitHub Actions workflows, pay special attention to the checkout action’s configuration to ensure bot…
CI/CD
Share
Explicit dependency graph
2
⭐ 45.5K
When implementing algorithms involving dependencies between components or operations, model the dependency graph expl…
Algorithms
Share
Descriptive migration functions
2
⭐ 45.5K
Name migration-related functions descriptively to convey their exact purpose and context of use. Include detailed doc…
Migrations
Share
Verify platform compatibility first
2
⭐ 190.6K
When writing networking code that interacts with platform-specific features, always check for the existence of platfo…
Networking
Share
Use modern assertions
2
⭐ 190.6K
Always use current assertion methods in test code to ensure clarity and future compatibility. Specifically, replace d…
Testing
Share
Secure infrastructure maintenance
2
⭐ 190.6K
Maintain CI/CD infrastructure with security and currency as top priorities. This includes:
1. **Keep build tools upd…
CI/CD
Share
Parameterize ci/cd scripts
2
⭐ 190.6K
Avoid duplicating CI/CD scripts by leveraging configuration files and parameterization instead of creating multiple s…
CI/CD
Share
Framework migration instructions
2
⭐ 190.6K
When documenting AI framework migrations (like TensorFlow/Keras version changes), provide complete instructions cover…
AI
Share
Format lines and comments
2
⭐ 190.6K
Ensure all code follows formatting guidelines for readability and consistency. Keep lines under 80 characters, splitt…
Code Style
Share
Document non-obvious code
2
⭐ 190.6K
Add clarifying comments to improve code readability and maintainability when code behavior isn’t immediately obvious….
Documentation
Share
Consistent variable naming
2
⭐ 190.6K
Use ALL_CAPS for constants and environment variables in shell scripts, and reference these variables consistently thr…
Naming Conventions
Share
Build dependency synchronization
2
⭐ 190.6K
When adding new imports to code files, always synchronize by updating the corresponding dependencies in BUILD files. …
Configurations
Share
Be explicit in references
2
⭐ 190.6K
When writing documentation, always be specific and explicit when referring to files, tools, configurations, or other …
Documentation
Share
Swift style consistency
2
⭐ 6.1K
Maintain consistent Swift style conventions throughout all code, including examples in documentation and comments. Fo…
Code Style
Share
Minimize cross-device transfers
2
⭐ 6.1K
Data transfers between different compute devices (CPU/host to GPU/accelerator and back) can significantly impact perf…
Performance Optimization
Share
Follow Swift conventions
2
⭐ 6.1K
When designing and documenting APIs in Swift, adhere to Swift’s established naming conventions and documentation prac…
API
Share
Verify operation semantics
spring-projects/spring-framework
2
⭐ 58.4K
When implementing algorithms that process collections or use conditional logic, always verify the exact semantics of …
Algorithms
Share
Use documentation features properly
spring-projects/spring-framework
2
⭐ 58.4K
Utilize Asciidoc features correctly when writing or updating Spring Framework documentation. Instead of hardcoded lin…
Documentation
Share
Structured log message quality
2
⭐ 77.6K
Design log messages to be clear, concise, and properly structured to maximize their utility for debugging and monitor…
Logging
Share
Stable observability components
2
⭐ 77.6K
Always use stable, production-ready versions of observability components (libraries, dependencies, and documentation …
Observability
Share
Include database-specific migration dependencies
2
⭐ 77.6K
When implementing database migrations with tools like Flyway, ensure you include the appropriate database-specific de…
Migrations
Share
Environment variables best practices
2
⭐ 77.6K
When working with environment variables in configuration files, follow these practices to ensure reliability and test…
Configurations
Share
Consistent terminology usage
2
⭐ 77.6K
When referring to technical concepts in documentation and code comments, use proper full names and consistent termino…
Naming Conventions
Share
Clear structured logging documentation
2
⭐ 77.6K
Document structured logging implementations with clarity, explicitly noting precedence rules and interactions with ot…
Logging
Share
Bean lifecycle management
2
⭐ 77.6K
When using containers and external services in Spring applications (especially with Testcontainers), declare them as …
Spring
Share
Use acks_late for reliability
2
⭐ 41.3K
Configure Celery tasks with `acks_late=True` when task reliability is critical and you prefer to risk duplicate proce…
Celery
Share
Reduce code nesting
2
⭐ 41.3K
Excessive indentation makes code harder to read and understand. Two common techniques can help flatten your code stru…
Code Style
Share
Keep testing dependencies current
2
⭐ 1.9K
Regularly update testing framework dependencies (PHPUnit, PHPStan, etc.) to maintain compatibility with your project’…
Testing
Share
Ensure test isolation
2
⭐ 1.9K
Tests should be independent and isolated from each other to prevent state leakage and ensure reliable results. When t…
Testing
Share
Dynamic error configuration
2
⭐ 1.9K
Design error handling systems that respect runtime changes to error settings rather than fixing configurations at ini…
Error Handling
Share
Document configuration comprehensively
2
⭐ 1.9K
When adding or modifying configuration options, ensure they are documented with complete context. Group related chang…
Configurations
Share
Optimize lookup operations
2
⭐ 41.3K
Choose appropriate data structures to minimize computational complexity when performing lookups. Prefer direct lookup…
Algorithms
Share
Migration model imports
2
⭐ 41.3K
When writing Django migrations, avoid importing and referencing external models directly. Django migrations use auto-…
Migrations
Share
Meaningful test design
2
⭐ 41.3K
Write tests that focus on unique edge cases and avoid redundancy. When designing test suites:
1. Consolidate similar…
Testing
Share
Use utility macros
2
⭐ 16.6K
Use predefined utility macros for common operations instead of repeating manual calculations throughout your code. Th…
Code Style
Share
Platform-aware algorithm optimization
2
⭐ 16.6K
When implementing performance-critical algorithms, design your code to detect and utilize platform-specific hardware …
Algorithms
Share
Optimize aligned SIMD operations
2
⭐ 16.6K
Always use proper memory alignment for SIMD (Single Instruction, Multiple Data) operations to maximize performance. W…
Performance Optimization
Share
Names reflect actual purpose
2
⭐ 16.6K
Name variables, properties, and functions to accurately reflect their purpose and actual usage in code, not just thei…
Naming Conventions
Share
Memory barrier pairing
2
⭐ 16.6K
When implementing low-level synchronization mechanisms in multi-threaded code, ensure that memory barriers are correc…
Concurrency
Share
Maintain configuration compatibility
2
⭐ 16.6K
When modifying configuration systems, prioritize backward compatibility unless there’s an explicit breaking change pl…
Configurations
Share
Honor API contracts
2
⭐ 16.6K
When implementing or modifying APIs, carefully preserve the historical behavior and semantic contracts of existing in…
API
Share
Feature flag implementation
2
⭐ 16.6K
When implementing feature flags, ensure consistency between runtime and compiled scenarios. Feature switches marked w…
Configurations
Share
Explicit API versioning
2
⭐ 16.6K
When extending interfaces with new methods or functionality, always implement proper versioning to ensure compatibili…
API
Share
Enable configurable instrumentation
2
⭐ 16.6K
Always provide configurable options for performance instrumentation and hardware acceleration in your codebase. These…
Performance Optimization
Share
Document non-obvious logic
2
⭐ 16.6K
Add clear comments explaining the purpose and reasoning behind complex or non-obvious code logic. Comments should exp…
Documentation
Share
Document function contracts
2
⭐ 16.6K
Always document function contracts completely, even when surrounding code lacks documentation. Include header comment…
Documentation
Share
Centralize platform configurations
2
⭐ 16.6K
Platform-specific code and API usage should be centralized in designated configuration files rather than scattered th…
Configurations
Share
Test edge cases
2
⭐ 40.6K
When writing tests, prioritize coverage of edge cases and non-standard code patterns to ensure robust functionality. …
Testing
Share
Single yield algorithm
2
⭐ 40.6K
Context managers must follow a crucial algorithmic constraint: each execution path must yield exactly once. Multiple …
Algorithms
Share
Logical content organization
2
⭐ 40.6K
Organize code and documentation logically based on functionality and dependencies. Place files in directories that re…
Code Style
Share
Clear and relevant comments
2
⭐ 40.6K
Ensure all comments in the codebase provide value and clarity rather than creating confusion. Remove comments that ar…
Code Style
Share
Write readable conditionals
2
⭐ 237K
Structure conditionals for maximum clarity and comprehension. Avoid unnecessary negation in boolean expressions, use …
Code Style
Share
Standardize URL handling
2
⭐ 237K
When working with URLs in networking code, always use the standard `URL` constructor to properly resolve relative URL…
Networking
Share
Proper Usage of React Hooks
2
⭐ 237K
When using the React library in TypeScript, ensure that you are correctly implementing the recommended React hooks ba…
React
Share
Proper Scoping and Usage of React Variables
2
⭐ 237K
When implementing React components, it is important to ensure that variables are properly scoped and used throughout …
React
Share
Multi-stack config settings
2
⭐ 237K
When creating configuration files for development environments that use multiple technology stacks, ensure settings a…
Configurations
Share
Explicit CSP nonce management
2
⭐ 237K
When implementing Content Security Policy (CSP) protections, always explicitly pass nonce values to components rather…
Security
Share
Dry configuration patterns
2
⭐ 237K
Apply DRY (Don’t Repeat Yourself) principles to all configuration files to improve maintainability. Extract shared co…
Configurations
Share
Document code intent
2
⭐ 237K
Add clear comments that explain the intent and behavior of code that might not be immediately obvious to other develo…
Documentation
Share
Defensive Handling of Nullable React Components
2
⭐ 237K
When working with React components that may return null or undefined values, implement defensive coding patterns to p…
React
Share
Test helpers for maintainability
2
⭐ 57K
Create reusable helper methods for common testing operations to improve test maintainability and consistency. Design …
Testing
Share
Spring DI precedence rules
2
⭐ 14.7K
When developing Quarkus extensions that interact with classes containing Spring annotations (like `@Service`, `@Compo…
Spring
Share
Prevent metrics cardinality explosion
2
⭐ 14.7K
When implementing metrics and telemetry in your application, avoid using dynamic values like path parameters or user …
Observability
Share
Optimize elimination paths
2
⭐ 14.7K
When implementing algorithms that process large data structures or complex computational paths, prioritize opportunit…
Algorithms
Share
Keep configurations current
2
⭐ 14.7K
Always use the latest stable and supported versions in configuration files. This applies to runtime environments, bui…
Configurations
Share
Document observability context flows
2
⭐ 14.7K
When implementing observability features like OpenTelemetry exporters, metrics collection, or distributed tracing, cl…
Observability
Share
Design fluent HTTP APIs
2
⭐ 14.7K
When designing HTTP-related APIs, prioritize readability and intuitiveness through well-crafted fluent interfaces. AP…
API
Share
Consolidate duplicate configurations
2
⭐ 14.7K
Maintain a single source of truth for configuration files instead of duplicating them across the codebase. Duplicated…
Configurations
Share
Type-appropriate null representation
2
⭐ 91.3K
Always use type-appropriate mechanisms to represent the absence of a value. For objects, use default constructors rat…
Null Handling
Share
Reuse existing algorithms
2
⭐ 91.3K
Before implementing common algorithms or utilities, check if the codebase already contains an appropriate implementat…
Algorithms
Share
Preserve API compatibility
2
⭐ 91.3K
When modifying existing APIs, always prioritize backward compatibility to avoid breaking client code. Before changing…
API
Share
Optimize container operations
2
⭐ 91.3K
Minimize CPU overhead in container operations by using efficient data structure patterns:
1. **Use static containers…
Performance Optimization
Share
Hardware acceleration considerations
2
⭐ 91.3K
When implementing hardware-accelerated operations for AI models, ensure support for the latest architectures while co…
AI
Share
Descriptive unambiguous names
2
⭐ 91.3K
Always use descriptive variable names that clearly indicate their purpose without requiring readers to check call sit…
Naming Conventions
Share
Choose data structures wisely
2
⭐ 91.3K
When designing algorithms, select data structures that accommodate all possible scenarios, not just the common case. …
Algorithms
Share
Choose appropriate pointer types
2
⭐ 91.3K
Select the right pointer type based on ownership semantics to prevent null reference issues and memory leaks. Follow …
Null Handling
Share
Centralize configuration detection
2
⭐ 91.3K
Always use centralized configuration detection mechanisms (like CMake finder modules) instead of hardcoding paths or …
Configurations
Share
Actionable error messages
2
⭐ 91.3K
When writing error messages in PyTorch code, include not only what went wrong but also clear guidance on how to fix t…
Pytorch
Share
Specific types for performance
2
⭐ 24.4K
Using concrete types instead of abstract container classes in data models improves validation performance. More speci…
Performance Optimization
Share
Enforce style with linters
2
⭐ 24.4K
Use automated linting tools to enforce consistent code style across the project, but be deliberate about which rules …
Code Style
Share
Data structure correctness
2
⭐ 24.4K
Ensure data structures are accurately represented with their proper constraints and valid implementations, particular…
Algorithms
Share
Avoid unnecessary operations
2
⭐ 24.4K
Check conditions early to skip unnecessary processing and reuse computed values where possible to optimize performanc…
Performance Optimization
Share
Avoid shared structure mutation
2
⭐ 24.4K
When implementing algorithms that manipulate complex nested data structures, avoid directly mutating shared objects t…
Algorithms
Share
Write objectively
2
⭐ 11.8K
Use an impersonal, objective tone in technical documentation. Avoid using second-person pronouns (“you”) and subjecti…
Documentation
Share
Task signature methods
2
⭐ 11.8K
When chaining Celery tasks, choose the correct signature method: - Use `.s()` when a task needs the output from the p…
Celery
Share
Prefer server components
2
⭐ 11.8K
Default to server components in Next.js applications to maximize the benefits of server-side rendering. Avoid adding …
Next
Share
Parameterize configuration values
2
⭐ 11.8K
Always extract configuration values (like versions, paths, or other changeable settings) into parameters rather than …
Configurations
Share
Log exceptions with context
2
⭐ 11.8K
When handling exceptions in your code, ensure they are properly logged with sufficient context to aid debugging. For …
Logging
Share
Format AI code identifiers
2
⭐ 11.8K
When documenting AI systems, always format code identifiers, function names, agent names, model names, and other tech…
AI
Share
Flexible AI model versions
2
⭐ 11.8K
When integrating LLM or AI models into your application, implement model selection in a way that accommodates the rap…
AI
Share
Environment variables for configurations
2
⭐ 11.8K
Store all configurable values such as URLs, API endpoints, and external service locations in environment variables ra…
Configurations
Share
Endpoints for evolving data
2
⭐ 11.8K
Design dedicated API endpoints for data that changes frequently or grows over time, rather than hardcoding such infor…
API
Share
Enable database resilience
2
⭐ 11.8K
Always configure appropriate resilience features for database services to ensure data durability and high availabilit…
Database
Share
Consistent environment variable naming
2
⭐ 11.8K
When naming environment variables, ensure that names are both technically accurate and follow established project con…
Naming Conventions
Share
Configure observability variables
2
⭐ 11.8K
Always define all necessary environment variables for observability tools in configuration files, even if using defau…
Observability
Share
Use consistent temporal types
2
⭐ 34.3K
When implementing or modifying temporal operations, maintain consistent data types that align with existing temporal …
Temporal
Share
Edge case algorithm handling
2
⭐ 34.3K
When implementing algorithms, pay special attention to edge cases, particularly empty collections. Define and documen…
Algorithms
Share
Cross-platform feature flags
2
⭐ 34.3K
When documenting package installation commands with feature flags, ensure compatibility across different operating sy…
Configurations
Share
Use relative documentation links
2
⭐ 25.9K
When documenting error handling mechanisms, always use relative path references (`../path/to/file.mdx`) instead of ab…
Error Handling
Share
Review consistency assumptions
2
⭐ 25.9K
Periodically reassess your database operations based on updated consistency guarantees offered by storage technologie…
Database
Share
Provider instance management
2
⭐ 25.9K
Ensure proper configuration of provider instances when using environment-specific settings. When using `for_each` wit…
Configurations
Share
Protect infrastructure secrets
2
⭐ 25.9K
Infrastructure-as-code tools like OpenTofu may store sensitive information in plaintext state files, creating securit…
Security
Share
Document phased migration paths
2
⭐ 25.9K
When replacing an existing system feature with a new implementation, provide a clear and well-documented phased migra…
Migrations
Share
Contextualize security findings
2
⭐ 25.9K
When reporting security vulnerabilities, include sufficient context beyond just vulnerability IDs or codes. Always pr…
Security
Share
Clear relationship descriptions
2
⭐ 25.9K
When documenting algorithms or data structures with graph-like relationships, use precise terminology to describe con…
Algorithms
Share
Use proper testing frameworks
open-telemetry/opentelemetry-python
2
⭐ 2.1K
Always leverage established testing frameworks and APIs over custom bash scripts or direct Python execution for test …
Testing
Share
Track observability API changes
open-telemetry/opentelemetry-python
2
⭐ 2.1K
Stay informed about API changes in observability libraries like OpenTelemetry, especially during their active develop…
Observability
Share
Telemetry version pinning
open-telemetry/opentelemetry-python
2
⭐ 2.1K
When specifying observability frameworks like OpenTelemetry in requirements files, use the compatible release operato…
Observability
Share
Adapt for linter compatibility
open-telemetry/opentelemetry-python
2
⭐ 2.1K
When writing or modifying code, design patterns and templates to be compatible with linting tools. This is especially…
Code Style
Share
Thread-safe resource cleanup
2
⭐ 82.9K
When implementing resource cleanup in concurrent applications, avoid using deprecated finalizers and instead use Phan…
Concurrency
Share
Maintain build compatibility
2
⭐ 82.9K
When modifying build scripts or configurations, ensure compatibility across all supported environments and properly t…
CI/CD
Share
Document configuration version requirements
2
⭐ 82.9K
Make build configuration options explicit and document their version dependencies. When introducing configuration par…
Configurations
Share
Check nulls directly
2
⭐ 82.9K
Check objects directly for null/empty state instead of using separate tracking variables. Always perform null checks …
Null Handling
Share
Purpose-reflecting file names
2
⭐ 145.7K
File names should clearly communicate their purpose and functionality. Avoid generic, ambiguous, or numbered names (l…
Naming Conventions
Share
Path traversal prevention
2
⭐ 145.7K
Implement multiple validation layers to prevent path traversal attacks. File paths provided by users or external syst…
Security
Share
Optimize memory allocations
2
⭐ 145.7K
Be strategic about memory allocations to improve performance in your C++ code. Consider two key optimization patterns…
Performance Optimization
Share
Model precision matters
2
⭐ 145.7K
When deploying AI models on specialized hardware accelerators (GPUs, NPUs), ensure you’re using compatible model prec…
AI
Share
Keep container images current
2
⭐ 145.7K
Always use up-to-date and supported container images in Dockerfiles and configuration files. Before specifying a base…
Configurations
Share
Extract duplicated code
2
⭐ 145.7K
Identify repeated code segments and extract them into reusable functions or variables. This improves maintainability,…
Code Style
Share
Complete HTTP protocol handling
2
⭐ 145.7K
When implementing HTTP client functionality, ensure comprehensive support for all standard HTTP status codes and secu…
Networking
Share
Complete documentation coverage
2
⭐ 145.7K
Documentation should comprehensively cover all supported options, variations, and potential future use cases. When cr…
Documentation
Share
AI dependency decoupling strategy
2
⭐ 145.7K
Implement clear boundaries between your core AI system and external machine learning libraries through abstraction la…
AI
Share
Verify documentation links
2
⭐ 2.8K
Always ensure external links in documentation are valid, secure, and point to authoritative sources. This includes:
…
Documentation
Share
Use appropriate framework targets
2
⭐ 2.8K
When configuring .NET projects, always use the correct target framework elements and versions:
1. Use the singular `…
Configurations
Share
Secure permission modeling
2
⭐ 2.8K
When implementing security-related models such as permissions, carefully design the properties to prevent unauthorize…
Security
Share
Precise and consistent naming
2
⭐ 2.8K
Names should clearly indicate their specific purpose and context, while maintaining correct capitalization of brand n…
Naming Conventions
Share
File-specific indentation standards
2
⭐ 2.8K
Maintain consistent indentation based on file type to ensure code readability and prevent unwanted whitespace changes…
Code Style
Share
Validate network request parameters
2
⭐ 112.2K
Always validate and sanitize all network request parameters to prevent injection attacks. This includes:
1. **URL va…
Security
Share
Secure resource loading
2
⭐ 112.2K
Always validate and securely load external resources like libraries, configuration files, and modules to prevent tamp…
Security
Share
Descriptive behavior-based tests
2
⭐ 112.2K
Tests should be named to describe the expected behavior or outcome being verified, not the input parameters or implem…
Testing
Share
Choose appropriate containers
2
⭐ 112.2K
Select data structures based on expected collection size and usage patterns. For small collections (typically fewer t…
Algorithms
Share
Validate Next.js Configuration Usage
2
⭐ 133K
When implementing Next.js in your application, ensure that you are correctly using the framework’s documented configu…
Next.js
Share
Robust Error Handling in Next.js Components
2
⭐ 133K
When building Next.js components, it is crucial to implement robust error handling to ensure the stability and predic…
Next.js
Share
Proper panic chains
2
⭐ 133K
When implementing panic handlers, follow these critical practices to ensure robust error handling: register panic han…
Error Handling
Share
Non-blocking observability mechanisms
2
⭐ 133K
When implementing observability mechanisms like telemetry or status monitoring, ensure they don’t block or interfere …
Observability
Share
Document configuration sources
2
⭐ 133K
When providing configuration instructions, document the exact location and method to obtain required values. Include …
Configurations
Share
Dependency conscious APIs
2
⭐ 133K
Design APIs with dependency implications in mind. Carefully consider how your API design choices might force dependen…
API
Share
Complete error handling flows
2
⭐ 133K
Implement robust error handling patterns that ensure both proper resource cleanup and error context preservation.
Error Handling
Share
Complete data structures
2
⭐ 133K
When implementing data structures such as tries, trees, or graphs, ensure all critical operations (insertion, deletio…
Algorithms
Share
Choose optimal data structures
2
⭐ 133K
Select data structures based on their performance characteristics and actual usage patterns. When implementing algori…
Algorithms
Share
Enable header validation
2
⭐ 34.2K
Always enable HTTP header validation to prevent request/response splitting vulnerabilities. These attacks can occur w…
Security
Share
Check feature compatibility
2
⭐ 34.2K
When using kernel-specific networking features like io_uring, always implement runtime detection of feature support b…
Networking
Share
Test dependency management
2
⭐ 71.8K
Testing tools and libraries should be placed in `devDependencies` rather than regular dependencies in package.json. R…
Testing
Share
Manage testing dependencies
2
⭐ 71.8K
Properly manage testing-related dependencies by placing them in devDependencies and regularly auditing them to remove…
Testing
Share
Document CI/CD changes
2
⭐ 71.8K
Always document changes to CI/CD configurations and scripts, and ensure pull requests remain focused on their intende…
CI/CD
Share
Reliable concurrency synchronization
2
⭐ 19K
When handling concurrent operations, prefer completion signals and proper thread management over arbitrary timeouts. …
Concurrency
Share
Proper metrics design
2
⭐ 19K
When designing metrics for observability systems like Prometheus, follow established best practices to ensure your me…
Observability
Share
Optimize what matters
2
⭐ 19K
Focus optimization efforts on performance-critical paths rather than applying micro-optimizations everywhere. Balance…
Performance Optimization
Share
Modern shell syntax
2
⭐ 19K
Prefer double brackets (`[[ ]]`) over single brackets (`[ ]`) in shell scripts for improved functionality and consist…
Code Style
Share
Mind transaction boundaries
2
⭐ 19K
Be conscious of implicit transaction boundaries when working with databases. Programming constructs can create unexpe…
Database
Share
Limit concurrent access slots
2
⭐ 19K
Design concurrency mechanisms based on actual usage patterns rather than theoretical maximum connections. When implem…
Concurrency
Share
Handle network interrupts safely
2
⭐ 19K
Network code must properly handle interrupts and maintain consistent connection state at all potential interruption p…
Networking
Share
Feature flag implementation clarity
2
⭐ 19K
When implementing feature flags in the system, clearly document both the evaluation strategy and its performance impl…
Configurations
Share
Document parameter choices
2
⭐ 19K
Always add explanatory comments for parameters or configuration options that aren’t self-explanatory from their names…
Documentation
Share
Document connection transitions
2
⭐ 19K
When implementing systems that involve network connection state changes (such as during failovers, restarts, or compo…
Networking
Share
Database replica promotion safeguards
2
⭐ 19K
When implementing database replica promotion logic, avoid temporary workarounds that bypass validation checks. Instea…
Database
Share
Balance flexibility with performance
2
⭐ 19K
When designing APIs, carefully balance flexibility against performance constraints. More flexible APIs often come wit…
API
Share
Use pytest parameterization
2
⭐ 20.8K
Structure unit tests using pytest’s parameterize decorator instead of manual loops or wrapper functions. This approac…
Testing
Share
Use named constants
2
⭐ 20.8K
In AI model implementations, avoid using magic numbers directly in code as they reduce readability and make maintenan…
AI
Share
Pre-compute reused data
2
⭐ 20.8K
When data will be accessed multiple times during processing, avoid redundant calculations by pre-computing values upf…
Performance Optimization
Share
Consistent API documentation
2
⭐ 20.8K
Maintain high-quality, consistent documentation as a critical component of API design. Documentation should feature: …
API
Share
Write timeless documentation
2
⭐ 96.1K
Documentation should be written to remain clear and useful regardless of when it’s read. Avoid references to temporar…
Documentation
Share
Use screen queries
2
⭐ 96.1K
When writing component tests, prefer using global `screen` queries from Testing Library instead of container-specific…
Testing
Share
Use direct path imports
2
⭐ 96.1K
For optimal performance, use direct path imports instead of barrel imports when working with UI component libraries l…
Performance Optimization
Share
Secure API endpoints
2
⭐ 96.1K
Always implement appropriate security measures for API endpoints that perform sensitive operations. This includes:
1…
Security
Share
Prefer direct property access
2
⭐ 96.1K
When property names are known at development time, use direct property access (e.g., `object.property`) over computed…
Code Style
Share
Parameterize build processes
2
⭐ 96.1K
When designing build scripts for multi-package repositories, use parameterization to handle special cases rather than…
CI/CD
Share
Parameter interaction design
2
⭐ 96.1K
Design APIs with clear parameter interactions and priority rules to create intuitive interfaces. When multiple parame…
API
Share
Optimize CI/CD infrastructure
2
⭐ 96.1K
Continuously optimize and maintain your CI/CD infrastructure to keep development velocity high while ensuring quality…
CI/CD
Share
Next.js integration patterns
2
⭐ 96.1K
When integrating with Next.js, follow framework-specific patterns carefully and stay updated with API changes to ensu…
Next
Share
Isolate DOM security boundaries
2
⭐ 96.1K
When developing UI components, establish clear DOM manipulation boundaries to prevent security risks. Components that…
Security
Share
Graceful component errors
2
⭐ 96.1K
Use descriptive error messages and appropriate error severity based on component maturity and usage patterns. For new…
Error Handling
Share
Follow library recommendations
2
⭐ 96.1K
When writing tests, prioritize following the official recommendations and best practices of testing libraries (like P…
Testing
Share
Document design decisions
2
⭐ 96.1K
When making architectural choices or modifying existing APIs, document your reasoning directly in the code or in type…
Documentation
Share
Consistent package naming
2
⭐ 96.1K
Use consistent and meaningful naming patterns for packages based on their purpose, visibility, and scope. This improv…
Naming Conventions
Share
Variable evaluation context
2
⭐ 1.4K
Be mindful of when and where environment variables and configuration values are evaluated in shell scripts, especiall…
Configurations
Share
Use specific test assertions
2
⭐ 1.4K
Always use the most specific test assertion method available for your test case rather than generic assertions. Speci…
Testing
Share
Style-compliant example code
2
⭐ 1.4K
Example code in documentation and tutorials should adhere to project style guidelines and demonstrate best practices….
Code Style
Share
Standard configuration files
2
⭐ 1.4K
Use standardized, tool-specific configuration files instead of embedding configurations in CI scripts or other build …
Configurations
Share
Optimize compilation flags
2
⭐ 1.4K
When optimizing application performance, carefully select compiler flags based on your optimization goals. For size-c…
Performance Optimization
Share
Numerical precision considerations
2
⭐ 1.4K
When implementing algorithms involving floating-point calculations, choose epsilon values based on the specific domai…
Algorithms
Share
Lock responsibly, always
2
⭐ 1.4K
Ensure proper management of locks and concurrent resources throughout their lifecycle. When implementing concurrency:…
Concurrency
Share
Document containerized builds
2
⭐ 1.4K
When using Docker for build environments, provide complete, tested instructions that users can copy-paste without mod…
CI/CD
Share
Cross-platform test management
2
⭐ 1.4K
When working with tests that run across multiple platforms (iOS, Android, etc.), ensure proper configuration and hand…
Testing
Share
Configuration over hardcoding
2
⭐ 1.4K
When designing APIs, prefer exposing behavior through configuration options rather than hardcoding logic, especially …
API
Share
Conditional observability instrumentation
2
⭐ 1.4K
Wrap all tracing, profiling, and debugging instrumentation in appropriate conditional compilation blocks (like `MLN_T…
Observability
Share
Accurate documentation references
2
⭐ 1.4K
Ensure all code documentation includes appropriate reference links that are current and accurate. When porting code o…
Documentation
Share
Use semantic identifiers
2
⭐ 197.3K
Choose semantically appropriate identifiers and types that clearly represent their purpose. This includes using the c…
Naming Conventions
Share
Prefer early returns
2
⭐ 197.3K
When a function can determine an early result based on input validation or special cases, return immediately rather t…
Code Style
Share
Proper configuration placement
2
⭐ 13.6K
Place configuration files and settings at the appropriate level in your repository structure. In monorepos, some conf…
Configurations
Share
Materialize database indexes
2
⭐ 13.6K
Always materialize database indexes after creation to ensure they are fully built and immediately available for queri…
Database
Share
Consistent descriptive naming
2
⭐ 13.6K
Use naming conventions that are both consistent with existing patterns and descriptively clear about purpose. Follow …
Naming Conventions
Share
Capitalize acronyms consistently
2
⭐ 13.6K
Use standard capitalization for acronyms in all identifiers, method names, variables, and other code elements. Common…
Naming Conventions
Share
Update documentation configuration
2
⭐ 15K
When adding new files or components to the project, ensure that documentation configuration is updated accordingly. T…
Documentation
Share
Simplify code organization
2
⭐ 15K
Maintain clean code organization by eliminating unnecessary abstractions and preventing codebase fragmentation. This …
Code Style
Share
Platform-appropriate environment variables
2
⭐ 15K
Always use the correct syntax for accessing environment variables based on the target platform. In JavaScript/Node.js…
Configurations
Share
Match configuration documentation
2
⭐ 15K
Configuration documentation must accurately reflect implementation details and behavior. Ensure that:
1. Code exampl…
Configurations
Share
Follow standard naming
2
⭐ 15K
Use established naming patterns and correct capitalization throughout the codebase and documentation.
For test fixt…
Naming Conventions
Share
Validate model optimization
2
⭐ 15.1K
When implementing AI model optimization techniques such as early stopping algorithms or hyperparameter tuning, includ…
AI
Share
Validate inputs explicitly
2
⭐ 15.1K
Always validate input parameters and respond with appropriate HTTP status codes when invalid values are detected, eve…
Error Handling
Share
Use enums for state
2
⭐ 15.1K
When handling nullable or undefined states, use enumerations instead of primitive types like boolean or null/undefine…
Null Handling
Share
Use CSS classes properly
2
⭐ 15.1K
Avoid inline styles and `!important` declarations in your HTML templates. Instead, define and use CSS classes that en…
Code Style
Share
Unique workflow step names
2
⭐ 15.1K
When defining CI/CD workflows, always ensure task/step names are unique to prevent execution failures. Workflow engin…
CI/CD
Share
Type-appropriate default values
2
⭐ 15.1K
Initialize variables with type-appropriate default values to prevent type errors and null reference exceptions during…
Null Handling
Share
Structure for navigation
2
⭐ 15.1K
Documentation should be structured to optimize user navigation and information discovery. When organizing documentati…
Documentation
Share
Standardize style scripts
2
⭐ 15.1K
Maintain consistent code style enforcement scripts across all projects by standardizing linting and formatting config…
Code Style
Share
Standardize metrics collection
2
⭐ 15.1K
Use the appropriate metric types for the data being collected and consider centralizing monitoring code to ensure con…
Observability
Share
Stable configuration management
2
⭐ 15.1K
Always ensure configuration values are managed consistently and sourced from stable locations.
1. Use defined const…
Configurations
Share
Safe URL operations
2
⭐ 15.1K
When handling URLs for API interactions and navigation, use precise methods for both comparison and construction to a…
API
Share
Reduce nesting depth
2
⭐ 15.1K
Improve code readability by reducing nesting depth with early returns and functional approaches. Use early returns to…
Code Style
Share
Private variable naming convention
2
⭐ 15.1K
Use the ‘prv’ prefix for private class members and ensure they’re explicitly declared with the ‘private’ access modif…
Naming Conventions
Share
Prefer external configuration
2
⭐ 15.1K
Design applications to use external configuration sources rather than hardcoding values directly in source code. This…
Configurations
Share
Optimize container build configurations
2
⭐ 15.1K
Configure containerized application builds to be efficient and flexible by avoiding hardcoded architecture decisions …
CI/CD
Share
Match algorithms to purpose
2
⭐ 15.1K
Select algorithmic constructs and control structures that are appropriate for the specific task. Common issues includ…
Algorithms
Share
Isolate test cases
2
⭐ 15.1K
Create separate test functions for distinct functionality to improve test clarity and make failure points more obviou…
Testing
Share
Enforce least privilege
2
⭐ 15.1K
Configure all systems with the minimum permissions required to function. For Kubernetes deployments, use security con…
Security
Share
Document networking annotations
2
⭐ 15.1K
When using Istio or other networking-related annotations in configuration files, always include detailed comments exp…
Networking
Share
Document migration paths
2
⭐ 15.1K
When implementing version changes or migrations, provide comprehensive documentation and tools to support users throu…
Migrations
Share
Descriptive consistent naming
2
⭐ 15.1K
Use descriptive and consistent names throughout the codebase. Prefer full, meaningful names over acronyms or abbrevia…
Naming Conventions
Share
Consistent separator conventions
2
⭐ 15.1K
Use appropriate separators in compound identifiers to improve readability and ensure naming consistency across the co…
Naming Conventions
Share
Consistent descriptive naming
2
⭐ 15.1K
Maintain consistency in naming patterns across related resources while ensuring names accurately reflect their purpos…
Naming Conventions
Share
Component-agnostic styling principles
2
⭐ 15.1K
Create reusable components with styles that don’t make assumptions about parent contexts or affect their positioning …
Code Style
Share
Centralize dependency configurations
2
⭐ 15.1K
When adding or updating package dependencies, place them in centralized configuration files rather than duplicating t…
Configurations
Share
Automate style enforcement
2
⭐ 15.1K
Configure your development environment to automatically enforce code style standards rather than relying on manual ch…
Code Style
Share
API structure balance
2
⭐ 15.1K
Maintain a clear separation between resource-specific API handlers and common utilities. Resource-specific handlers s…
API
Share
Use modern test infrastructure
2
⭐ 50.9K
Always add new tests to the current recommended test infrastructure rather than legacy systems that are being phased …
Testing
Share
Minimize not-null assertions
2
⭐ 50.9K
Avoid using not-null assertions (`!!`) when safer alternatives exist. Instead: 1. Use safe calls (`?.`) when accessin…
Null Handling
Share
Dependency verification configuration
2
⭐ 50.9K
When adding new dependencies to build.gradle.kts files, always update the corresponding verification metadata to prev…
Configurations
Share
Copy external string inputs
2
⭐ 50.9K
When storing string pointers from external sources (like command-line arguments), always validate the input and creat…
Null Handling
Share
Document versioning strategies
2
⭐ 30.3K
Establish and clearly document versioning strategies in configuration files, both for your application and its depend…
Configurations
Share
Document function signatures
2
⭐ 30.3K
Always document function parameters and return values in the function header comment or interface definition. This is…
Documentation
Share
Centralize workspace configurations
2
⭐ 30.3K
Centralize configuration settings like dependency versions and feature flags at the workspace level rather than dupli…
Configurations
Share
Semantic naming consistency
2
⭐ 8.3K
Ensure all model and field names semantically reflect their actual purpose and maintain consistency with their usage …
Naming Conventions
Share
Ensure schema-migration consistency
2
⭐ 8.3K
When modifying database schemas, ensure complete alignment between schema definitions and SQL migration scripts. Ever…
Migrations
Share
Eliminate documentation redundancy
2
⭐ 8.3K
Documentation should be concise and avoid repeating the same information in multiple places. Redundant content confus…
Documentation
Share
Consistent code organization
2
⭐ 8.3K
Maintain consistent patterns when organizing code elements within schema files. Place standard fields (like IDs and t…
Code Style
Share
Collections use plural names
2
⭐ 8.3K
Always use plural names for properties representing collections (arrays/lists) in interfaces, types, and destructurin…
Naming Conventions
Share
Workflow permission boundaries
2
⭐ 68.8K
Always define explicit and minimal permission boundaries in GitHub Actions workflows to adhere to the principle of le…
Security
Share
Use dynamic port allocation
2
⭐ 68.8K
When writing tests that require network services (HTTP, gRPC, or custom protocols), use port 0 to let the operating s…
Networking
Share
Stable test assertions
2
⭐ 68.8K
Write tests that focus on behavior rather than implementation details to create more stable and maintainable test sui…
Testing
Share
Sort with clarity
2
⭐ 68.8K
Ensure sorting functions are named to accurately reflect their behavior and implement consistent sorting approaches t…
Algorithms
Share
Opt-in configurable caching
2
⭐ 68.8K
Implement caching mechanisms as opt-in features with explicit configuration options rather than as defaults. This app…
Caching
Share
Object parameters for readability
2
⭐ 68.8K
When a function has 3 or more parameters, use object destructuring instead of positional arguments. This improves cod…
Code Style
Share
Document translatable UI text
2
⭐ 68.8K
All user-facing text in UI components should be properly documented for translation using the application’s internati…
Documentation
Share
Defense in depth
2
⭐ 68.8K
Always implement multiple layers of security controls, even when they might seem redundant. This strategy ensures pro…
Security
Share
Contextual structured logging
2
⭐ 68.8K
Log messages should provide sufficient context to be meaningful and actionable while following structured logging pat…
Logging
Share
Check before calculating
2
⭐ 68.8K
Implement preliminary validation checks before executing expensive operations to avoid unnecessary processing. When h…
Performance Optimization
Share
Balance flexibility with simplicity
2
⭐ 68.8K
When designing component APIs, strive to find the optimal balance between providing flexible configuration options an…
API
Share
Assert with precision
2
⭐ 68.8K
Tests should verify actual behavior rather than just successful execution. When writing assertions, favor precise equ…
Testing
Share
Use standard HTTP constants
2
⭐ 83K
Always use the standard HTTP status constants from the `http` package instead of raw numeric values in your networkin…
Networking
Share
Select algorithms by complexity
2
⭐ 83K
Choose appropriate algorithms based on computational complexity requirements and context. When implementing lookups, …
Algorithms
Share
Preserve security configurations
2
⭐ 83K
Always respect explicitly set security attributes and properly sanitize user inputs to prevent security vulnerabiliti…
Security
Share
Pin dependency versions
2
⭐ 83K
Always specify exact versions of tools and dependencies in CI/CD workflows rather than using ‘latest’ or floating ver…
CI/CD
Share
Minimize configuration complexity
2
⭐ 83K
Keep configuration files clean and maintainable by regularly reviewing and removing unnecessary settings and outdated…
Configurations
Share
Initialize before null-checking
2
⭐ 83K
When handling potentially nil values, ensure proper initialization order to prevent race conditions and null referenc…
Null Handling
Share
Document API behavior
2
⭐ 83K
Thoroughly document how your API endpoints handle data binding and processing, especially non-obvious behaviors that …
API
Share
Declare .PHONY targets
2
⭐ 83K
Always explicitly declare all Makefile targets that don’t create files as `.PHONY`. This prevents conflicts with pote…
CI/CD
Share
Close resource handles properly
2
⭐ 83K
Always close file resources and other system handles after use to prevent resource leaks. Resource leaks can cause sy…
Error Handling
Share
Prefer flat control flow
2
⭐ 32.9K
Minimize code nesting by using Swift features like `guard` statements and early returns instead of deeply nested if-e…
Code Style
Share
Pipeline-friendly script design
2
⭐ 32.9K
Design scripts to be easily integrated into build pipelines and CI/CD workflows by using standard I/O streams instead…
CI/CD
Share
Generate dynamic configurations
2
⭐ 32.9K
Always generate configuration files programmatically when they contain dynamic content that changes frequently or nee…
Configurations
Share
Format for readability
2
⭐ 32.9K
Documentation should be formatted to optimize readability and information retention. Apply these principles to make d…
Documentation
Share
Validate security-critical inputs
2
⭐ 95.9K
Always implement thorough validation for user-controllable inputs that could pose security risks. Particularly:
1. *…
Security
Share
Focus documentation content
2
⭐ 95.9K
Maintain streamlined primary documentation (like README files) that focuses only on currently supported functionality…
Documentation
Share
Document code decisions
2
⭐ 95.9K
Always include clear documentation for important code decisions and metadata. This includes preserving copyright noti…
Documentation
Share
Check context cancellation
2
⭐ 95.9K
Always implement proper cancellation mechanisms in concurrent code to prevent goroutine leaks and enable timely shutd…
Concurrency
Share
Precise testing dependency versioning
2
⭐ 33.8K
When specifying testing library dependencies, always use explicit minimum patch versions rather than development bran…
Testing
Share
Mark sensitive parameters
2
⭐ 33.8K
Always use the `#[\SensitiveParameter]` attribute for parameters containing sensitive information such as passwords, …
Security
Share
Verify types in tests
2
⭐ 34K
Use explicit type assertions in TypeScript tests to verify that types behave as expected across various scenarios. In…
Testing
Share
Use bot identity
2
⭐ 34K
When configuring Git operations in GitHub Actions workflows, especially for automated commits, use the GitHub Actions…
CI/CD
Share
Support flexible logging
2
⭐ 34K
When designing logging interfaces, create flexible APIs that accommodate both standard and custom logging needs. This…
Logging
Share
Secure Fastify Code Implementation
2
⭐ 34K
This review focuses on secure implementation patterns when using the Fastify web framework in TypeScript: prevent Pro…
Fastify
Share
Proper IPv6 address formatting
2
⭐ 34K
When constructing URLs with IP addresses, ensure IPv6 addresses are properly formatted according to RFC standards by …
Networking
Share
Ensure Proper Null Handling When Using Fastify Decorators
2
⭐ 34K
When working with Fastify decorators, always perform explicit null checks before accessing potentially undefined prop…
Fastify
Share
Consistent Fastify Package Naming and References
2
⭐ 34K
When implementing code using the Fastify package in TypeScript, it is important to use consistent and accurate naming…
Fastify
Share
Use universally understandable identifiers
2
⭐ 86.9K
When naming variables, functions, routes, and other code elements, use clear, neutral terminology that will be unders…
Naming Conventions
Share
Use streaming generators
2
⭐ 86.9K
When processing large files or datasets, implement generator functions that yield data incrementally rather than load…
Algorithms
Share
Use appropriate documentation formats
2
⭐ 86.9K
Choose the most suitable documentation format based on context to maximize readability and information value.
For P…
Documentation
Share
Optimize IO with async
2
⭐ 86.9K
FastAPI’s performance advantage comes from its asynchronous foundation built on Starlette and Uvicorn, using `uvloop`…
Performance Optimization
Share
Environment-specific database configuration
2
⭐ 86.9K
Configure database connections differently based on the environment. Use lightweight file-based databases like SQLite…
Database
Share
Consistent dependency versioning
2
⭐ 86.9K
When updating dependency version constraints in requirements files, ensure consistency with versions pinned by other …
Configurations
Share
Clear informative errors
2
⭐ 86.9K
Error messages should be clear, specific, and provide enough context to understand the issue without exposing unneces…
Error Handling
Share
Avoid blocking in async
2
⭐ 86.9K
When working with asynchronous code, ensure that I/O operations (like file reads/writes) don’t block the event loop. …
Concurrency
Share
Modern TypeScript style
2
⭐ 67.3K
Use modern TypeScript syntax and conventions throughout the codebase. This includes: - Using `const` instead of `var`…
Code Style
Share
Method chaining for clarity
2
⭐ 67.3K
Design API methods that favor chaining over multiple parameters to improve readability and maintainability. When impl…
API
Share
Maintain API types
2
⭐ 67.3K
Ensure API type definitions accurately reflect current implementations. When maintaining TypeScript definitions for A…
API
Share
Exclude sensitive configurations
2
⭐ 67.3K
Do not commit sensitive, time-limited, or environment-specific configuration files to version control. Instead:
1. F…
Configurations
Share
Clear array operations
2
⭐ 67.3K
When working with arrays, prioritize clarity and explicitness over terse or clever constructs. For array membership c…
Algorithms
Share
Accurate JSDoc documentation
2
⭐ 67.3K
Always ensure JSDoc comments accurately reflect the actual code implementation. Parameter types, optionality, and fun…
Documentation
Share
Use current configuration patterns
2
⭐ 73.1K
Always use the current recommended configuration patterns for your project, avoiding deprecated approaches. When conf…
Configurations
Share
Specify explicit REST formats
2
⭐ 73.1K
Always specify explicit request formats in REST API tests rather than relying on default behaviors. This includes:
1…
API
Share
Document security requirements explicitly
2
⭐ 73.1K
Always document security-related configurations, permissions, and behaviors explicitly and comprehensively. When docu…
Security
Share
Document performance tradeoffs
2
⭐ 73.1K
Always explicitly document the performance implications of API parameters, limit changes, and features that could sig…
Performance Optimization
Share
Complete API parameter documentation
2
⭐ 73.1K
API endpoints must include comprehensive documentation for all parameters. For each parameter, clearly specify:
1. W…
API
Share
Avoid flaky tests
2
⭐ 73.1K
Design tests to be deterministic and reliable across different environments. Tests that occasionally fail due to timi…
Testing
Share
Organize by functionality
2
⭐ 84.2K
Place code in files that match its functionality. When functionality applies to multiple components, use a general-pu…
Code Style
Share
AI documentation targeting
2
⭐ 84.2K
When writing technical documentation, consider AI systems as a direct audience that may read and act upon your text. …
AI
Share
Type-safe numerical algorithms
2
⭐ 14K
When implementing numerical algorithms, always use appropriate data types to prevent overflow and preserve precision:…
Algorithms
Share
Prevent memory leaks
2
⭐ 14K
Always ensure proper memory management when using dynamic allocation. Memory leaks are a critical performance issue t…
Performance Optimization
Share
Preserve API compatibility
2
⭐ 14K
When evolving APIs, prioritize backward compatibility to protect existing client code. Make new parameters optional w…
API
Share
Optimize validation checks
2
⭐ 14K
When implementing validation and requirement checks, balance thoroughness with performance considerations. Critical v…
Performance Optimization
Share
Optimize hardware acceleration
2
⭐ 14K
AI systems should use the most performant hardware acceleration libraries and carefully manage hardware-specific depe…
AI
Share
Modular adaptive configurations
2
⭐ 14K
Structure configuration scripts with modularity and adaptability in mind. Extract repeated parameters into variables,…
Configurations
Share
Maintain proper capitalization
2
⭐ 14K
Always use correct and consistent capitalization for product names, class names, and method names throughout code and…
Naming Conventions
Share
Ensure test determinism
2
⭐ 14K
Create reliable and reproducible tests by explicitly controlling test inputs and verifying function behavior doesn’t …
Testing
Share
Document in-code decisions
2
⭐ 14K
Always include explanations for implementation decisions, non-obvious constructs, and specialized functions directly …
Documentation
Share
Document AI implementation references
2
⭐ 14K
When implementing AI algorithms or neural network operations, document the sources of specific implementation choices…
AI
Share
Functional code examples
2
⭐ 33.9K
Ensure all code examples in documentation are complete, accurate, and ready to run without modification. Since develo…
Documentation
Share
Fail securely by default
2
⭐ 33.9K
When designing systems that handle sensitive operations, always default to the most secure behavior rather than prior…
Security
Share
Consistent configuration declarations
2
⭐ 33.9K
Ensure configuration specifications (such as version requirements, environment settings, and tool declarations) are c…
Configurations
Share
Prefer safe DOM manipulations
2
⭐ 50.8K
When manipulating DOM content, prefer safer alternatives to innerHTML when possible to prevent Cross-Site Scripting (…
Security
Share
Optimize build scripts
2
⭐ 50.8K
Improve CI/CD pipeline efficiency by optimizing package.json scripts. Run compatible tasks in parallel using pattern …
CI/CD
Share
Align configurations with usage
2
⭐ 50.8K
Configuration files should accurately reflect the actual requirements and characteristics of your codebase. When sett…
Configurations
Share
Configure loggers consistently
2
⭐ 2.1K
Always configure module-level loggers with a consistent pattern across the codebase. Use `logging.getLogger(__name__)…
Logging
Share
Verify automated documentation
2
⭐ 7.9K
When using automated tools to generate documentation, always verify the output for accuracy and document any addition…
Documentation
Share
Structure CI/CD scripts
2
⭐ 7.9K
Improve CI/CD shell scripts’ readability and maintainability by using appropriate shell script patterns. Use heredocs…
CI/CD
Share
Standardize bash error-handling
2
⭐ 7.9K
Always use `set -eou pipefail` at the beginning of bash scripts to ensure consistent and robust error handling. This …
Error Handling
Share
Log message quality
2
⭐ 7.9K
Ensure all log messages are consistent in formatting and clear in purpose. Complete sentences in logs should end with…
Logging
Share
Use correct encryption properties
2
⭐ 7.7K
When configuring security features in Azure ARM templates, always use the correct property names as specified in the …
Security
Share
Target core resources
2
⭐ 7.7K
When implementing network security checks for serverless functions like AWS Lambda, ensure you target the core functi…
Networking
Share
Secure API endpoints
2
⭐ 7.7K
Always configure proper authorization for API endpoints to prevent unauthorized access to back-end resources. Avoid c…
API
Share
Minimize workflow complexity
2
⭐ 7.7K
Keep GitHub Actions workflows efficient and maintainable by eliminating redundant configurations and ensuring compreh…
CI/CD
Share
Lambda CORS protection
2
⭐ 7.7K
When implementing network security checks for AWS Lambda functions, ensure that CORS (Cross-Origin Resource Sharing) …
Networking
Share
Implement pre-commit hooks
2
⭐ 7.7K
Automate quality and security checks by implementing pre-commit hooks in your Git repositories to catch issues early …
CI/CD
Share
Ensure dependency compatibility
2
⭐ 7.7K
When adding or updating dependencies in configuration files (Pipfile, requirements.txt), ensure compatibility with al…
Configurations
Share
Configure security scanners completely
2
⭐ 7.7K
Security scanning tools must be fully configured to maximize detection capabilities. When implementing tools like Che…
Security
Share
Azure encryption property names
2
⭐ 7.7K
When configuring encryption settings for Azure resources in ARM templates, always use the correct property names as d…
Security
Share
Validate workflow files
2
⭐ 79.1K
Ensure all CI/CD workflow configuration files are validated for accuracy and consistency. Small errors in workflow fi…
CI/CD
Share
Validate network inputs
2
⭐ 79.1K
Network code must validate all inputs and handle error conditions properly to prevent security vulnerabilities and re…
Networking
Share
Validate loop boundary conditions
2
⭐ 79.1K
When implementing iterative algorithms, ensure comprehensive handling of edge cases and boundary conditions. This inc…
Algorithms
Share
Use branch prediction
2
⭐ 79.1K
Optimize performance-critical algorithms by using branch prediction hints to guide the CPU. Add `UNLIKELY` macros for…
Algorithms
Share
Thread-safe state transitions
2
⭐ 79.1K
When modifying shared state in multithreaded code, implement proper checks and state transitions to prevent race cond…
Concurrency
Share
Path comparison precision
2
⭐ 79.1K
When implementing file path matching or exclusion algorithms, use precise comparison techniques that respect director…
Algorithms
Share
Optimize database interactions
2
⭐ 79.1K
When working with database operations, prioritize efficiency by avoiding redundant query executions. Instead of execu…
Database
Share
Match API conventions
2
⭐ 79.1K
Ensure API implementations match established conventions and reference implementations to maintain compatibility and …
API
Share
Judicious move semantics
2
⭐ 79.1K
Apply C++ move semantics and lambda modifiers only when necessary. The `mutable` keyword should only be used in lambd…
Code Style
Share
Initialize default values
2
⭐ 79.1K
Always initialize class attributes with default values to prevent AttributeError exceptions when accessing potentiall…
Null Handling
Share
Hide implementation details
2
⭐ 79.1K
When designing APIs, carefully consider which elements of your implementation become part of the public interface. Av…
API
Share
Function invocation syntax
2
⭐ 79.1K
Use the appropriate invocation syntax for functions based on their intended usage. Regular functions should be called…
Code Style
Share
Follow standard API specifications
2
⭐ 79.1K
Ensure API implementations strictly adhere to published specifications, even when adding features or optimizations. D…
API
Share
Document configuration variations
2
⭐ 79.1K
When documenting or implementing configuration options, always include variations needed for different environments a…
Configurations
Share
Cache repeated accesses
2
⭐ 79.1K
When accessing the same property or calling the same function multiple times, especially in loops or performance-crit…
Performance Optimization
Share
Resolve naming conflicts clearly
2
⭐ 44.2K
When naming components, packages, or files that conflict with existing names in your system or related ecosystems, fo…
Naming Conventions
Share
Prefer flags over conditionals
2
⭐ 44.2K
When implementing environment-specific or version-dependent behavior, use feature flags or configuration variables in…
Configurations
Share
Pin GitHub actions
2
⭐ 44.2K
Always pin GitHub Actions to specific commit hashes rather than version tags (like @v4). Using version tags is a secu…
Security
Share
Document configuration decisions
2
⭐ 44.2K
When making configuration changes, especially those that deviate from standard practices or involve deprecation notic…
Configurations
Share
Decouple CI from code
2
⭐ 44.2K
Separate CI configuration from code that serves other purposes. When variables or settings affect both user-facing be…
CI/CD
Share
Use appropriate comment syntax
2
⭐ 9.4K
Choose the correct comment syntax based on the file type and processing system to ensure documentation serves its int…
Documentation
Share
Keep CI configurations updated
2
⭐ 9.4K
Regularly review and update CI configuration files to remove obsolete settings and use appropriate version specificat…
CI/CD
Share
Function-focused code organization
2
⭐ 9.4K
Files should contain only code related to their named purpose, with proper organization and formatting. When adding f…
Code Style
Share
Follow flake8 style guidelines
2
⭐ 9.4K
Adhere to the project’s established flake8 style guidelines as defined in setup.cfg. This includes:
1. Maintain line…
Code Style
Share
Avoid identifier name stuttering
2
⭐ 9.4K
Do not repeat the resource name in identifier names. This form of stuttering makes code less readable and inconsisten…
Naming Conventions
Share
Use higher-level telemetry
2
⭐ 5.8K
When implementing observability for Azure services, prefer higher-level telemetry packages and configuration methods …
Observability
Share
Preserve protocol data integrity
2
⭐ 5.8K
When working with network protocols (like AMQP, NFS, or SMB), maintain the integrity of the original protocol data st…
Networking
Share
Match CI commands locally
2
⭐ 5.8K
Always use the same build and test commands locally that are used in your CI pipeline to ensure consistency between e…
CI/CD
Share
Handle external process errors
2
⭐ 5.8K
When calling external processes (like dotnet, msbuild, etc.), always implement proper error handling and output manag…
Error Handling
Share
Eliminate repeated code
2
⭐ 5.8K
Reduce code duplication by extracting repeated patterns into variables, loops, or helper functions. When you find you…
Code Style
Share
Document non-obvious code
2
⭐ 5.8K
Add clarifying comments to code elements whose purpose or behavior may not be immediately apparent to other developer…
Documentation
Share
Document maintenance decisions
2
⭐ 5.8K
Add clear documentation for any decisions that affect future code maintenance. This includes:
1. Providing explanato…
Documentation
Share
Document AI changes thoroughly
2
⭐ 5.8K
When updating AI libraries and SDKs, ensure all changes are thoroughly documented in changelogs with clear categoriza…
AI
Share
Complete pipeline configurations
2
⭐ 5.8K
Ensure all CI/CD configuration files have their required fields properly populated with specific values rather than e…
CI/CD
Share
Approve AI dependencies conditionally
2
⭐ 5.8K
All AI-related dependencies (Microsoft.Extensions.AI.*, etc.) require explicit approval before inclusion and must be …
AI
Share
Address not mask
2
⭐ 5.8K
Always address the root cause of CI/CD pipeline issues rather than masking them with quick fixes. This applies to enc…
CI/CD
Share
Use Appropriate Concurrency Patterns with Axum
2
⭐ 22.1K
When building asynchronous Axum applications that share mutable state, it’s important to select the right concurrency…
Axum
Share
Implement Distributed Tracing in Axum Applications
2
⭐ 22.1K
As an Axum code reviewer, I recommend implementing proper distributed tracing in your Axum-based web applications to …
Axum
Share
User-friendly error messages
2
⭐ 107K
Error messages should be concise and clearly communicate what went wrong without unnecessary verbosity. When implemen…
Error Handling
Share
Flexible configuration design
2
⭐ 107K
Design configuration interfaces to be flexible and extensible rather than overly specific. When creating configuratio…
Configurations
Share
Consistent semicolon usage
2
⭐ 107K
Always terminate statements with explicit semicolons to maintain consistency with the existing codebase style. Avoid …
Code Style
Share
Consistent Axios Usage Patterns
2
⭐ 107K
Maintain consistent usage of the Axios library throughout your TypeScript codebase. Pay special attention to consiste…
Axios
Share
Standardize API promise patterns
2
⭐ 7.6K
When adding promise support to API methods, implement a consistent pattern that handles both callback-style and multi…
API
Share
Semantic type organization
2
⭐ 7.6K
Organize types and interfaces in intuitive namespace hierarchies and use specific types instead of generic ones. Type…
Naming Conventions
Share
Organize type declarations
2
⭐ 7.6K
Structure TypeScript declarations to improve maintainability and developer experience. Organize related types into ap…
Code Style
Share
Example documentation standards
2
⭐ 7.6K
Organize API documentation examples for maximum clarity and usefulness. Place hand-written examples before generated …
Documentation
Share
Document sdk version requirements
2
⭐ 7.6K
Always explicitly document AWS SDK version requirements in your project, and include configuration instructions for d…
Configurations
Share
Complete configuration type definitions
2
⭐ 7.6K
Ensure configuration type definitions are complete and consistent between global and service-specific settings. When …
Configurations
Share
Accurate type signatures
2
⭐ 7.6K
When defining API interfaces in TypeScript, ensure that method signatures accurately reflect the actual behavior and …
API
Share
Validate configuration source changes
2
⭐ 40.9K
When switching between different configuration sources (like APIs or configuration values), ensure data structure com…
Configurations
Share
Use proper access patterns
2
⭐ 40.9K
Access configurations through documented abstraction layers rather than bypassing them with direct database or low-le…
Configurations
Share
Use guards over assertions
2
⭐ 40.9K
Prefer explicit type guards and null checks over TypeScript’s type assertions (`as`) when handling potentially null o…
Null Handling
Share
Share documentation configs
2
⭐ 40.9K
Documentation tooling and configuration files should leverage shared/centralized resources rather than maintaining du…
Documentation
Share
Quote shell variables
2
⭐ 40.9K
Always quote shell script variable expansions using double quotes to prevent word splitting issues and ensure consist…
Code Style
Share
Optimize CI configurations
2
⭐ 40.9K
When designing CI/CD workflows, prioritize both resource efficiency and clear documentation. Incorporate dynamic conf…
CI/CD
Share
Natural language translations
2
⭐ 40.9K
When providing translations for user interface elements and documentation, prioritize natural and idiomatic expressio…
Documentation
Share
Versioning for migrations
2
⭐ 15.6K
Use appropriate version bumps to signal migration requirements and maintain clear upgrade paths. Flag breaking change…
Migrations
Share
Optimize CI type checking
2
⭐ 15.6K
Configure separate TypeScript type-checking strategies for CI environments and local development. CI pipelines should…
CI/CD
Share
Format for rendering compatibility
2
⭐ 15.6K
Documentation should be formatted appropriately for its intended rendering context and ensure discoverability. Consid…
Documentation
Share
Flexible API inputs
2
⭐ 15.6K
Design APIs to accept flexible input formats and schema structures, ensuring a better developer experience while main…
API
Share
Consistent camelCase naming
2
⭐ 15.6K
Use camelCase consistently for all property names, method names, and configuration options, even when interacting wit…
Naming Conventions
Share
Consistent AI interfaces
2
⭐ 15.6K
Maintain consistent naming patterns and parameter structures across AI provider implementations. This makes the SDK m…
AI
Share
Warn against sudo
1
⭐ 62.1K
Applications that may need elevated privileges should explicitly warn against running the entire application with sud…
Security
Share
Verify dependency integrity
1
⭐ 19.8K
Always verify the integrity of external dependencies, especially those downloaded from non-official or personal repos…
Security
Share
Permission hierarchy awareness
1
⭐ 74K
When implementing permission checks, understand the hierarchical nature of permissions and avoid redundant checks. Hi…
Security
Share
Escape HTML content properly
1
⭐ 74K
Always use specialized HTML escaping functions when outputting dynamic content to prevent Cross-Site Scripting (XSS) …
Security
Share
Mask sensitive tokens
1
⭐ 60.3K
Always mask sensitive tokens, credentials, and secrets in CI/CD workflows to prevent accidental exposure in logs or b…
Security
Share
Add interactive element roles
1
⭐ 90.6K
When adding event handlers like `onClick` to non-interactive elements such as `div`, always include appropriate ARIA …
Security
Share
Accessible security indicators
1
⭐ 90.6K
Ensure all security-related UI elements such as warnings, error messages, and destructive action buttons meet WCAG co…
Security
Share
Precise documentation links
1
⭐ 28.1K
When creating error messages related to security, permissions, or access controls, always provide specific links to r…
Security
Share
Avoid unsafe code
1
⭐ 9.9K
Prioritize memory safety and security over performance optimizations by avoiding unsafe code blocks, especially in li…
Security
Share
Sanitize command inputs
1
⭐ 45.5K
When constructing commands that will be executed, always sanitize input values to prevent command injection vulnerabi…
Security
Share
Least privilege for tokens
1
⭐ 45.5K
Always apply the principle of least privilege when configuring access tokens for CI/CD workflows and other automated …
Security
Share
Maintain package verification
1
⭐ 190.6K
Always keep signature verification enabled in package managers, even in development environments, Docker containers, …
Security
Share
Validate security-sensitive inputs
spring-projects/spring-framework
1
⭐ 58.4K
Always use appropriate validation mechanisms for security-sensitive inputs to prevent vulnerabilities. When implement…
Security
Share
Inherit organization security policies
1
⭐ 77.6K
Before implementing custom security documentation or procedures, check if your organization already provides standard…
Security
Share
Safe URL navigation
1
⭐ 41.3K
Always use sanitized navigation utilities instead of directly manipulating `window.location` with potentially user-in…
Security
Share
Secure dependency constraints
1
⭐ 1.9K
When specifying dependency version constraints, always include lower version bounds that exclude versions with known …
Security
Share
Comprehensive authentication notifications
1
⭐ 41.3K
Authentication notifications must include specific context about the triggering action, clear instructions for legiti…
Security
Share
Constant-time cryptographic validation
1
⭐ 16.6K
Always use constant-time comparison methods when validating cryptographic values to prevent timing side-channel attac…
Security
Share
Use explicit permission notations
1
⭐ 40.6K
When setting file permissions through system calls like `chmod`, always use explicit octal notation (with the `0o` pr…
Security
Share
Prefer modern security
1
⭐ 14.7K
When implementing security features (such as artifact signing), use current best practices and prefer pure-Java secur…
Security
Share
Test authentication dependencies
1
⭐ 11.8K
When updating authentication-related dependencies or adding new authentication capabilities (like SAML, OAuth, etc.),…
Security
Share
Precise CSP configuration
1
⭐ 11.8K
When integrating third-party services into your web application, carefully configure Content Security Policy (CSP) he…
Security
Share
Fix dependency vulnerabilities
1
⭐ 11.8K
Security vulnerabilities in dependencies must be addressed immediately rather than bypassed with flags like `–no-ver…
Security
Share
Avoid localStorage for credentials
1
⭐ 11.8K
Do not store user profiles, authentication tokens, or other sensitive user information in client-side storage mechani…
Security
Share
Redact sensitive credentials
1
⭐ 34.3K
When implementing authentication or handling credentials, always redact sensitive information (keys, tokens, password…
Security
Share
Secure encryption key backups
1
⭐ 25.9K
Always implement proper encryption key management procedures, including secure backups of encryption keys before enab…
Security
Share
Preserve sensitive data marks
1
⭐ 25.9K
Carefully handle data marked as sensitive throughout the codebase to maintain security properties. Ensure that sensit…
Security
Share
Scope security settings
1
⭐ 112.2K
Avoid modifying global security state in favor of connection-specific or context-bound security settings. Global secu…
Security
Share
Document security attributes
1
⭐ 133K
When handling security-related attributes (like nonces, integrity hashes, or CSP directives), always document the log…
Security
Share
Decode before validation
1
⭐ 133K
Always decode URL paths before performing security validations to prevent bypass attacks using URL encoding. Security…
Security
Share
Use secure hash algorithms
1
⭐ 71.8K
Always use strong, modern cryptographic hash algorithms for security-sensitive operations. Avoid deprecated or weak a…
Security
Share
Secure hash algorithms
1
⭐ 71.8K
Always use cryptographically secure hash algorithms for sensitive operations instead of weak or broken ones. Weak alg…
Security
Share
Proactive dependency security
1
⭐ 71.8K
Always maintain dependencies at their latest secure versions, even when automated vulnerability scanning tools (like …
Security
Share
Comprehensive dependency security checks
1
⭐ 71.8K
Regularly check dependencies for security vulnerabilities using multiple sources, not just npm audit. As shown in the…
Security
Share
Prefer opt-in security
1
⭐ 19K
When implementing security features that modify data presentation or alter normal data access patterns (like anonymiz…
Security
Share
Harden CI/CD runners
1
⭐ 19K
All CI/CD workflow jobs must implement security controls for network traffic, particularly using the step-security/ha…
Security
Share
Escape SQL parameters
1
⭐ 19K
Always escape parameters in database connection strings to prevent SQL injection attacks. Direct string concatenation…
Security
Share
Avoid eval function
1
⭐ 20.8K
Never use the `eval()` function in Python code as it creates serious security vulnerabilities by executing arbitrary …
Security
Share
Default to minimum permissions
1
⭐ 1.4K
Always default to the least invasive privacy settings and explicitly request elevated permissions only when necessary…
Security
Share
Buffer bounds validation
1
⭐ 1.4K
Always validate buffer boundaries before performing memory operations to prevent buffer overflow vulnerabilities. Whe…
Security
Share
Encrypt sensitive credentials
1
⭐ 13.6K
Sensitive credentials such as API keys, passwords, access tokens, and secret keys should never be stored in plain tex…
Security
Share
Avoid automatic package execution
1
⭐ 13.6K
Using `npx –yes` bypasses security prompts and automatically installs packages without verification, which could lea…
Security
Share
Private vulnerability reporting
1
⭐ 15.1K
Never expose security vulnerabilities in public issue trackers. Security issues require confidential handling to prev…
Security
Share
Prevent XSS vulnerabilities
1
⭐ 15.1K
Never directly concatenate untrusted data (like user inputs or API responses) into HTML strings, as this creates cros…
Security
Share
Harden container security
1
⭐ 15.1K
When building container images, ensure they’re compatible with restricted Kubernetes security contexts. Use numeric U…
Security
Share
Enforce HTTPS protocol
1
⭐ 15.1K
Always validate that URLs use the HTTPS protocol in both implementation code and validation error messages. Even if y…
Security
Share
Control header modification
1
⭐ 15.1K
When allowing user-configurable HTTP headers in your application, implement strict validation to prevent security byp…
Security
Share
Configurable security with defaults
1
⭐ 15.1K
Make security features configurable through environment variables or configuration files, but always implement secure…
Security
Share
Document security implementations
1
⭐ 50.9K
Always document non-obvious security implementations, especially authentication mechanisms, with explanatory comments…
Security
Share
Vet security-critical dependencies
1
⭐ 30.3K
When introducing new dependencies, especially those handling sensitive operations like language interpreters, perform…
Security
Share
Secure dependency management
1
⭐ 8.3K
Always maintain secure dependencies by following these two critical security practices:
1. **Keep dependencies updat…
Security
Share
Quote shell substitutions
1
⭐ 8.3K
Always enclose command substitutions in double quotes when assigning to variables or using in shell scripts to preven…
Security
Share
Enforce user scoping
1
⭐ 8.3K
All database queries must include appropriate user scoping to prevent unauthorized data access and Insecure Direct Ob…
Security
Share
Use appropriate permission checks
1
⭐ 68.8K
When implementing role-based access control (RBAC), ensure you use the correct permission verification method based o…
Security
Share
Update vulnerable dependencies
1
⭐ 68.8K
Always update dependencies with known security vulnerabilities to their patched versions. Dependencies with security …
Security
Share
Avoid plaintext credentials
1
⭐ 68.8K
Never include plaintext passwords or credentials in connection strings, configuration files, or documentation example…
Security
Share
Secure temporary files
1
⭐ 32.9K
Always use `mktemp` instead of manually constructing temporary file paths with random values. Manually constructed pa…
Security
Share
Sanitize debug output
1
⭐ 32.9K
Never print or log sensitive information such as tokens, passwords, or secrets that might be present in environment v…
Security
Share
Non-root container users
1
⭐ 95.9K
Always run containers with a non-root user to reduce the security attack surface. Modern Docker allows non-root users…
Security
Share
Secure Content-Type validation
1
⭐ 34K
When implementing Content-Type validation, ensure regular expressions start with ‘^’ or include ‘;?’ to properly dete…
Security
Share
Use unique password salts
1
⭐ 67.3K
When implementing password hashing, always use unique, randomly generated salts for each user. Using constant or shar…
Security
Share
Pin action commit hashes
1
⭐ 67.3K
Always pin third-party GitHub Actions to specific commit hashes rather than semantic version tags (like `@v1`). This …
Security
Share
Enforce least privilege
1
⭐ 73.1K
Always assign the minimum permissions necessary for functionality when implementing role-based access controls. This …
Security
Share
Escape untrusted input
1
⭐ 84.2K
Always use appropriate escaping mechanisms when handling input from untrusted sources to prevent injection attacks. U…
Security
Share
Update security-critical dependencies
1
⭐ 7.9K
Regularly audit and update third-party libraries and dependencies to address known security vulnerabilities. Pay spec…
Security
Share
Expand IAM wildcards
1
⭐ 7.7K
Always expand IAM wildcard permissions (`*`) to specific actions for thorough security analysis. Wildcard permissions…
Security
Share
Avoid wildcard permissions
1
⭐ 7.7K
Implement the principle of least privilege by avoiding wildcard permissions (e.g., ‘*’) in access control policies. A…
Security
Share
Avoid hardcoded secrets
1
⭐ 7.7K
Never include hardcoded secrets or credentials in your infrastructure as code files. Secrets in configuration files p…
Security
Share
Verify cryptographic function behavior
1
⭐ 79.1K
When implementing cryptographic algorithms, always verify the exact behavior and return values of security-critical f…
Security
Share
Validate buffer boundaries
1
⭐ 79.1K
When calling functions that process buffers, especially external C functions, always provide explicit buffer size par…
Security
Share
Secure credentials handling
1
⭐ 79.1K
When handling credentials or secrets in code, avoid passing them directly through command substitution or template li…
Security
Share
Evaluate security control effectiveness
1
⭐ 44.2K
Security measures should be evaluated against realistic threat models to avoid creating a false sense of security. Wh…
Security
Share
Use standard example credentials
1
⭐ 9.4K
When including API keys, access tokens, or other credentials in documentation, examples, or test code, always use cle…
Security
Share
Redact sensitive information
1
⭐ 5.8K
Always sanitize configuration data or any potentially sensitive information before logging or displaying it. When log…
Security
Share
Externalize sensitive credentials
1
⭐ 5.8K
Never hardcode sensitive values such as client identifiers, API keys, connection strings, or passwords directly in co…
Security
Share
Complete authentication testing
1
⭐ 5.8K
Always verify both positive and negative authentication scenarios in your security tests. For each authentication mec…
Security
Share
Secure cookie configuration
1
⭐ 22.1K
Always set appropriate security flags on cookies, especially those used for authentication or session management. At …
Security
Share
Isolate sensitive buffer data
1
⭐ 7.6K
When handling sensitive data in Node.js, protect against data leakage by isolating sensitive content in dedicated buf…
Security
Share
Prioritize secure token storage
1
⭐ 40.9K
When implementing authentication token handling, prioritize more secure storage mechanisms over less secure ones. Spe…
Security
Share
Document security exceptions
1
⭐ 40.9K
When disabling security-related linter rules or bypassing security best practices, always include comments that expla…
Security
Share
🚀 Deploy to baz ×