backend-service

backend-service is a skill for Claude Code, Codex from tmj-90/gaffer. It costs 67 tokens per session (572 once invoked), scanned A, original, Apache-2.0.

A focused piece of backend code for business rules, use cases, background jobs, or coordination between data stores and other services. It keeps those rules separate from HTTP handling and database details.

In plain words
What is it for?
Use it to add a service, implement a use case, run a domain operation, create a background job, or move logic out of an HTTP handler.
Why use it?
It makes business logic easier to test, reuse, and change without tying it to a web request or a specific database.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

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 skills/tmj-90/gaffer/backend-service
Any agent
npx skills add tmj-90/gaffer --skill backend-service
Clone the repo
git clone --depth 1 https://github.com/tmj-90/gaffer

Made for: Claude Code, Codex.

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-service

README.md
[![agentmods](https://agentmods.dev/badge/skills/tmj-90/gaffer/backend-service.svg)](https://agentmods.dev/skills/tmj-90/gaffer/backend-service)
Your own site
<a href="https://agentmods.dev/skills/tmj-90/gaffer/backend-service"><img src="https://agentmods.dev/badge/skills/tmj-90/gaffer/backend-service.svg" alt="Measured on agentmods" height="20"></a>
Per session 67 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 572 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.1 $0.00067 $0.00572
Opus 5 $0.00034 $0.00286
Sonnet 5 $0.00013 $0.00114
Haiku 4.5 $0.00007 $0.00057

Measured 5d ago against content hash 61e7d7f6009c, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

backend-service 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 5d 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.

runner/skills/backend-service/SKILL.md · 45 lines

How it starts

The opening of the file, as written. The whole thing — 45 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Add a backend service

Implement domain logic as a focused, testable service that keeps transport (HTTP) and persistence (DB) concerns at the edges, following the repo's layering.

Steps

  1. Read the lore first. Call search_lore (Memory MCP) for the repo's layering (controller → service → repository), error model, transaction handling, and dependency-injection conventions. Honour any ADRs.
  2. Find a sibling service and copy its shape — constructor/factory, injected collaborators, return/error types, and where it lives.
  3. Keep the service transport-agnostic. It receives validated inputs and returns domain results or typed errors — no HTTP request/response objects, no SQL strings.
  4. Depend on abstractions. Take repositories/clients via interfaces so the logic is unit-testable with fakes; favour immutable inputs and outputs.
  5. Handle failure explicitly. Map domain failures to typed errors/results; never swallow exceptions or return ambiguous nulls.
  6. Test the logic in isolation. Unit-test happy path, branches, and error cases with collaborators faked; add an integration test if it crosses real boundaries.
  7. Verify + evidence. Run tests and lint, then record test_output via the record-evidence skill and submit for review.

Rules

  • One responsibility per service; keep methods small and the file cohesive.
  • No transport or storage details leaking into the service layer.
  • Immutable inputs/outputs; explicit error handling, no silent failures.
  • Pair with add-api-endpoint for the HTTP edge and add-db-migration for schema.

Capture lore

This skill is one of the places durable, reusable knowledge naturally surfaces: A service-layer convention or stack rule this repo follows — error-handling shape, transaction boundary, dependency-injection pattern, or a framework gotcha. That kind of fact is lore. Capture it via the lore-capture protocol in your brief (CLAUDE.factory.md, step 11 "Memory contribution"): call the Memory MCP suggest_lore once at the close of your work — reusable conventions, gotchas, decisions, and boundaries only, never per-ticket trivia.

Read the full file on GitHub · 45 lines

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. 5d ago First seen · 45 lines · 67 tokens per session scan A 61e7d7f6009c

Subscribe to this mod's changes

backend-service is a skill published in the GitHub repository tmj-90/gaffer (2 stars, last pushed 5d ago), licensed Apache-2.0. It adds 67 tokens to every session and 572 once invoked, about $0.0003 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-08-31.