go-service-delivery

Guide Go HTTP service changes with context propagation and typed errors.

Updated Apr 27, 2026
One-click install
npx skills add https://github.com/vTRKA/supervibe --skill go-service-delivery
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: go-service-delivery
Source: https://github.com/vTRKA/supervibe/tree/main/skills/go-service-delivery
Command: npx skills add https://github.com/vTRKA/supervibe --skill go-service-delivery

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

It prevents error-prone, context-breaking Go service edits by turning a task into a production-shaped change that keeps responsibilities clear, propagates cancellation correctly, and enforces rollback discipline with verification evidence.

Core Features & Use Cases

  • Context-safe service and repository delivery: Ensures every exported blocking method accepts ctx context.Context and passes it through to DB/HTTP/cache/queues and goroutine supervisors.
  • Typed error semantics with boundary mapping: Uses sentinel/typed errors, wraps with %w, maps once at the boundary, and tests errors.Is/errors.As instead of string matching.
  • Concurrency, shutdown, observability, and rollback guardrails: Captures goroutine lifetime contracts, adds cancellation/signal drain evidence when shutdown changes, preserves/extends logging or metrics via existing paths, and documents reversible migration/rollback paths.
  • Table-driven verification: Drives focused, scenario-based tests for success, validation failures, typed error mapping, cancellation/timeouts, idempotency/duplicates, and persistence failures, then runs scoped Go commands and a race check where appropriate.

Quick Start

Ask your AI to apply go-service-delivery to your Go HTTP/worker task by first reading the project’s source of truth, then proposing the smallest owned slice with typed errors, context propagation, table-driven tests, and an explicit rollback plan.

Frequently Asked Questions about go-service-delivery

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I ensure context propagation is correct in a Go HTTP service?

To ensure correct context propagation in a Go HTTP service, every exported blocking method must accept `ctx context.Context` and pass it through to DB, HTTP, cache, queue, and goroutine supervisor calls. This prevents cancellation signals from being dropped.

What is the best way to handle typed errors at service boundaries in Go?

Handling typed errors at Go service boundaries involves using sentinel or typed errors, wrapping them with `%w`, mapping them once at the boundary, and testing with `errors.Is` or `errors.As` rather than relying on string matching. This maintains clear error semantics.

How do I implement graceful shutdown and concurrency lifecycle control in Go workers?

Implementing graceful shutdown and concurrency lifecycle control in Go workers requires capturing goroutine lifetime contracts and adding cancellation or signal drain evidence. You must preserve existing logging and metrics paths while documenting the shutdown sequence.

How do I write table-driven tests for Go service cancellation and persistence failures?

Writing table-driven tests for Go service failures involves creating scenario-based cases for validation failures, typed error mapping, cancellation, timeouts, idempotency, and persistence errors. You then run focused scoped Go commands and race checks to verify the behavior.

When do I need a rollback plan for Go service migrations and repository changes?

A rollback plan for Go service migrations and repository changes is needed whenever you alter persistence layers or request validation. Documenting reversible migration and rollback paths ensures you can safely return the database or service to its previous state if the deployment fails.

Can I use this approach to review existing handler and service boundaries in a Go codebase?

Yes, you can use this approach to review existing handler, service, and repository boundaries in a Go codebase. It evaluates whether responsibilities are clearly separated, context is propagated correctly, and observability instrumentation is preserved through existing logging paths.