Go Service Rules

    1

    Enforce memory-safe concurrency, context propagation, and structured error handling in Go services.

    $6.99

    Secure checkout via Stripe

    30-day refund guarantee

    Converts to your local currency at checkout

    0 installsSecurity scanned

    Works with the AI tools you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIGitHub CopilotGitHub CopilotGemini CLIGemini CLI+20 more

    Go Service Rules

    Example session with this skill installed

    Our sync service memory climbs until it gets OOM killed. It fans out to an API, one goroutine per order, results on a channel. If one fails, we return the error. How do I fix the leak?

    • Read your context and instructions
    • Compiled the go service rules

    Concurrency map

    One goroutine per order, unbounded. One results channel with no buffer.

    Findings

    sync.go: Goroutine Lifetime rule 3. On error return, in-flight goroutines block forever on the unbuffered channel.

    Patch

    [Full code using errgroup.SetLimit and buffered channels...]

    Connects securely to your tools. The creator never sees your data.

    What you get

    Prevent memory leaks by defining explicit goroutine exit paths.Implement bounded concurrency for API fan-out using errgroup.Harden HTTP servers with proper read/write timeouts and graceful shutdown.Standardize error wrapping and inspection using errors.Is and errors.As.

    About this skill

    The problem

    Go makes concurrency easy to write but difficult to debug at scale. Silent goroutine leaks, unbuffered channel deadlocks, and missing context deadlines often pass unit tests only to crash services under production load.

    What it does

    • Analyzes goroutine lifetimes to ensure every routine has a defined exit path and cancellation listener.
    • Identifies unsafe channel patterns, including receiver-side closes and unbuffered sends that lack select blocks.
    • Audits context propagation to prevent disconnected cancellation chains and missing request deadlines.
    • Refactors error handling to use structured wrapping with errors.Is and errors.As instead of bare returns.
    • Hardens net/http implementations by enforcing timeouts and graceful shutdown sequences.

    Frameworks & tools

    Go 1.22+, errgroup, context, net/http, and the Go race detector.

    Why this beats prompting it yourself

    Generic LLMs often suggest code that compiles but leaks memory. This skill applies a strict "Starter owns the Stopper" ownership model and forces a Concurrency Map for every change, ensuring structural integrity that a standard prompt misses.

    Use cases

    • Fixing OOM kills caused by growing goroutine counts in long-running services.
    • Implementing safe fan-out patterns using limited errgroup concurrency.
    • Adding graceful shutdown to HTTP servers to prevent dropped requests during deployments.
    • Standardizing error wrapping across a microservice to improve observability.

    Known limitations

    This skill reviews and rewrites code in the editor but does not execute go test, the race detector, or profilers. Verification requires manual command execution.

    How to install

    Works the same in every agent - Claude, Cursor, Codex, Copilot and 20+ more.

    ~30 seconds
    1. 1

      Download the ZIP

      Free skills download straight away. Paid skills unlock right after purchase.

    2. 2

      Unzip into your skills folder

      Every agent reads skills from one folder on your machine. Drop the unzipped folder in there.

    3. 3

      Ask your agent to use it

      Restart the agent if it was already running. It picks the skill up automatically - no config needed.

    Skills folder by agent

    Click the path to copy it. Create the folder if it does not exist yet.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill passes our trust checks below.

    Security scanned

    Passed our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    30-day refund

    Not a fit? Get your money back

    Trust & safety

    Security scanned

    Verified clean 1 month ago

    • Passed all security checks, Safe to install

    Listed1 month ago

    What's inside

    Frequently Asked Questions