go-backend-microservices
Skill275 starsChanged 53 days agoApache-2.0View on GitHub
Go backend development best practices for microservices with clean architecture, observability, and production-ready patterns
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
22 rules. About 0 are common, 21 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈21
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 15
Write short, focused functions with a single responsibility
- Distinctive: line 16
Ensure safe use of goroutines, and guard shared state with channels or sync primitives
- Distinctive: line 34
Always check and handle errors explicitly
- Very specific: line 35
Use wrapped errors for traceability: fmt.Errorf("context: %w", err)
- Distinctive: line 36
Create custom error types for domain-specific errors
- Distinctive: line 42
Use context propagation for request-scoped values, deadlines, and cancellations
- Distinctive: line 52
Add spans for significant operations
- Distinctive: line 58
Use standard metric types (counters, gauges, histograms)
- Distinctive: line 62
Use structured logging with consistent field names
- Distinctive: line 69
Use secure defaults for JWT tokens and cookies
- Distinctive: line 72
Use prepared statements for database queries
- Distinctive: line 77
Write table-driven unit tests with adequate coverage
- Distinctive: line 78
Use parallel test execution where safe
- Distinctive: line 84
Use test containers for database and service dependencies
- Distinctive: line 85
Test actual API endpoints and responses
- Distinctive: line 89
Use goroutines appropriately for concurrent operations
- Distinctive: line 92
Use worker pools for bounded concurrency
- Distinctive: line 96
Document with GoDoc-style comments
- Distinctive: line 97
Keep comments up to date with code changes
- Distinctive: line 98
Document public APIs thoroughly
- Distinctive: line 104
Use golangci-lint for comprehensive linting
- Distinctive: line 105
Run tests on every pull request
≈ “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
Go Backend Development for Microservices
Core Principles
- Apply Clean Architecture with clear separation into handlers, services, repositories, and domain models
- Prioritize interface-driven development with explicit dependency injection
- Write short, focused functions with a single responsibility
- Ensure safe use of goroutines, and guard shared state with channels or sync primitives
Project Structure
Maintain modular project structure with clear directories:
project/
├── cmd/ # Application entry points
├── internal/ # Private application code
├── pkg/ # Public library code
├── api/ # API definitions (OpenAPI, protobuf)
├── configs/ # Configuration files
└── test/ # Additional test utilitiesError Handling
- Always check and handle errors explicitly
- Use wrapped errors for traceability:
fmt.Errorf("context: %w", err) - Create custom error types for domain-specific errors
- Return errors up the call stack with appropriate context
- Log errors at the appropriate level with sufficient context
Context Propagation
- Use context propagation for request-scoped values, deadlines, and cancellations
- Pass context as the first parameter to functions
- Respect context cancellation in long-running operations
- Set appropriate timeouts for external calls
Observability
Implement OpenTelemetry for comprehensive observability:
Distributed Tracing
- Add spans for significant operations
- Propagate trace context across service boundaries
- Include relevant attributes in spans
Metrics
- Implement custom metrics for business operations
- Use standard metric types (counters, gauges, histograms)
- Export metrics in Prometheus format
Structured Logging
- Use structured logging with consistent field names
- Include trace IDs in log entries
- Log at appropriate levels (debug, info, warn, error)
Security
- Apply input validation rigorously on all external inputs
- Use secure defaults for JWT tokens and cookies
- Implement proper authentication and authorization
- Sanitize data before logging to avoid leaking sensitive information
- Use prepared statements for database queries
Testing
Unit Tests
- Write table-driven unit tests with adequate coverage
- Use parallel test execution where safe
- Mock external dependencies using interfaces
- Focus on testing business logic
Integration Tests
- Separate integration tests from unit tests
- Use test containers for database and service dependencies
- Test actual API endpoints and responses
Concurrency
- Use goroutines appropriately for concurrent operations
- Guard shared state with channels or sync primitives
- Implement proper graceful shutdown
- Use worker pools for bounded concurrency
Documentation
- Document with GoDoc-style comments
- Keep comments up to date with code changes
- Document public APIs thoroughly
- Include examples in documentation where helpful
CI/CD Integration
- Maintain CI integration for linting and testing
- Use golangci-lint for comprehensive linting
- Run tests on every pull request
- Include code coverage reporting
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.

