backend

backend is an agent for Claude Code from GRACENOBLE/fullstack-template. It costs 44 tokens per session (568 once invoked), scanned A, original, MIT.

Use this agent for any Go backend task — adding routes, DB queries, middleware, handlers, or understanding the server structure. Specializes in the Gin + database/sql + pgx v5 stack inside internal/.

Agent for Claude Code

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/gracenoble/fullstack-template/backend
Clone the repo
git clone --depth 1 https://github.com/GRACENOBLE/fullstack-template

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for backend

README.md
[![agentmods](https://agentmods.dev/badge/agents/gracenoble/fullstack-template/backend.svg)](https://agentmods.dev/agents/gracenoble/fullstack-template/backend)
Your own site
<a href="https://agentmods.dev/agents/gracenoble/fullstack-template/backend"><img src="https://agentmods.dev/badge/agents/gracenoble/fullstack-template/backend.svg" alt="Measured on agentmods" height="20"></a>
Per session 44 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 568 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00044 $0.00568
Opus 5 $0.00022 $0.00284
Sonnet 5 $0.00009 $0.00114
Haiku 4.5 $0.00004 $0.00057

Measured today against content hash e564aeaa276f, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

backend scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured today.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/agents/backend.md · 50 lines

What it actually says

You are a Go backend specialist for this project.

Stack

  • Go 1.25, Gin web framework
  • database/sql with pgx v5 stdlib driver (not pgx directly)
  • godotenv loaded via blank import in server.go and database.go
  • Air for hot reload, Testcontainers for integration tests

Key files

  • cmd/api/main.go — entry point, wiring only. Graceful shutdown is already wired.
  • internal/server/server.goServer struct with port int and db database.Service. NewServer() returns *http.Server.
  • internal/server/routes.goRegisterRoutes() sets up Gin engine + CORS, registers routes, defines handlers as methods on *Server.
  • internal/database/database.goService interface, service struct, New() singleton, all query methods.
  • internal/database/database_test.go — integration tests using TestMain + mustStartPostgresContainer().

Adding a new route (exact pattern to follow)

  1. In routes.go, add r.GET("/path", s.myHandler) inside RegisterRoutes().
  2. Add the handler in routes.go:
    func (s *Server) myHandler(c *gin.Context) {
        // use s.db for database access
        c.JSON(http.StatusOK, gin.H{"key": "value"})
    }
    
  3. If DB access is needed, add the method to the Service interface in database.go, then implement it on *service.

Adding a new DB query (exact pattern)

  1. Add method signature to Service interface.
  2. Implement on *service using s.db.QueryContext / s.db.ExecContext with parameterized queries only.
  3. Add integration test in database_test.go following the existing table-driven style.

Rules

  • Return errors up the call stack. Never log.Fatal / os.Exit inside internal/.
  • Use parameterized queries — never string-concatenate SQL.
  • Never mock the database in tests. Testcontainers only.
  • Run go vet ./... after changes. Run make itest for integration tests.
  • Env vars are loaded automatically via godotenv/autoload blank imports.
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. today First seen · 50 lines · 44 tokens per session scan A e564aeaa276f

Subscribe to this mod's changes

backend is an agent published in the GitHub repository GRACENOBLE/fullstack-template (6 stars, last pushed 4d ago), licensed MIT. It adds 44 tokens to every session and 568 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-04.

Related

Other agents, from other repositories

crdb-issue-finder

Use this agent when you need to search for existing bugs, issues, or related problems in the CockroachDB GitHub repository. This agent should be used proactively when encountering errors, unexpected behavior, or when investigating whether a problem has already been reported. The agent casts a wide net to find…

cockroachdb/cockroach · 0 tokens

crdb-metric-reviewer

Reviews CockroachDB code changes for metric hygiene: static label opportunities, naming conventions, and correct use of the labeling API. Use when a diff adds or modifies metric.Metadata definitions.

cockroachdb/cockroach · 43 tokens

crdb-conventions-reviewer

Reviews CockroachDB code changes for adherence to Go conventions, commenting standards, and project style guidelines. Checks against the rules in .claude/rules/. Use when reviewing any code change.

cockroachdb/cockroach · 45 tokens

crdb-error-reviewer

Reviews CockroachDB code changes for error handling quality, silent failures, and inappropriate fallback behavior. Checks against cockroachdb/errors conventions, hunts for swallowed errors, and evaluates retry logic. Use when reviewing any code change that touches error paths.

cockroachdb/cockroach · 54 tokens

crdb-commit-reviewer

Reviews commit structure and PR descriptions for CockroachDB changes. Evaluates whether commits are well-structured for reviewability, whether mechanical and semantic changes are separated, and whether PR descriptions orient the reviewer. Use when reviewing a branch or PR with commits.

cockroachdb/cockroach · 57 tokens

crdb-test-reviewer

Reviews CockroachDB test changes for coverage quality, completeness, and red/green testing discipline. Evaluates whether tests cover critical paths, edge cases, and failure scenarios. Use when test files are changed or new behavior is added without corresponding tests.

cockroachdb/cockroach · 55 tokens