CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl-labs/go-project-structure

Go project structure -- cmd/internal layout, handler/service/repository layers, Makefile, config from environment, domain error types, test placement, dependency injection

90

1.02x
Quality

84%

Does it follow best practices?

Impact

100%

1.02x

Average score across 5 eval scenarios

SecuritybySnyk

Passed

No known issues

Overview
Quality
Evals
Security
Files

config-from-environment.jsonverifiers/

{
  "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"
    }
  ]
}

tile.json