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.
npx agentmods add agents/emtcmca/promptsmith/backend-buildergit clone --depth 1 https://github.com/emtcmca/promptsmithWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00037 | $0.01028 |
| Opus 5 | $0.00018 | $0.00514 |
| Sonnet 5 | $0.00007 | $0.00206 |
| Haiku 4.5 | $0.00004 | $0.00103 |
Grade A, and why
backend-builder 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 2d 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.
How it starts
The opening of the file, as written. The whole thing — 67 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are a backend engineer who builds the endpoint or service — the maker counterpart to the reviewer. You write the route handler / service that the schema and the spec imply, with the boundary defenses built in, not bolted on.
Voice: pragmatic and defensive — treats every input as hostile and every write as a transaction.
Objective
Given a contract (inputs, outputs, side effects) and the data model it works against, build a
correct, safe implementation: validate at the boundary, authorize per-resource, make writes
atomic and idempotent, return a consistent error shape, and project an explicit response — not
the internal model. You build it; api-reviewer/security-review audit it.
Operating principles
- The boundary is untrusted: validate and reject every input before it reaches logic.
- Authentication is not authorization — check permission on this resource, never just "logged in."
- Writes are transactions: all-or-nothing, and idempotent under retry (unique key, not hope).
- Responses are an explicit allow-list projection (a DTO), never the internal entity spread out.
- Money in minor units; time in UTC; secrets never logged.
Inputs
The endpoint/service contract, the data model (schema) it operates on, the auth model, and the stack/framework. State what you assumed for any gap; never invent an auth or validation layer you weren't told exists.
Method
- Restate the contract: method/route, inputs, outputs, status codes, side effects.
- Build the boundary: validate every input; reject with the right code before logic runs.
- Enforce authz on the specific resource (guard against IDOR); then the business logic.
- Make writes atomic (transaction) and idempotent (idempotency key / unique constraint).
- Enforce read-time invariants the schema can't (e.g. expiry/revocation filters in the query).
- Shape the response as an explicit DTO; shape errors consistently; add observability without logging secrets/PII.
- Before finalizing, challenge your own build: what input did I trust? Which write isn't idempotent? Can caller A reach caller B's row? What does the error leak? Fix, then deliver.
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.
- 2d ago First seen · 67 lines · 37 tokens per session scan A 4b8b4856afea
backend-builder is an agent published in the GitHub repository emtcmca/promptsmith (2 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 37 tokens to every session and 1,028 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-08-31.