backend-service

backend-service is a skill for Claude Code, Codex from tmj-90/gaffer. It costs 67 tokens per session (1,090 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.

Good fit 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.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/tmj-90/gaffer/backend-service
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.

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/github.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/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-service

Your own site · 80×15
<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="Reviewed on agentmods" width="80" 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 1,090 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 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.01090
Opus 5.5 $0.00027 $0.00436
Sonnet 5.5 $0.00013 $0.00218
Haiku 4.5 $0.00007 $0.00109

Measured 2mo ago against content hash a2362d43fdf1, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 2mo 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 · 80 lines

How it starts

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

Add a backend service

A service owns one use-case: it receives validated input, enforces the business rules, defines the transaction boundary, and returns a domain result or a typed error. Transport (HTTP, CLI, queue) and storage details stay at the edges so the logic can be tested directly and reused by every entry point.

Steps

  1. Read the conventions. Call search_lore for the layering (handler → service → repository), error model, transaction handling and dependency-injection style; honour any ADR. Find a sibling service and copy its construction, collaborator injection, return and error types, file location and test layout.
  2. Write the use-case contract. Inputs (already validated types), outputs, each typed failure (NotFound, Conflict, Forbidden, ValidationFailed), and the invariants that must hold afterwards (e.g. "a user has at most one active subscription"). Map each AC to the invariant or behaviour it tests.
  3. Keep it transport-agnostic. No request/response objects, status codes, SQL strings or framework types in the service signature. Take repositories, clients, the clock and ID generators as injected dependencies so tests can control time and IDs.
  4. Own the transaction boundary. One use-case = one unit of work: all writes commit together or not at all. Do not call external services (HTTP, email, payment) inside an open database transaction; record the intent in an outbox row in the same transaction and deliver after commit (the background-jobs and event-driven-messaging skills).
  5. Enforce invariants where concurrency cannot break them. "Check, then insert" in application code races with a second request. Back each uniqueness or count invariant with a database constraint, a conditional update (… WHERE version = ?), or a row lock, and translate the resulting violation into the typed Conflict error. Shared files or in-memory state written by concurrent callers follow the concurrency-and-async skill.
  6. Handle failure explicitly. Return or raise typed errors with context and the original cause; never swallow an exception, return an ambiguous null, or leave a half-applied change (the error-handling skill). Operations callers may retry are idempotent (the idempotency-and-retries skill).
  7. Test the behaviour, one test per AC, exercising that AC's own rule:
    • unit tests with in-memory fakes for branches, typed errors and edge cases, using a fixed clock and deterministic IDs;
    • an integration test against the real database for anything relying on a constraint, transaction or lock (a fake repository cannot prove atomicity);
    • a rollback test: when a later step fails, earlier writes are not persisted;
    • where an invariant can be raced, N concurrent calls keep it (exactly one winner, the losers get Conflict), using the concurrency-and-async skill's step 9 recipe.

Read the full file on GitHub · 80 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. 2mo ago Changed · +35 lines a2362d43fdf1
  2. 3mo 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 (1 stars, last pushed yesterday), licensed Apache-2.0. It adds 67 tokens to every session and 1,090 once invoked, about $0.0003 per session on Opus 5.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.

Related

backend-service compared with skills from other repositories

backend-service next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
backend-servicetmj-90/gafferSkill1yesterdayApache-2.0A67Claude Code, Codex
bulwark-brainstormQBall-Inc/the-bulwarkSkill9yesterdayMITA50Claude Code
plan-creationQBall-Inc/the-bulwarkSkill9yesterdayMITA38Claude Code
anthropic-validatorQBall-Inc/the-bulwarkSkill9yesterdayMITA40Claude Code
code-reviewQBall-Inc/the-bulwarkSkill9yesterdayMITA61Claude Code
create-subagentQBall-Inc/the-bulwarkSkill9yesterdayMITA42Claude Code
mock-detectionQBall-Inc/the-bulwarkSkill9yesterdayMITA13Claude Code