general-best-practices
Skill275 starsChanged 54 days agoApache-2.0View on GitHub
General software development best practices covering code quality, testing, security, performance, and maintainability across technology stacks
In this repository264 other files it gives its agents.
- accessibility-a11ySkill
- alpine-jsSkill
- analytics-data-analysisSkill
- android-developmentSkill
- angular-developmentSkill
- angularSkill
- anime-jsSkill
- anthropic-claude-developmentSkill
- api-developmentSkill
- apollo-graphqlSkill
- aspnet-coreSkill
- astroSkill
- auth0-authenticationSkill
- autogen-developmentSkill
- automl-hyperparameter-optimizationSkill
- aws-developmentSkill
- azureSkill
- backend-developmentSkill
- bash-scriptingSkill
- beautifulsoup-parsingSkill
- bitbucket-workflowSkill
- blazorSkill
- blender-python-addonSkill
- blockchainSkill
- bootstrapSkill
- business-central-developmentSkill
- cheerio-parsingSkill
- chrome-extension-developmentSkill
- ci-cd-best-practicesSkill
- clean-architectureSkill
- clean-codeSkill
- clerk-authenticationSkill
- cloudflare-developmentSkill
- computer-vision-opencvSkill
- convexSkill
- cppSkill
- c-sharpSkill
- cssSkill
- cypressSkill
- data-analysis-jupyterSkill
- data-analystSkill
- data-jupyter-pythonSkill
- deep-learning-pythonSkill
- deep-learning-pytorchSkill
- deep-learningSkill
- deno-typescriptSkill
- design-systemsSkill
- devopsSkill
- django-pythonSkill
- django-rest-api-developmentSkill
- dockerSkill
- dotnetSkill
- drizzle-ormSkill
- drupal-developmentSkill
- elasticsearch-best-practicesSkill
- electron-developmentSkill
- elixirSkill
- embedded-stm32Skill
- esbuild-bundlerSkill
- ethereumSkill
- The first 60 shown.
The file
Show its rules and text
We split this skill into the rules it gives an agent
37 rules. About 0 are common, 37 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈37
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 17
Write short, focused functions with a single responsibility.
- Distinctive: line 19
Use clear, descriptive names for variables, functions, and classes.
- Distinctive: line 21
Avoid deep nesting; prefer early returns and guard clauses.
- Distinctive: line 23
Keep functions and methods to a reasonable length (typically under 30 lines).
- Distinctive: line 27
Always handle errors explicitly rather than silently ignoring them.
- Distinctive: line 29
Use wrapped errors for traceability and context.
- Distinctive: line 41
Use consistent file and folder naming conventions.
- Distinctive: line 43
Follow the principle of least surprise in API design.
- Distinctive: line 58
Prefer composition over inheritance.
- Distinctive: line 62
Use dependency injection for testability and flexibility.
- Distinctive: line 72
Write tests that are fast, isolated, and repeatable.
- Distinctive: line 74
Use table-driven tests for testing multiple scenarios.
- Distinctive: line 82
Test interactions between components and external systems.
- Distinctive: line 84
Use separate test configurations and databases.
- Distinctive: line 92
Run fast tests frequently during development.
- Distinctive: line 102
Never trust user input; sanitize and validate everything.
- Distinctive: line 104
Use parameterized queries to prevent SQL injection.
- Distinctive: line 108
Use secure defaults for tokens and sessions.
- Distinctive: line 116
Use HTTPS for all communications.
- Distinctive: line 120
Use circuit breakers for external service calls.
- Distinctive: line 136
Use connection pooling for database and network connections.
- Distinctive: line 144
Use appropriate cache invalidation strategies.
- Distinctive: line 146
Consider cache consistency and freshness requirements.
- Distinctive: line 152
Use structured logging (JSON format for production).
- Distinctive: line 158
Avoid logging sensitive information.
- Distinctive: line 166
Use dashboards for visibility into system health.
- Distinctive: line 180
Document public APIs with clear descriptions.
- Distinctive: line 184
Keep documentation close to the code it describes.
- Distinctive: line 186
Update documentation when code changes.
- Distinctive: line 192
Document architecture decisions (ADRs).
- Distinctive: line 200
Write clear, concise commit messages.
- Distinctive: line 204
Keep commits small and focused.
- Distinctive: line 208
Use feature branches for new development.
- Distinctive: line 210
Keep the main branch stable and deployable.
- Distinctive: line 218
Run tests automatically on every commit.
- Distinctive: line 226
Use consistent development environments across the team.
- Distinctive: line 228
Document setup steps and prerequisites.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
General Best Practices
A comprehensive collection of software development best practices applicable across various technology stacks and project types.
Code Quality
Readability and Maintainability
Write short, focused functions with a single responsibility.
Use clear, descriptive names for variables, functions, and classes.
Avoid deep nesting; prefer early returns and guard clauses.
Keep functions and methods to a reasonable length (typically under 30 lines).
Error Handling
Always handle errors explicitly rather than silently ignoring them.
Use wrapped errors for traceability and context.
Provide meaningful error messages that help with debugging.
Fail fast and fail loudly during development.
Code Organization
Organize code into logical modules and packages.
Separate concerns: keep business logic separate from infrastructure code.
Use consistent file and folder naming conventions.
Follow the principle of least surprise in API design.
Architecture
Clean Architecture Principles
Structure code into distinct layers:
- Presentation/Handlers: Handle external requests and responses
- Application/Services: Orchestrate business operations
- Domain: Core business logic and entities
- Infrastructure: External systems, databases, and frameworks
Design Principles
Prefer composition over inheritance.
Program to interfaces, not implementations.
Use dependency injection for testability and flexibility.
Design for change: isolate business logic and minimize framework lock-in.
Apply SOLID principles where appropriate.
Testing
Unit Testing
Write tests that are fast, isolated, and repeatable.
Use table-driven tests for testing multiple scenarios.
Mock external dependencies cleanly.
Aim for high test coverage of business-critical code.
Integration Testing
Test interactions between components and external systems.
Use separate test configurations and databases.
Clean up test data after each test run.
Test Organization
Separate fast unit tests from slower integration tests.
Run fast tests frequently during development.
Include tests in CI/CD pipelines.
Security
Input Validation
Validate all inputs at service boundaries.
Never trust user input; sanitize and validate everything.
Use parameterized queries to prevent SQL injection.
Authentication and Authorization
Use secure defaults for tokens and sessions.
Implement proper access control at every layer.
Store secrets securely; never commit them to version control.
Network Security
Use HTTPS for all communications.
Implement rate limiting to prevent abuse.
Use circuit breakers for external service calls.
Performance
Optimization Principles
Profile before optimizing; avoid premature optimization.
Measure and benchmark regularly.
Focus on hot paths and frequently executed code.
Resource Management
Minimize memory allocations in critical paths.
Use connection pooling for database and network connections.
Implement proper resource cleanup and disposal.
Caching
Cache expensive computations and frequently accessed data.
Use appropriate cache invalidation strategies.
Consider cache consistency and freshness requirements.
Observability
Logging
Use structured logging (JSON format for production).
Include relevant context: request IDs, user IDs, timestamps.
Log at appropriate levels: DEBUG, INFO, WARN, ERROR.
Avoid logging sensitive information.
Metrics
Track key metrics: latency, throughput, error rates.
Set up alerts for anomalies and threshold violations.
Use dashboards for visibility into system health.
Tracing
Implement distributed tracing for microservices.
Propagate trace context across service boundaries.
Record important attributes in spans for debugging.
Documentation
Code Documentation
Document public APIs with clear descriptions.
Explain the "why" not just the "what".
Keep documentation close to the code it describes.
Update documentation when code changes.
Project Documentation
Maintain a clear README with setup instructions.
Document architecture decisions (ADRs).
Provide contribution guidelines for team members.
Version Control
Commit Practices
Write clear, concise commit messages.
Make atomic commits that represent a single logical change.
Keep commits small and focused.
Branch Strategy
Use feature branches for new development.
Keep the main branch stable and deployable.
Review code before merging to main.
Tooling and Automation
Continuous Integration
Run tests automatically on every commit.
Enforce code formatting and linting.
Include security scanning in the pipeline.
Development Environment
Use consistent development environments across the team.
Document setup steps and prerequisites.
Automate common development tasks.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

