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