Go project structure -- cmd/internal layout, handler/service/repository layers, Makefile, config from environment, domain error types, test placement, dependency injection
90
84%
Does it follow best practices?
Impact
100%
1.02xAverage score across 5 eval scenarios
Passed
No known issues
{
"instruction": "Define domain-specific error types for structured error responses",
"relevant_when": "Agent builds a Go web API that returns error responses",
"context": "Go web services should define domain error types (NotFound, Validation, Conflict) in internal/domain/errors.go with a base AppError struct. Handlers use errors.As to map domain errors to HTTP status codes. This avoids scattered http.Error calls and ensures consistent error response format across all endpoints.",
"sources": [
{
"type": "file",
"filename": "skills/go-project-structure/SKILL.md",
"tile": "tessl-labs/go-project-structure@0.2.0"
}
],
"checklist": [
{
"name": "domain-error-types",
"rule": "Domain-specific error types (e.g., NotFoundError, ValidationError) are defined in a domain or errors package, not scattered across handlers",
"relevant_when": "Agent creates a Go web API with error handling"
},
{
"name": "error-to-http-mapping",
"rule": "A centralized writeError or error handler function maps domain errors to appropriate HTTP status codes",
"relevant_when": "Agent creates Go HTTP handlers that return errors"
}
]
}