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": "Load configuration from environment variables with sensible defaults",
"relevant_when": "Agent creates a Go application with configurable settings like port, database URL, or API keys",
"context": "Configuration must be loaded from environment variables, not hardcoded. Use a Config struct in internal/config/ with a Load() function. Every config field must have a sensible default so the application can start without a .env file. Use os.Getenv with fallback helpers, or envconfig/viper for larger projects. Never hardcode connection strings, ports, or secrets in source code.",
"sources": [
{
"type": "file",
"filename": "skills/go-project-structure/SKILL.md",
"tile": "tessl-labs/go-project-structure@0.2.0"
}
],
"checklist": [
{
"name": "config-struct",
"rule": "A Config struct exists in its own package (internal/config/) with typed fields for all configurable values",
"relevant_when": "Agent creates a Go application with configuration"
},
{
"name": "env-vars-with-defaults",
"rule": "Configuration values are read from environment variables with sensible fallback defaults",
"relevant_when": "Agent creates a configuration loader"
},
{
"name": "no-hardcoded-config",
"rule": "Connection strings, ports, API keys, and secrets are not hardcoded in source code",
"relevant_when": "Agent creates a Go application that connects to databases or external services"
}
]
}