
Python backend
Guides an agent through typed, testable Python service code with FastAPI or Django
Python backend is an open-source agent skill for developer tools. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.
- Scripts
- None
- Platforms
- Claude Code, Codex, Cursor
- GitHub stars
- 8
- Last commit
- License
- MIT
- Listing updated
Similar skills
About Python backend
This skill gives the agent a set of conventions for Python backend work that is not tied to one framework. It covers how to lay out a service with thin routes and business logic in service modules, how to type public signatures and validate request and webhook data with pydantic schemas, and how to map domain errors to HTTP responses in one place. It also covers dependency injection so collaborators can be swapped in tests, async correctness such as avoiding blocking I/O inside async handlers and setting timeouts on outbound calls, and SQLAlchemy 2.0 and Alembic habits like avoiding N+1 queries and keeping raw SQL parameterized.
The skill also describes how the agent should test and check code. It suggests pytest fixtures and factories, real Postgres for integration tests with transactional rollback, and faking outbound HTTP. Its tooling section runs ruff, mypy, pytest with coverage and pip-audit, and tells the agent to fix code rather than loosen configuration to get a pass. Logging guidance covers structured output and avoiding sensitive data in logs.
The skill is written as a single SKILL.md with no bundled scripts. It expects a Python codebase and the tools it names, such as FastAPI or Django, pydantic, SQLAlchemy, Alembic, pytest, ruff and mypy. It defers to the repository's own framework and conventions where they differ from its defaults.
When your agent uses it
Framework-agnostic Python service patterns (FastAPI or Django) - strict typing, pydantic validation at the boundary, dependency injection, async correctness, SQLAlchemy and Alembic basics, pytest fixtures and factories, coverage, ruff and mypy. Use when writing or reviewing Python backend code.
From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.
What it can access
From a static check of its 1 file (5 KB) on GitHub on 2 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.
Check another skill before you install it.
Install
This skill ships in the forgeline plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):
/plugin marketplace add Nabwinsaud/forgeline
/plugin install forgeline@forgelineOr copy only this skill to ~/.claude/skills/python-backend:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/Nabwinsaud/forgeline.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/python-backend &&
cp -R "$tmp/skills/python-backend" ~/.claude/skills/python-backend &&
rm -rf "$tmp"For one project only, put the folder in .claude/skills/python-backend inside it instead.
Copy the skill folder to ~/.agents/skills/python-backend to use it in every repository:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/Nabwinsaud/forgeline.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/python-backend &&
cp -R "$tmp/skills/python-backend" ~/.agents/skills/python-backend &&
rm -rf "$tmp"For one repository only, put the folder in .agents/skills/python-backend inside it instead.
Copy the skill folder to ~/.cursor/skills/python-backend to use it in every project:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/Nabwinsaud/forgeline.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/python-backend &&
cp -R "$tmp/skills/python-backend" ~/.cursor/skills/python-backend &&
rm -rf "$tmp"For one project only, put the folder in .cursor/skills/python-backend inside it instead.
Run in a terminal (add --scope workspace to install it for the current workspace only):
gemini skills install https://github.com/Nabwinsaud/forgeline.git --path skills/python-backendOr copy the folder to ~/.gemini/skills/python-backend yourself.
For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/python-backend:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/Nabwinsaud/forgeline.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/python-backend &&
cp -R "$tmp/skills/python-backend" ~/.copilot/skills/python-backend &&
rm -rf "$tmp"For one project only, put the folder in .github/skills/python-backend inside it instead.
Get the folder:
git clone --depth 1 https://github.com/Nabwinsaud/forgeline.gitThen copy forgeline/skills/python-backend into your agent's skills folder as python-backend. Agents that support SKILL.md read one folder per skill.
What it does
- Service layout conventions
- Describes how to split routes, services, models, schemas and repositories so business logic stays out of HTTP handlers.
- Boundary validation
- Shows how to validate request bodies and third-party payloads with strict pydantic schemas and keep identity fields out of input.
- Typing and error mapping
- Covers strict typing expectations and a single exception handler that converts domain errors into HTTP status codes.
- Async and dependency injection
- Explains safe async patterns, timeouts on outbound calls, and injecting collaborators so tests avoid monkeypatching.
- Database and migration habits
- Covers SQLAlchemy 2.0 query style, transaction boundaries, avoiding N+1 queries and reviewing Alembic or Django migrations.
- Pytest testing patterns
- Provides fixture scoping, factories, transactional test isolation and async test guidance for pytest.
Good for
- Scaffold a new FastAPI service with typed settings and a services layer
- Review a Python backend pull request for async mistakes and unsafe SQL
- Add an Alembic migration and verify upgrade and downgrade locally
- Write pytest tests with fixtures and factories for an order endpoint
- Tighten pydantic validation on an existing request body
Python backend FAQ
Does Python backend work with both FastAPI and Django?
Yes. The skill is framework-agnostic and describes patterns for FastAPI (using Depends) and Django (passing collaborators into service functions), and tells the agent to follow the repository's own framework where it differs.
Does Python backend run any scripts?
No scripts are bundled. It lists commands for ruff, mypy, pytest with coverage and pip-audit that the agent is expected to run in the project.
When does the skill trigger?
According to its description, it is meant for writing or reviewing Python backend code.
What does Python backend need installed?
The content names the tools it expects: ruff, mypy, pytest with pytest-cov, pip-audit, and the framework and libraries the project uses such as SQLAlchemy and Alembic.
How do I install Python backend in Claude Code?
Copy the skill folder from GitHub to ~/.claude/skills/python-backend to use it in all your projects, or to .claude/skills/python-backend in one project. Or install the forgeline plugin, which includes it: /plugin marketplace add Nabwinsaud/forgeline, then /plugin install forgeline@forgeline.
Does Python backend run scripts?
No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.
Which AI agents can use Python backend?
Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.
What are the best alternatives to Python backend?
The closest alternatives to Python backend are Go backend, Django patterns, Pytest skill, API design and Backend engineering edho ferdian.
Where this comes from
- Description: from the skill's own SKILL.md.
More from Nabwinsaud/forgeline

Gives agents conventions for designing HTTP/JSON endpoints, errors and pagination
- Open source
- 8 GitHub stars
- Developer tools

Records a human approve, reject or retry decision on a paused Forgeline job
- Open source
- 8 GitHub stars
- Developer tools

Gives a read-only reviewer agent a prioritized procedure for checking factory PRs
- Open source
- 8 GitHub stars
- Developer tools

Guides agents through safe Postgres schema changes, backfills and sqlc regeneration
- Open source
- 8 GitHub stars
- Databases

Turns one sentence into a Forgeline job that runs through to a reviewed PR
- Open source
- 8 GitHub stars
- Developer tools

Checks whether your machine and repo are ready to run the Forgeline factory
- Open source
- 8 GitHub stars
- Developer tools



