Python REST API Builder skill for Claude and Codex
Turns an endpoint list and data model definitions into a runnable Python REST API starter: app file, models, requirements.txt, and config, that starts with…
Install it once and Claude or Codex runs it for you. When your request matches, your AI loads the skill, asks for anything it is missing, and works through the template itself. Prefer to fill it in by hand? See the full prompt template.
Download the skill (.zip) · View SKILL.md
When it is used
Use when an endpoint list and data model lines need turning into the smallest runnable Python API starter that starts with python app.py. Do not use for a full production project layout with OpenAPI and async, or a lone FastAPI endpoint. Related topics: coding, python.
What it will ask you for
- API name (free text, e.g. "MyAPI")
- Framework (choose one: Flask, FastAPI, Django REST)
- Endpoints (one per line as /path METHOD) (longer free text)
- Authentication (choose one: None, JWT, API Key, OAuth2)
- Database (choose one: SQLite, PostgreSQL, MySQL, MongoDB, None)
- Data models (longer free text)
How it works
- Turn each data model line into a class for the chosen framework and database with the field names and types unchanged.
- Map every endpoint to a handler that does the obvious operation for its method with 201, 204, 400, and 404 handled.
- Apply the chosen auth as one decorator or dependency on every endpoint except the credential-issuing one.
- Default the database to a local connection from an environment variable and pin compatible versions in requirements.txt.
- Make app.py start the dev server on port 8000 and output the tree plus every file in fenced blocks headed by path.
What you get
A markdown document with the folder tree and the full content of app.py, the models file, config, and requirements.txt in fenced blocks headed by their paths, runnable with pip install -r requirements.txt and python app.py.
What it watches out for
- Leaving requirements.txt unpinned, so the starter breaks the first time a major version of the framework ships.
- Requiring a running PostgreSQL or Mongo before the app starts, when a local default would let it run immediately.
- Renaming or retyping the model fields to look conventional, which breaks the client code the user already wrote against them.
How to install
Claude.ai and the Claude desktop app
- Download the skill .zip.
- Open Settings, then Capabilities, and find Skills.
- Choose Upload skill and select the .zip.
- Ask Claude for help with the task. It loads the skill when your request matches.
Claude Code
- Download the skill .zip.
- Unzip it into ~/.claude/skills/ (or .claude/skills/ inside a project).
- Start a new session. Claude Code loads the skill when your request matches.
Codex
- Download the skill .zip.
- Unzip it into ~/.agents/skills/ (or .agents/skills/ inside a project).
- Codex picks it up on its own. Type $ and the skill name to use it, or just ask for the task.
Cursor
- Download the Cursor rule (.mdc).
- Save it in .cursor/rules/ inside your project.
- Cursor's agent applies the rule when your request matches its description.
AGENTS.md (Codex, Cursor, and other coding agents)
- Copy the AGENTS.md section.
- Paste it into AGENTS.md at the root of your repository, creating the file if needed.
- Coding agents that read AGENTS.md follow it when your request fits.