
Go backend
Guides an agent to write idiomatic Go backend services with typed errors and tests
Go backend is an open-source agent skill for developer tools. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.
- Scripts
- None
- Platforms
- Claude Code, Codex, Cursor
- GitHub stars
- 8
- Last commit
- License
- MIT
- Listing updated
Similar skills
About Go backend
This skill gives an AI coding agent a set of conventions for building Go HTTP services. It covers how to lay out packages by domain, how to propagate context and wrap errors, and how to map domain errors to HTTP status codes in one place. Handlers are kept thin, with decoding, validation and encoding separated from business logic.
For data access it describes a sqlc and pgx v5 setup with a connection pool, query files kept outside generated code, transactions with rollback handling, and reliance on database constraints for invariants. It also sets rules for structured logging with slog, goroutine ownership with errgroup, and testing with table-driven tests, httptest, and real Postgres through testcontainers. The skill tells the agent to defer to a repository's existing patterns where they exist.
The skill is plain instructions with no bundled scripts. It expects a Go project and, for the database parts, sqlc and PostgreSQL. It refers to a separate database-migrations skill for code generation details and lists commands such as go test with the race detector and go generate.
When your agent uses it
Idiomatic Go service code for factory jobs - package layout, context propagation, error wrapping and typed domain errors mapped to HTTP, thin handlers, sqlc + pgx with transactions, slog logging, and testing with table-driven tests, httptest, testcontainers and the race detector. Use when writing or reviewing Go backend code.
From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.
What it can access
From a static check of its 1 file (6 KB) on GitHub on 2 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.
Check another skill before you install it.
Install
This skill ships in the forgeline plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):
/plugin marketplace add Nabwinsaud/forgeline
/plugin install forgeline@forgelineOr copy only this skill to ~/.claude/skills/go-backend:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/Nabwinsaud/forgeline.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/go-backend &&
cp -R "$tmp/skills/go-backend" ~/.claude/skills/go-backend &&
rm -rf "$tmp"For one project only, put the folder in .claude/skills/go-backend inside it instead.
Copy the skill folder to ~/.agents/skills/go-backend to use it in every repository:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/Nabwinsaud/forgeline.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/go-backend &&
cp -R "$tmp/skills/go-backend" ~/.agents/skills/go-backend &&
rm -rf "$tmp"For one repository only, put the folder in .agents/skills/go-backend inside it instead.
Copy the skill folder to ~/.cursor/skills/go-backend to use it in every project:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/Nabwinsaud/forgeline.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/go-backend &&
cp -R "$tmp/skills/go-backend" ~/.cursor/skills/go-backend &&
rm -rf "$tmp"For one project only, put the folder in .cursor/skills/go-backend inside it instead.
Run in a terminal (add --scope workspace to install it for the current workspace only):
gemini skills install https://github.com/Nabwinsaud/forgeline.git --path skills/go-backendOr copy the folder to ~/.gemini/skills/go-backend yourself.
For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/go-backend:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/Nabwinsaud/forgeline.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/go-backend &&
cp -R "$tmp/skills/go-backend" ~/.copilot/skills/go-backend &&
rm -rf "$tmp"For one project only, put the folder in .github/skills/go-backend inside it instead.
Get the folder:
git clone --depth 1 https://github.com/Nabwinsaud/forgeline.gitThen copy forgeline/skills/go-backend into your agent's skills folder as go-backend. Agents that support SKILL.md read one folder per skill.
What it does
- Package layout guidance
- Describes a cmd and internal structure with packages organized by domain rather than by layer.
- Error wrapping and HTTP mapping
- Shows wrapping with %w, errors.Is and errors.As checks, and a single function that maps domain errors to responses.
- Thin HTTP handlers
- Separates request decoding, validation, service calls and response encoding from business rules and SQL.
- sqlc and pgx transactions
- Covers pgxpool usage, sqlc query files, transactional writes and translating unique constraint violations into conflicts.
- Structured logging and concurrency
- Sets rules for slog JSON logging with context and for goroutine lifecycles using errgroup and mutexes.
- Table-driven and HTTP tests
- Provides patterns for table-driven subtests, httptest handler tests, and Postgres-backed tests with testcontainers.
Good for
- Write a new order endpoint in a Go service
- Review a Go handler for error mapping problems
- Add a sqlc query and a transactional service method
- Write table-driven tests for a validation function
- Set up integration tests against Postgres with testcontainers
- Check a Go service for context and goroutine misuse
Go backend FAQ
What does Go backend need to be useful?
It is written for Go backend code and assumes a project that may use sqlc, pgx and PostgreSQL. It tells the agent to follow the repository's own conventions first and use these defaults only where the repo is silent.
Does Go backend run any scripts or change files on its own?
No scripts are included. It gives guidance for the agent to apply while writing or reviewing code, and it lists commands like go test -race and go generate for the agent to run.
When does the skill trigger?
It is meant for tasks involving writing or reviewing Go backend code, as stated in its description.
How do I install Go backend in Claude Code?
Copy the skill folder from GitHub to ~/.claude/skills/go-backend to use it in all your projects, or to .claude/skills/go-backend in one project. Or install the forgeline plugin, which includes it: /plugin marketplace add Nabwinsaud/forgeline, then /plugin install forgeline@forgeline.
Does Go backend run scripts?
No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.
Which AI agents can use Go backend?
Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.
What are the best alternatives to Go backend?
The closest alternatives to Go backend are Go database, Python backend, Go API design, Go error handling and Go GRPC.
Where this comes from
- Description: from the skill's own SKILL.md.
More from Nabwinsaud/forgeline

Gives agents conventions for designing HTTP/JSON endpoints, errors and pagination
- Open source
- 8 GitHub stars
- Developer tools

Records a human approve, reject or retry decision on a paused Forgeline job
- Open source
- 8 GitHub stars
- Developer tools

Gives a read-only reviewer agent a prioritized procedure for checking factory PRs
- Open source
- 8 GitHub stars
- Developer tools

Guides agents through safe Postgres schema changes, backfills and sqlc regeneration
- Open source
- 8 GitHub stars
- Databases

Turns one sentence into a Forgeline job that runs through to a reviewed PR
- Open source
- 8 GitHub stars
- Developer tools

Checks whether your machine and repo are ready to run the Forgeline factory
- Open source
- 8 GitHub stars
- Developer tools


