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

domain-error-types.jsonverifiers/

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

tile.json