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 skills add WrongStack/WrongStack --skill python-backendgit clone --depth 1 https://github.com/WrongStack/WrongStackWrote 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.
[](https://agentmods.dev/skills/wrongstack/wrongstack/python-backend)<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.
<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>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00093 | $0.02269 |
| Opus 5.5 | $0.00037 | $0.00908 |
| Sonnet 5.5 | $0.00019 | $0.00454 |
| Haiku 4.5 | $0.00009 | $0.00227 |
Grade A, and why
python-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 27d 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.
- Smoke: `uv run uvicorn app.main:app --port 8000`, then `curl -fsS localhost:8000/healthz` and the changed route How it starts
The opening of the file, as written. The whole thing — 117 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Python Backend
Selection card
- Task: Implement or repair Python APIs, workers and typed validation.
- Start: Read pyproject.toml, the lockfile, the ASGI/WSGI entrypoint and the route or task being changed.
- Finish: the real entrypoint starts, the changed path answers correctly, and the checks below pass.
Overview
A Python service fails in production at its boundaries: unvalidated input, blocking calls on the event loop, sessions that outlive their unit of work, and settings nobody checked at startup. Checked 2026-11-02: Python 3.15.2, FastAPI 0.162.0, Django 6.1.2 and uv 0.13.6. Verify framework/native-wheel/Python support before combining them; latest Python can lead package support. Type hints document intent; only Pydantic, serializers and forms enforce it at runtime.
Rules
- Never call blocking I/O inside
async def. Use an async client (httpx.AsyncClient,AsyncSession),asyncio.to_thread, or declare the FastAPI endpoint as plaindefso it runs in the threadpool. - Validate every untrusted payload at the boundary and return explicit response models; never serialize ORM rows or exception text directly.
- One database session per unit of work, opened and closed by a context manager or
yielddependency, with rollback on error. Never share oneAsyncSessionacross concurrent tasks. - Every outbound call has a timeout.
requestshas none by default;httpxdefaults to 5 seconds — set it deliberately either way. - Load settings once at startup through
pydantic-settingsor Django settings, fail fast on missing values, and keep secrets inSecretStror the environment, never in code. - Authorize the object, not just the route: filter queries by owner/tenant at the query boundary.
- Keep the project's package manager, framework and layout. A framework migration is its own task.
- Re-raise
asyncio.CancelledErrorafter cleanup; never swallow it inexcept Exceptionor bareexcept.
First moves by situation
| Situation | First moves |
|---|---|
| New endpoint | Find a sibling route; copy its dependency, schema and error conventions; add request and response models; write the failing test first |
| Endpoint slow or hangs under load | Look for sync clients, time.sleep, sync ORM calls inside async def; count queries per request; check pool size vs worker count |
MissingGreenlet / greenlet_spawn has not been called |
An async session lazy-loaded a relationship or touched an expired attribute; add selectinload/joinedload and expire_on_commit=False |
| 422 or validation surprise | Compare the Pydantic model to the payload; check lax coercion ("1" becomes 1) versus ConfigDict(strict=True) |
| Django N+1 or slow admin | select_related/prefetch_related; prove the count with assertNumQueries |
| Python or framework upgrade | Read release notes and deprecations; run tests with -W error::DeprecationWarning; confirm native wheels exist for the new interpreter |
| Background job duplicated or lost | Check ack mode, broker visibility timeout versus task duration, and idempotency keys (hand off to queues-jobs for semantics) |
| Settings or secret leak | Grep for hard-coded keys, DEBUG=True, wildcard ALLOWED_HOSTS, secrets in logged reprs |
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.
- 27d ago Changed · +48 lines · +51 tokens per session 2cdf872cbbc7
- 1mo ago Changed · +10 lines b74682326dab
- 1mo ago Changed ac48532ed0ac
- 1mo ago First seen · 59 lines · 42 tokens per session scan A bd13c6f167ae
python-backend is a skill published in the GitHub repository WrongStack/WrongStack (444 stars, last pushed today), licensed MIT. It adds 93 tokens to every session and 2,269 once invoked, about $0.0004 per session on Opus 5.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-10-10.
python-backend compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| python-backendWrongStack/WrongStack | Skill | 444 | today | MIT | A | 93 | Claude Code, Codex |
| pydantic-models-pyLiHongwei-cn/lihongwei-cn | Skill | 5 | 1mo ago | MIT | A | 23 | Claude Code, Codex |
| performant-pythonandreibesleaga/GABBE | Skill | 24 | 3d ago | none | A | 55 | Claude Code, Codex |
| fastapi-templatesLiHongwei-cn/lihongwei-cn | Skill | 5 | 1mo ago | MIT | A | 37 | Claude Code, Codex |
| fastapi-templatesmattmre/EVOKORE-MCP-PUBLIC | Skill | 4 | 6mo ago | MIT | A | 37 | Claude Code, Codex |
| fastapi-templateswshobson/agents | Skill | 43k | 6d ago | MIT | A | 37 | Claude Code |
| build-fullstack-backendmindsdb/anton | Skill | 753 | today | MIT | A | 130 | Claude Code, Codex |