python-backend

python-backend is a skill for Claude Code, Codex from WrongStack/WrongStack. It costs 42 tokens per session (610 once invoked), scanned A, original, MIT.

A guide for building and upgrading Python services, including web APIs and background jobs, with clear environments and resource handling.

In plain words
What is it for?
It is for FastAPI and Django services, Python APIs, validation, async boundaries, database sessions, cleanup, packaging, and job processing.
Why use it?
It helps prevent invalid data, blocking work in asynchronous requests, leaked resources, unclear packaging, and unsafe configuration or authorization.

Skill for Claude CodeCodex

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

Good fit It is for FastAPI and Django services, Python APIs, validation, async boundaries, database sessions, cleanup, packaging, and job processing.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/wrongstack/wrongstack/python-backend
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 WrongStack/WrongStack --skill python-backend
Clone the repo
git clone --depth 1 https://github.com/WrongStack/WrongStack

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 python-backend

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/wrongstack/wrongstack/python-backend"><img src="https://agentmods.dev/badge/skills/wrongstack/wrongstack/python-backend.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 42 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 610 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.00042 $0.00610
Opus 5.5 $0.00017 $0.00244
Sonnet 5.5 $0.00008 $0.00122
Haiku 4.5 $0.00004 $0.00061

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

Security

Grade A, and why

python-backend 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.

packages/core/skills/python-backend/SKILL.md · 59 lines

How it starts

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

Python Backend

Selection card

  • Task: Implement Python APIs and typed validation.
  • Start: Locate the endpoint, schema, authentication boundary and caller.
  • Finish: apply the acceptance checks below; report observed results and unresolved constraints.

Overview

Build and upgrade Python services with explicit environments, validation, async boundaries and resource cleanup.

Checked 2026-10-09: Python 3.15.0, FastAPI 0.143.0, Django 6.1.2 and uv 0.12.24. Verify framework/native-wheel/Python support before combining them; latest Python can lead package support.

Rules

  1. Inspect pyproject/lockfile, interpreter, environment and deployment entrypoint.
  2. Validate incoming data and model output contracts; static annotations do not validate JSON.
  3. Keep blocking I/O and CPU work off async request loops; cancellation must propagate to owned work.
  4. Scope database sessions/clients and transactions to the operation; cleanup must run on failure.
  5. Keep secrets/config and public serialization explicit; object authorization remains at the data operation.
  6. Do not replace the project package manager or migrate frameworks as an incidental feature change.

Workflow

  1. Trace the request/job path and current framework/environment conventions.
  2. Verify latest stable targets and support requirements; read migration notes.
  3. Implement the feature with typed/validated boundaries and explicit resource ownership.
  4. Test input/errors, database rollback, cancellation and application startup.
  5. Run configured formatting/lint/type/tests and the real service entrypoint.

Before returning

Interpreter/environment and compatibility clear; validation/async/resource semantics tested; framework/service checks reported.

Sources

Versioned facts checked 2026-10-09; refresh authoritative sources before new installs/upgrades. Python releases, FastAPI, Django.

Read the full file on GitHub · 59 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 Changed ac48532ed0ac
  2. 6d ago First seen · 59 lines · 42 tokens per session scan A bd13c6f167ae

Subscribe to this mod's changes

python-backend is a skill published in the GitHub repository WrongStack/WrongStack (376 stars, last pushed today), licensed MIT. It adds 42 tokens to every session and 610 once invoked, about $0.0002 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-10-10.