partme-ai/full-stack-skills
Overview
This skill provides comprehensive guidance for building web services with the Gin web framework for Go. It covers routing, middleware, request handling, JSON binding, validation, testing, and best practices for API development. Use it to accelerate development of REST APIs and production-ready Go web applications.
How this skill works
The skill explains core Gin concepts and inspects common patterns: route setup, grouping, parameter binding, middleware chaining, error handling, and response formatting. It provides concrete code patterns for JSON binding, validation, CORS, authentication hooks, and graceful shutdown. It also recommends testing approaches and deployment considerations for performance and observability.
When to use it
- Creating new REST APIs or microservices in Go
- Implementing route handlers, grouping, and versioned endpoints
- Adding middleware for logging, authentication, or rate limiting
- Handling JSON binding, validation errors, and multipart uploads
- Improving performance, testing handlers, or preparing for deployment
Best practices
- Define clear route groups and versioning (e.g., /v1/) to minimize breaking changes
- Use context-aware handlers and avoid global state; pass dependencies via structs
- Validate and sanitize input with binding tags and explicit checks; return consistent error payloads
- Keep middleware focused and composable: logging, auth, recovery, and CORS in separate layers
- Benchmark critical endpoints and use graceful shutdown to avoid dropping requests
Example use cases
- Scaffold a CRUD API with Gin, including models, handlers, and route groups
- Add JWT authentication middleware and role-based authorization to endpoints
- Implement file upload endpoints with size limits and streaming processing
- Create healthcheck and metrics endpoints for Kubernetes and Prometheus
- Write unit and integration tests for handlers using httptest and Gin test utilities
FAQ
Use c.ShouldBindJSON(&obj) with struct tags (json, binding) and a validation library like go-playground/validator; check errors and return consistent error responses.
Where do I put middleware for logging and authentication?
Register recovery and logging middleware globally, then apply authentication or rate-limiting middleware to specific route groups where needed.
10 skills
This skill helps you build and optimize Gin web applications with routing, middleware, JSON binding, and REST API guidance.
This skill guides you through installing, configuring, and using Element Plus with Vue 3, including theming and API reference.
This skill helps you work with MongoDB by guiding document operations, queries, aggregation, indexes, and best practices for scalable data design.
This skill helps you master PostgreSQL by guiding complex queries, performance tuning, JSON support, and full-text search for robust database work.
This skill automates browser tasks via the agent-browser CLI, enabling AI agents to interact with web pages reliably using refs, semantic locators, and
This skill helps you create and optimize GitHub Actions workflows and CI/CD pipelines with practical guidance and automation tips.
This skill helps you build cross-platform desktop apps with Electron by guiding main/renderer processes, IPC, windows, packaging, and best practices.
This skill helps you build Flutter apps by guiding widgets, state management, navigation, and platform integration with practical best practices.
This skill guides you through building and refactoring NestJS apps using official docs, covering controllers, modules, DI, GraphQL, security, and testing.
This skill provides guidance on clean architecture, outlining layer separation, dependency rules, and architectural patterns to structure robust applications.