speckit: Agent for Claude Code

.claude/agents/backend-api-engineer.md

backend-api-engineer is an agent for Claude Code from jmanhype/speckit. It costs 28 tokens per session (1,420 once invoked), scanned A, original, MIT.

A backend engineering agent that builds APIs against OpenAPI contracts, which describe an API's endpoints and data formats. It uses TDD, a method where tests are written before the implementation, and contract testing to check that the API matches its specification.

In plain words
What is it for?
Use it to implement backend endpoints, write contract tests, follow a test-first workflow, and add authentication, validation, logging, metrics, and tracing.
Why use it?
It reduces the risk of APIs drifting from their documented contract and encourages validation of behavior, security, and project standards during development.

Agent for Claude Code

Written for Claude Code: installed under .claude/.

This is jmanhype/speckit's own configuration. It tells Claude Code how to work on speckit 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 speckit configures →

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is specmatic test --spec ./specs/<feature>/contracts/openapi.yaml --host localhost --port 8000.

Reuse

Borrowing it

Nothing to install: this file belongs to jmanhype/speckit. 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/jmanhype/speckit/main/.claude/agents/backend-api-engineer.md
Clone the repo
git clone --depth 1 https://github.com/jmanhype/speckit

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-api-engineer

README.md
[![agentmods](https://agentmods.dev/badge/agents/jmanhype/speckit/backend-api-engineer/github.svg)](https://agentmods.dev/agents/jmanhype/speckit/backend-api-engineer)
Your own site
<a href="https://agentmods.dev/agents/jmanhype/speckit/backend-api-engineer"><img src="https://agentmods.dev/badge/agents/jmanhype/speckit/backend-api-engineer/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-api-engineer

Your own site · 80×15
<a href="https://agentmods.dev/agents/jmanhype/speckit/backend-api-engineer"><img src="https://agentmods.dev/badge/agents/jmanhype/speckit/backend-api-engineer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 28 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,420 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.00028 $0.01420
Opus 5.5 $0.00011 $0.00568
Sonnet 5.5 $0.00006 $0.00284
Haiku 4.5 $0.00003 $0.00142

Measured 1mo ago against content hash ed50abf120a1, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

backend-api-engineer 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 1mo 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.

.claude/agents/backend-api-engineer.md · 233 lines

How it starts

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

Backend API Engineer Agent

You are a specialized backend engineer responsible for implementing APIs that conform to OpenAPI contracts, following strict TDD practices and project standards.

Primary Responsibilities

  1. Contract Compliance: Implement APIs that exactly match the OpenAPI specification
  2. TDD: Write tests FIRST, then implement to make them pass
  3. SOLID Architecture: Follow repository pattern, dependency injection, clean separation
  4. Security: Implement authentication, authorization, input validation
  5. Observability: Add logging, metrics, and tracing

Workflow

1. Load Context

Before implementing:

Read: specs/<feature>/contracts/openapi.yaml  # THE contract
Read: specs/<feature>/plan.md                 # Architecture decisions
Read: specs/<feature>/tasks.md                # Your assigned tasks
Read: .specify/memory/constitution.md         # Project standards

2. TDD Cycle (Red → Green → Refactor)

For each endpoint:

Step 1: Write Contract Test (RED)
# tests/contract/test_products_api.py
def test_get_products_returns_valid_response():
    """Contract test: Response must match OpenAPI schema."""
    response = client.get("/api/v1/products")
    assert response.status_code == 200
    # Specmatic validates against OpenAPI schema

Run test - it should FAIL:

pytest tests/contract/test_products_api.py -v
# Expected: FAIL (endpoint not implemented)
Step 2: Write Unit Tests (RED)
# tests/unit/test_product_service.py
def test_product_service_returns_all_products():
    repo = MockProductRepository([Product(...)])
    service = ProductService(repo)
    products = service.get_all()
    assert len(products) == 1
Step 3: Implement (GREEN)
# src/services/product_service.py
class ProductService:
    def __init__(self, repository: ProductRepository):
        self._repo = repository

    def get_all(self) -> list[Product]:
        return self._repo.find_all()

Read the full file on GitHub · 233 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. 1mo ago First seen · 233 lines · 28 tokens per session scan A ed50abf120a1

Subscribe to this mod's changes

backend-api-engineer is an agent published in the GitHub repository jmanhype/speckit (26 stars, last pushed 7mo ago), licensed MIT. It adds 28 tokens to every session and 1,420 once invoked, about $0.0001 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-09-01.