go-api-development
Skill266 starsChanged 10 months agoApache-2.0View on GitHub
Go API development guidelines using the standard library (1.22+) with best practices for RESTful API design, error handling, and security
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
21 rules. About 0 are common, 19 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈19
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 10
Always use the latest stable version of Go (1.22 or newer) and be familiar with RESTful API design principles, net/http package, and the …
- Distinctive: line 11
Follow the user's requirements carefully and to the letter
- Distinctive: line 13
Write correct, up-to-date, bug-free, fully functional, secure, and efficient Go code for APIs
- Distinctive: line 14
Leave NO todos, placeholders, or missing pieces in the API implementation
- Distinctive: line 15
Always prioritize security, scalability, and maintainability in your API designs
- Very specific: line 21
Use the new http.ServeMux introduced in Go 1.22 for routing
- Distinctive: line 23
Use appropriate HTTP status codes for responses
- Distinctive: line 30
Use structured error responses in JSON format
- Very specific: line 42
Use encoding/json for JSON serialization/deserialization
- Distinctive: line 45
Use appropriate JSON formatting for responses
- Distinctive: line 50
Use goroutines for concurrent operations where beneficial
- Distinctive: line 52
Use context for request cancellation and timeouts
- Distinctive: line 57
Use middleware chaining for composable request processing
- Distinctive: line 59
Add request/response logging middleware
- Distinctive: line 64
Use HTTPS in production
- Distinctive: line 67
Use secure defaults for cookies and sessions
- Distinctive: line 71
Use standard library logging with structured output
- Distinctive: line 73
Avoid logging sensitive information
- Distinctive: line 74
Use log levels appropriately
- Distinctive: line 78
Write unit tests for handlers and business logic
- Distinctive: line 80
Use table-driven tests where appropriate
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 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 API Development with Standard Library
Core Principles
- Always use the latest stable version of Go (1.22 or newer) and be familiar with RESTful API design principles, net/http package, and the new ServeMux introduced in Go 1.22
- Follow the user's requirements carefully and to the letter
- First think step-by-step - describe your plan for the API structure, endpoints, and data flow in pseudocode, written out in great detail
- Write correct, up-to-date, bug-free, fully functional, secure, and efficient Go code for APIs
- Leave NO todos, placeholders, or missing pieces in the API implementation
- Always prioritize security, scalability, and maintainability in your API designs
API Development Guidelines
Routing and HTTP Handling
- Use the new
http.ServeMuxintroduced in Go 1.22 for routing - Implement proper HTTP method handling (GET, POST, PUT, DELETE, PATCH)
- Use appropriate HTTP status codes for responses
- Implement proper content-type handling for requests and responses
Error Handling
- Implement proper error handling, including custom error types when beneficial
- Return appropriate HTTP status codes with error responses
- Use structured error responses in JSON format
- Log errors appropriately for debugging and monitoring
Input Validation
- Implement input validation for API endpoints
- Validate request bodies, query parameters, and path parameters
- Return clear validation error messages to clients
- Sanitize inputs to prevent injection attacks
JSON Handling
- Use
encoding/jsonfor JSON serialization/deserialization - Implement proper struct tags for JSON field mapping
- Handle JSON parsing errors gracefully
- Use appropriate JSON formatting for responses
Concurrency
- Leverage Go's built-in concurrency features when appropriate for API performance
- Use goroutines for concurrent operations where beneficial
- Implement proper synchronization for shared state
- Use context for request cancellation and timeouts
Middleware
- Implement middleware for cross-cutting concerns (logging, authentication, rate limiting)
- Use middleware chaining for composable request processing
- Implement CORS handling where needed
- Add request/response logging middleware
Security
- Implement authentication and authorization where appropriate
- Use HTTPS in production
- Implement rate limiting to prevent abuse
- Validate and sanitize all user inputs
- Use secure defaults for cookies and sessions
Logging
- Use standard library logging with structured output
- Log appropriate information for debugging and monitoring
- Avoid logging sensitive information
- Use log levels appropriately
Testing
- Write unit tests for handlers and business logic
- Implement integration tests for API endpoints
- Use table-driven tests where appropriate
- Mock external dependencies in tests
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.

