Notre avis
Génère une structure complète de projet Go pour un service API prêt pour la production, incluant les configurations locales, l'observabilité et les tests.
Points forts
- Structure de projet complète avec séparation claire des couches (API, config, base de données, logs, métriques).
- Intégration native de l'observabilité (traces, logs structurés, métriques) via Docker Compose.
- Boilerplate prêt à l'emploi avec des templates pour Makefile, middleware, et gestion des erreurs.
Limites
- Nécessite une connaissance de base de Go et de l'architecture microservices.
- La structure générée peut être trop lourde pour des projets très simples.
- Les templates sont statiques et nécessitent des ajustements pour des cas d'utilisation spécifiques.
Idéal lors du démarrage d'un nouveau service Go avec des exigences de production, de l'observabilité et une architecture propre.
Évitez pour des scripts Go simples, des prototypes rapides ou des projets où la surcharge de configuration initiale n'est pas justifiée.
Analyse de sécurité
SûrThe skill only generates project boilerplate and instructions; it does not execute any commands that could cause harm, exfiltrate data, or disable security measures. All local commands (make, docker-compose) are standard development practices.
Aucun point d'attention détecté
Exemples
Create a new Go API service called user-service with module path github.com/myorg/user-serviceGenerate a Go microservice for order management named order-service, module path github.com/company/order-serviceStart a new Go API project named config-manager with module github.com/team/config-managername: go-api description: Create a new Go API service. Use when starting a new Go service, API project, or microservice. Generates complete boilerplate with local development and observability.
Go API Service
Create a production-ready Go API service.
Instructions
When asked to create a new Go API service:
- Ask for the service name (kebab-case, e.g.,
user-service,config-manager) - Ask for the module path (e.g.,
github.com/myorg/myservice) - Generate the complete project structure using the templates below
- Replace placeholders (
{SERVICE_NAME},{SERVICE_NAME_SNAKE},{SERVICE_NAME_PASCAL},{MODULE_PATH}) with appropriate values
Project Structure
Generate the following structure:
{SERVICE_NAME}/
├── cmd/
│ └── api/
│ └── main.go
├── internal/
│ ├── api/
│ │ ├── api.go
│ │ └── README.md
│ ├── config/
│ │ ├── config.go
│ │ └── README.md
│ ├── contextx/
│ │ ├── contextx.go
│ │ └── README.md
│ ├── deps/
│ │ ├── deps.go
│ │ └── README.md
│ ├── env/
│ │ ├── env.go
│ │ └── README.md
│ ├── errorsx/
│ │ ├── errorsx.go
│ │ └── README.md
│ ├── httpx/
│ │ ├── httpx.go
│ │ └── README.md
│ ├── logx/
│ │ ├── logx.go
│ │ └── README.md
│ ├── metrics/
│ │ ├── metrics.go
│ │ └── README.md
│ ├── middleware/
│ │ ├── middleware.go
│ │ └── README.md
│ ├── mysql/
│ │ ├── mysql.go
│ │ └── README.md
│ ├── redis/
│ │ ├── redis.go
│ │ └── README.md
│ └── traces/
│ ├── traces.go
│ └── README.md
├── docs/
│ ├── projects/
│ │ ├── completed/
│ │ └── README.md
│ └── architecture.md
├── e2e/
│ ├── doc.go
│ └── helpers_test.go
├── local/
│ ├── config/
│ │ └── api.json
│ ├── mysql/
│ │ ├── docker-compose.yml
│ │ └── initdb.d/
│ │ └── 01-schema.sql
│ └── observability/
│ └── docker-compose.yaml
├── scripts/
│ └── .gitkeep
├── go.mod
├── go.sum
├── Makefile
├── CLAUDE.md
└── README.md
Key Patterns
Clean Architecture
handlers (HTTP) → service (business logic) → repository (data) → model (entities)
Package Naming
Use x suffix for packages that shadow stdlib: logx, httpx, timex, errorsx, contextx
Error Handling
return nil, fmt.Errorf("service: failed to create config: %w", err)
Structured Logging
logger.LogAttrs(ctx, slog.LevelError, "create_config",
slog.String("config_id", configID),
slog.Any("err", err),
)
Tracing
spanFunc := func(ctx context.Context) error {
traces.AddAttributesToCurrentSpan(ctx,
attribute.String("config_id", configID),
)
// ... operation
return nil
}
err := traces.WithSpan(ctx, s.tracer, "service.CreateConfig", spanFunc)
Templates
When generating files, use the templates in the templates/ directory:
- Makefile - Build, test, lint, run commands
- MySQL Docker Compose - Local database
- Observability Stack - Grafana, Tempo, Loki, Prometheus
- Local Config - JSON configuration
- internal/api - API server setup
- internal/config - Configuration management
- internal/logx - Structured logging
- internal/middleware - HTTP middleware pipeline
- go.mod - Dependencies
Running Locally
After generation:
# First-time setup
make tools-install
# Start full stack (API + MySQL + Redis + Observability)
make run
# Run tests
make test
# Run integration tests
make test-integration
# Run all linters
make lint-all
Documentation
- Place all documentation in
docs/ - Project plans go in
docs/projects/ - Move completed plans to
docs/projects/completed/ - Each internal package MUST have a
README.mdexplaining its purpose and usage
Expert Next.js App Router
Developpement
Un skill qui transforme Claude en expert Next.js App Router.
Générateur de README
Developpement
Crée des README.md professionnels et complets pour vos projets.
Rédacteur de Documentation API
Developpement
Génère de la documentation API complète au format OpenAPI/Swagger.