python-backend-skill

python-backend-skill is a skill for OpenCode from darellchua2/opencode-config-template. It costs 34 tokens per session (7,697 once invoked), scanned A, original, Apache-2.0.

A guide to structuring Python backend applications built with FastAPI, Django, or Flask, including configuration, dependencies, and testing setup.

In plain words
What is it for?
Use it to start or reorganize a Python API or web backend, configure environment-based settings, add dependency injection, set up project checks, or investigate SQLAlchemy session errors.
Why use it?
It gives a new or disorganized backend a consistent structure and helps keep settings, dependencies, and application startup manageable.

Skill for OpenCode

Written for OpenCode: installed under .opencode/. Also seen: mentions OpenCode.

Good fit Use it to start or reorganize a Python API or web backend, configure environment-based settings, add dependency injection, set up project checks, or investigate SQLAlchemy session errors.

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

Made for: OpenCode.

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-skill

README.md
[![agentmods](https://agentmods.dev/badge/skills/darellchua2/opencode-config-template/python-backend-skill.svg)](https://agentmods.dev/skills/darellchua2/opencode-config-template/python-backend-skill)
Your own site
<a href="https://agentmods.dev/skills/darellchua2/opencode-config-template/python-backend-skill"><img src="https://agentmods.dev/badge/skills/darellchua2/opencode-config-template/python-backend-skill.svg" alt="Measured on agentmods" height="20"></a>
Per session 34 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 7,697 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. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 6 findings, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Privilege Escalation · line 142
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • high Privilege Escalation · line 187
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • medium Rogue Agent · line 464
    Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
    Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
  • medium Data Exfiltration · line 744
    Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
    Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
  • medium Data Exfiltration · line 748
    Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
    Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
  • medium Data Exfiltration · line 752
    Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
    Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
How audits are shown
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.00034 $0.07697
Opus 5 $0.00017 $0.03848
Sonnet 5 $0.00007 $0.01539
Haiku 4.5 $0.00003 $0.00770

Measured 4d ago against content hash 9eb43aa93f77, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

python-backend-skill 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 4d 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.

opencode_app/.opencode/skills/python-backend-skill/SKILL.md · 972 lines

How it starts

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

What I do

I help you scaffold and structure Python backend projects following industry best practices:

  1. Project Scaffolding: Create well-organized project structures for FastAPI, Django, or Flask
  2. Dependency Management: Configure pyproject.toml, requirements files, and virtual environments
  3. Configuration Management: Environment-based config with pydantic-settings
  4. Dependency Injection: Wire up DI containers for testability
  5. Application Factory: Implement the factory pattern for app initialization
  6. Project Standards: Linting, formatting, type checking, and CI configuration
  7. OpenCode LSP Integration: Generate project-level opencode.json enabling pyright LSP for real-time type diagnostics fed to the agent

When to use me

Use this skill when:

  • Starting a new Python backend project
  • Restructuring an existing Python project for better organization
  • Setting up FastAPI, Django, or Flask with production-ready patterns
  • Configuring pyproject.toml and dependency management
  • Implementing environment-based configuration
  • Setting up Python project standards (ruff, mypy, pytest)
  • Migrating between Python frameworks
  • Debugging SQLAlchemy session errors (detached instances, cross-session mutations)
  • Implementing SSE/streaming endpoints with proper backpressure
  • python-pytest-creator-skill: Generate tests for Python projects using these structures
  • python-ruff-linter-skill: Lint and format Python code following these standards
  • nextjs-standard-setup-skill: The Next.js equivalent of this Python scaffolding skill
  • database-migration-skill: Alembic/Django migration workflows for Python backends

Step 1: Choose Your Framework

Framework Best For Async ORM Agnostic Admin UI
FastAPI APIs, microservices, async Native Yes No
Django Full-stack web apps, CMS ASGI support Django ORM Yes
Flask Simple APIs, microservices Via extensions Yes No

Read the full file on GitHub · 972 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. 4d ago First seen · 972 lines · 34 tokens per session scan A 9eb43aa93f77

Subscribe to this mod's changes

python-backend-skill is a skill published in the GitHub repository darellchua2/opencode-config-template (6 stars, last pushed yesterday), licensed Apache-2.0. It adds 34 tokens to every session and 7,697 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-09-03.