fullstack-template: Agent for Claude Code

.claude/agents/backend.md

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

A specialist coding agent for Go backend work. It covers routes, request handlers, database queries, middleware, and the structure of a server using Gin and PostgreSQL access through pgx.

In plain words
What is it for?
Use it to add or understand Go API routes, connect handlers to the database, and work with the project's integration tests.
Why use it?
It gives an agent project-specific conventions, file locations, and implementation patterns instead of requiring it to rediscover them.

Agent for Claude Code

Written for Claude Code: installed under .claude/.

This is Monarc-Engineering/fullstack-template's own configuration. It tells Claude Code how to work on fullstack-template itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything fullstack-template configures →

Reuse

Borrowing it

Nothing to install: this file belongs to Monarc-Engineering/fullstack-template. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/Monarc-Engineering/fullstack-template/main/.claude/agents/backend.md
Clone the repo
git clone --depth 1 https://github.com/Monarc-Engineering/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/monarc-engineering/fullstack-template/backend/github.svg)](https://agentmods.dev/agents/monarc-engineering/fullstack-template/backend)
Your own site
<a href="https://agentmods.dev/agents/monarc-engineering/fullstack-template/backend"><img src="https://agentmods.dev/badge/agents/monarc-engineering/fullstack-template/backend/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for backend

Your own site · 80×15
<a href="https://agentmods.dev/agents/monarc-engineering/fullstack-template/backend"><img src="https://agentmods.dev/badge/agents/monarc-engineering/fullstack-template/backend.svg" alt="Reviewed on agentmods" width="80" 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. A grade says what 26 rules found in the file — not that it is safe.
Origin 100% copy Near-identical to another mod 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.1 $0.00044 $0.00568
Opus 5.5 $0.00018 $0.00227
Sonnet 5.5 $0.00009 $0.00114
Haiku 4.5 $0.00004 $0.00057

Measured 25d ago against content hash e564aeaa276f, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 25d ago.

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.

Origin

This is a copy

100% identical to backend — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.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.go — Server struct with port int and db database.Service. NewServer() returns *http.Server.
  • internal/server/routes.go — RegisterRoutes() sets up Gin engine + CORS, registers routes, defines handlers as methods on *Server.
  • internal/database/database.go — Service 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. 25d ago 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 Monarc-Engineering/fullstack-template (6 stars, last pushed today), licensed MIT. It adds 44 tokens to every session and 568 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 100% identical to backend, differing in 0 lines, and is treated as a copy.