一键导入
backend-architecture-go-gin
Idiomatic Go, Clean Architecture, and Gin routing best practices
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Idiomatic Go, Clean Architecture, and Gin routing best practices
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Syncs Telegram supergroup topics into local task files and GitHub issues, using embedded Python scripts for deterministic JSON state management. Preserves raw bilingual messages verbatim, injects refactored prompts, and correlates codebase context.
100% Jetpack Compose, MVI (UDF), Hilt, and SQLDelight for token-efficient, zero-hallucination Android development.
NestJS, Prisma ORM, Vertical Slice Architecture, and Strict TypeScript for zero-hallucination backend development.
Expo Managed Workflow, Expo Router, NativeWind, and Strict TypeScript for zero-hallucination cross-platform apps.
Automatically generates decentralized task files based on manager instructions.
Hexagonal Architecture (Ports and Adapters), gRPC, Uber Fx, and Redis caching for ultra-low latency Go backends.
| name | backend-architecture-go-gin |
| description | Idiomatic Go, Clean Architecture, and Gin routing best practices |
panic. Always return errors explicitly (%w). This creates a traceable breadcrumb trail for AI debugging tools.UserRepository). This makes AI-driven unit testing and mocking highly reliable.project/
├── cmd/ # Application entry points
│ └── server/
│ └── main.go
├── internal/ # Private application code
│ ├── config/ # Environment loading (viper/godotenv)
│ ├── handlers/ # Gin HTTP handlers/controllers
│ ├── models/ # Domain structs and interfaces
│ ├── repository/ # Database access layer
│ └── service/ # Business logic
├── pkg/ # Public utility libraries (optional)
├── go.mod
└── go.sum
snake_case or lowercase (e.g., user_repository.go)PascalCase for exported, camelCase for unexported.PascalCase (e.g., CreateUser).-er (e.g., UserReader, DataWriter).Handler -> Service -> Repository. Handlers parse JSON and return HTTP codes. Services hold business logic. Repositories handle SQL.func NewUserService(repo models.UserRepository) *UserService.error as the last return value. Wrap errors with context (fmt.Errorf("failed to fetch user: %w", err)).context.Context down the call chain to handle timeouts and cancellation.testing package + testify for assertions/mocks.mockery or gomock for the Repository and Service layers.