general-best-practices

General software development best practices covering code quality, testing, security, performance, and maintainability across technology stacks

16 stars

Best use case

general-best-practices is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

General software development best practices covering code quality, testing, security, performance, and maintainability across technology stacks

Teams using general-best-practices should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/general-best-practices/SKILL.md --create-dirs "https://raw.githubusercontent.com/diegosouzapw/awesome-omni-skill/main/skills/development/general-best-practices/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/general-best-practices/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How general-best-practices Compares

Feature / Agentgeneral-best-practicesStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

General software development best practices covering code quality, testing, security, performance, and maintainability across technology stacks

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

# 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.

Related Skills

lit-best-practices

16
from diegosouzapw/awesome-omni-skill

Lit web components best practices and performance optimization guidelines. Use when writing, reviewing, or refactoring Lit web components. Triggers on tasks involving Lit components, custom elements, shadow DOM, reactive properties, or web component performance.

laravel-12-best-practices

16
from diegosouzapw/awesome-omni-skill

Software engineering best practices for Laravel 12.x, covering architecture, Eloquent, testing, security, and the new starter kits.

kafka-development-practices

16
from diegosouzapw/awesome-omni-skill

Applies general coding standards and best practices for Kafka development with Scala.

jupyter-notebook-best-practices

16
from diegosouzapw/awesome-omni-skill

Guidelines for structuring and documenting Jupyter notebooks for reproducibility and clarity.

js-ts-best-practices

16
from diegosouzapw/awesome-omni-skill

JavaScript and TypeScript best practices covering naming conventions, control flow, state management, TypeScript patterns (avoid any/enum, prefer type over interface), safety (input validation, assertions, error handling), performance optimization (reduce branching/looping, memoization, defer await, cache property access, storage API caching), and documentation (JSDoc, comment markers). Use when writing JS/TS functions, refactoring code for performance, reviewing code quality, fixing type errors, optimizing loops or conditionals, adding validation, or improving error messages.

golang-best-practices

16
from diegosouzapw/awesome-omni-skill

Comprehensive Go code review meta-skill. Coordinates 5 specialized domain skills. For targeted reviews, use domain-specific skills (concurrency-safety, clean-architecture). For full audits, use this meta-skill.

general-principles

16
from diegosouzapw/awesome-omni-skill

Apply for general-principles. --- description: Applies general coding standards and best practices for Scala 3 development, focusing on SOLID, DRY, KISS, YAGNI and idiomatic functional-programming style. Tailored for an sbt projec

fastapi-best-practices

16
from diegosouzapw/awesome-omni-skill

FastAPI best practices e convenções baseadas em produção real. Aplicar em todos os projetos FastAPI.

express-typescript-api-best-practices

16
from diegosouzapw/awesome-omni-skill

Professional-grade REST API architecture with Express.js and TypeScript following SOLID principles, layered architecture, transaction management, JWT authentication with role-based authorization (RBAC), input validation with Zod, OpenAPI/Swagger documentation, standardized response format, and production-ready patterns. Use when building or refactoring REST APIs with Express + TypeScript that require enterprise-level code quality, maintainability, scalability, and security.

dataverse-python-best-practices

16
from diegosouzapw/awesome-omni-skill

dataverse-python-best-practices guidelines

convex-development-general

16
from diegosouzapw/awesome-omni-skill

Applies general rules for Convex development, emphasizing schema design, validator usage, and correct handling of system fields.

better-auth-best-practices

16
from diegosouzapw/awesome-omni-skill

Skill for integrating Better Auth - the comprehensive TypeScript authentication framework.