skills/go-skills/gin-gonic/SKILL.md
Guides Go web development with the Gin-Gonic HTTP framework including routing, route groups, middleware, JSON binding, validation, error handling, and graceful shutdown. Use when the user needs to build REST APIs or HTTP services with Gin-Gonic (alias for the Gin framework).
npx skillsauth add partme-ai/full-stack-skills gin-gonicInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use this skill whenever the user wants to:
gin.Default() includes Logger and Recovery middlewareShouldBindJSON or ShouldBindQuery with struct tagsc.JSON() for consistent API responsespackage main
import (
"net/http"
"github.com/gin-gonic/gin"
)
type CreateUserRequest struct {
Name string `json:"name" binding:"required,min=2"`
Email string `json:"email" binding:"required,email"`
}
func main() {
r := gin.Default()
// Route group with auth middleware
api := r.Group("/api/v1")
{
api.POST("/users", createUser)
api.GET("/users/:id", getUser)
}
r.Run(":8080")
}
func createUser(c *gin.Context) {
var req CreateUserRequest
if err := c.ShouldBindJSON(&req); err != nil {
c.JSON(http.StatusBadRequest, gin.H{"error": err.Error()})
return
}
// ... create user logic
c.JSON(http.StatusCreated, gin.H{"name": req.Name, "email": req.Email})
}
func getUser(c *gin.Context) {
id := c.Param("id")
c.JSON(http.StatusOK, gin.H{"id": id})
}
/api/v1/users)binding:"required,email" for declarative validationhttp.Server with srv.Shutdown(ctx) for clean connection draininggin.New() and add only the middleware you needgin-gonic, gin, Go, web framework, REST API, routing, middleware, JSON binding, 路由, 中间件
development
Provides per-component and per-API examples with cross-platform compatibility details for uni-app, covering built-in components, uni-ui components, and APIs (network, storage, device, UI, navigation, media). Use when the user needs official uni-app components or APIs, wants per-component examples with doc links, or needs platform compatibility checks.
tools
Creates new uni-app projects via the official CLI or HBuilderX with Vue 2/Vue 3 template selection, manifest.json and pages.json configuration, and directory structure setup. Use when the user wants to scaffold a new uni-app project, initialize project files with a single command, or set up the development environment.
tools
Browses, installs, configures, and manages plugins from the uni-app plugin market (ext.dcloud.net.cn) including component plugins, API plugins, and template plugins with dependency handling. Use when the user needs to find and install uni-app plugins, configure plugin settings, manage plugin dependencies, or integrate third-party components.
tools
Develops native Android and iOS plugins for uni-app including module creation, JavaScript-to-native communication, and plugin packaging for distribution. Use when the user needs to build custom native modules, extend uni-app with native capabilities (camera, Bluetooth, sensors), or create publishable native plugins.