build-fullstack-backend

A set of rules for building backend services, APIs, and full-stack applications with FastAPI, a Python web framework. It defines the required backend file, routes, frontend location, dependencies, and secret handling.

In plain words
What is it for?
Creating API-driven or full-stack apps with a FastAPI backend, static frontend, launch configuration, and environment-based secrets.
Why use it?
It prevents generated applications from violating the expected structure needed to run and deploy them.

Skill for Claude CodeCodex

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/mindsdb/anton/build-fullstack-backend
Any agent
npx skills add mindsdb/anton --skill build-fullstack-backend
Clone the repo
git clone --depth 1 https://github.com/mindsdb/anton

Made for: Claude Code, Codex.

Per session 115 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,836 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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 $0.00115 $0.03836
Opus 5 $0.00057 $0.01918
Sonnet 5 $0.00023 $0.00767
Haiku 4.5 $0.00012 $0.00384

Measured 2d ago against content hash e848d0778fd3, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

build-fullstack-backend scanned grade A with 1 finding 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

// usage: fetch(api('/api/items'))
anton/core/memory/builtin_skills/build-fullstack-backend/SKILL.md · 178 lines

How it starts

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

BACKEND & FULLSTACK APPLICATION GENERATION:

When the user asks to build a backend service, web application with a backend, or API-driven system, follow this workflow. It covers BOTH fullstack artifact types — the steps are identical; only the LOCAL STATE rule (see RULES) differs.

HARD CONTRACT (violating ANY of these breaks launch or deployment — full explanations in the RULES of step 4):

  • The backend file is <artifact_path>/backend.py; the handler attribute and the SECRETS dict keep exactly those names.
  • handler = Mangum(app, lifespan="off").
  • ALL API routes live under /api/* and are registered BEFORE app.mount("/", StaticFiles(...)).
  • The script accepts --port via argparse and binds to it — never hardcode a port.
  • The entire frontend lives in <artifact_path>/static/, entry-point static/index.html.
  • <artifact_path>/requirements.txt exists and lists at least fastapi, mangum, uvicorn.
  • Secrets are read from SECRETS[...] at their point of use inside routes — never copied into module-level variables at import time.
  1. REGISTER THE ARTIFACT: Follow the universal artifact contract from the ARTIFACTS section. For backend apps specifically:
  • type: pick between the two fullstack types:
    • "fullstack-stateless-app" — the DEFAULT. Always start here. The app keeps NO local state between requests (the deployment target is stateless: AWS Lambda with a read-only filesystem, see RULES and DEPLOYMENT NOTES below); all persistence goes through external data sources.
    • "fullstack-stateful-app" — ONLY when the app genuinely requires local on-disk state between requests (e.g. a SQLite DB) AND that state cannot live in an external connected data source. When in doubt, choose stateless.
  • primary: set to "static/index.html" — the frontend ALWAYS lives in a static/ subfolder of the artifact (see steps 4 and 5 below). Use the returned <artifact_path> for ALL subsequent writes — backend.py and requirements.txt go directly in <artifact_path>/; ALL frontend files (HTML, CSS, JS, images, fonts) go into <artifact_path>/static/.
  1. TECHNICAL SPECIFICATION (as a system analyst): Create a brief technical specification for the application. The specification MUST include:
  • Brief description of what the application does (keep it concise)
  • Core features and requirements
  • REST API specification in markdown format with:
    • Endpoints and HTTP methods
    • Request/response schemas (JSON examples)
    • Error handling
  • Framework: ALWAYS use FastAPI. No other framework is supported here — every backend MUST be FastAPI so it can be invoked both locally and as an AWS Lambda function via the canonical template in step 4.
  • Key dependencies and libraries needed (in addition to the mandatory fastapi, mangum, uvicorn — see step 4)
  1. FETCH & VALIDATE SAMPLE DATA: Using the scratchpad tool:
  • Fetch representative sample data from the user's data source (API, database, file)
  • Get enough data to understand: structure, data types, volume, and shape
  • Answer these questions:
    • Is the fetched data sufficient for building the application per the spec?
    • Can this data type be used to implement the API as designed?
    • Do we need different/more data, or should the spec be revised?
  • If the answer to any question is "no" — go back to step 2 and revise the technical specification based on what you learned about the actual data
  1. IMPLEMENT BACKEND: In a scratchpad named exactly the artifact slug (use the slug returned by create_artifact / open_artifact as the scratchpad name), implement the backend code. launch_backend runs the backend in this same scratchpad's venv, so any packages you install or imports you test here will be present at launch.

CANONICAL TEMPLATE (use this skeleton verbatim, add your routes inside the # === API routes === block). It runs unchanged both locally (python backend.py --port=NNN) and on AWS Lambda (handler = backend.handler):

Read the full file on GitHub · 178 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. 2d ago First seen · 178 lines · 115 tokens per session scan A e848d0778fd3

Subscribe to this mod's changes

build-fullstack-backend is a skill published in the GitHub repository mindsdb/anton (749 stars, last pushed 3d ago), licensed MIT. It adds 115 tokens to every session and 3,836 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.