Agent skill

Fastapi REST API Design

by open-edge-platform in open-edge-platform/anomalib

Designs and reviews REST APIs for FastAPI services using consistent resource naming, HTTP semantics, validation, security, and error handling patterns.

Apache-2.0Auto-check passedBackend & APIs

Install Fastapi REST API Design

skills CLI
$ npx skills add open-edge-platform/anomalib --skill fastapi-rest-api-design -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install open-edge-platform/anomalib fastapi-rest-api-design --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/open-edge-platform/anomalib.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/fastapi-rest-api-design .claude/skills/fastapi-rest-api-design && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
fastapi-rest-api-design
GitHub stars
6.2k
Token cost
~838 tokens
SKILL.md length
385 words
Files
2
Skills in repo
17
Repo updated
First seen
Licence
Apache-2.0

At a glance

Designs and reviews REST APIs for FastAPI services using consistent resource naming, HTTP semantics, validation, security, and error handling patterns.

  • Works in 7 steps: Classify each endpoint as collection,… → Verify verb-to-action mapping. → Verify status code and error semantics. → …
  • Backend API tasks
  • SKILL.md covers Purpose and scope, Core design rules, Review workflow and Output style, plus 1 more section
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Fastapi REST API Design is an agent skill from open-edge-platform/anomalib. Designs and reviews REST APIs for FastAPI services using consistent resource naming, HTTP semantics, validation, security, and error handling patterns. Use for backend API tasks, endpoint design/refactors, or API review requests in FastAPI/Python projects.

Its SKILL.md is about 840 tokens, which your agent loads only when the skill is triggered. The skill folder holds 1 other file (for example `REST_API_CHECKLIST.md`).

It sits in Backend & APIs, covering Backend development and REST APIs. It works with FastAPI and Python. The repository describes itself as: An anomaly detection library comprising state-of-the-art algorithms and features such as experiment management, hyper-parameter optimization, and edge inference. The licence is Apache-2.0.

When your agent uses it

  • Backend API tasks
  • Endpoint design/refactors
  • API review requests in FastAPI/Python projects

Example prompts

  • “Use the fastapi-rest-api-design skill to design and reviews REST APIs for FastAPI services using consistent resource naming, HTTP semantics…”
  • “/fastapi-rest-api-design”

Requirements

  • Python 3

Workflow steps

7 steps, taken from the first numbered list in SKILL.md.

  1. Classify each endpoint as collection, item, or nested resource.
  2. Verify verb-to-action mapping.
  3. Verify status code and error semantics.
  4. Verify Pydantic schema quality and response model clarity.
  5. Verify DI and layer boundaries.
  6. Verify authn/authz and least-privilege behavior.
  7. Apply checklist and report material issues first.

What it can do on your machine

Read from SKILL.md and the folder at commit 4807ef1. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Fastapi REST API Design loads about 838 tokens when it runs. Until then it costs about 70 tokens; SKILL.md has 385 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~70
When it runs · the whole SKILL.md, loaded when a task matches
~838

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from open-edge-platform/anomalib at commit 4807ef1, republished under its Apache-2.0 licence (© open-edge-platform). 385 words, ~838 tokens.

Download SKILL.mdSave it as .claude/skills/fastapi-rest-api-design/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
fastapi-rest-api-design
description
Designs and reviews REST APIs for FastAPI services using consistent resource naming, HTTP semantics, validation, security, and error handling patterns. Use for backend API tasks, endpoint design/refactors, or API review requests in FastAPI/Python projects.

FastAPI REST API Design

Use this skill when designing, implementing, or reviewing FastAPI REST endpoints.

Purpose and scope

This skill enforces practical REST design and FastAPI implementation quality: resource naming, HTTP semantics, schema quality, dependency boundaries, security checks, and concise review output.

Core design rules

Resource and path conventions
  • Use nouns in paths, not action verbs.
  • Use plural collection names such as /projects, /users.
  • Use stable item identifiers such as /projects/{project_id}.
  • Keep names lowercase and consistent.
  • Keep nesting shallow (typically max 2 levels), for example /projects/{project_id}/models.
  • Do not expose internal storage structure in public routes.
HTTP methods and status semantics
  • Use GET read, POST create, PUT full replace, PATCH partial update, DELETE remove.
  • Return 201 on create, 200 on standard success, and 204 when no response body is needed.
  • Choose precise error codes (400, 401, 403, 404, 409, 422, 500) and avoid vague fallbacks.
  • Keep semantics consistent across related endpoints.
Request/response contracts
  • Use JSON payloads for standard API requests/responses.
  • Use Pydantic models for request and response contracts.
  • Enforce explicit field constraints (enums, lengths, ranges, formats).
  • Prefer explicit response models for stable contracts.
  • Keep error response bodies consistent across endpoints.
FastAPI architecture patterns
  • Organize routes by resource/domain with APIRouter.
  • Inject dependencies with Depends(...); avoid hidden globals.
  • Keep handlers thin and move business logic into services/use-cases.
  • Raise domain exceptions in service layer and map to HTTP errors at API boundary.
  • Add explicit responses={...} metadata when custom errors must appear in OpenAPI docs.
Show full SKILL.md (145 more words)Show less
Security and operability
  • Enforce HTTPS in deployed environments.
  • Enforce authentication and authorization per route/use case.
  • Apply least-privilege checks for each resource operation.
  • Avoid exposing sensitive internals in error details.
  • Add filtering, sorting, and pagination for large collection endpoints.
  • Introduce versioning (for example /v1/...) before shipping breaking API changes.

Review workflow

  1. Classify each endpoint as collection, item, or nested resource.
  2. Verify verb-to-action mapping.
  3. Verify status code and error semantics.
  4. Verify Pydantic schema quality and response model clarity.
  5. Verify DI and layer boundaries.
  6. Verify authn/authz and least-privilege behavior.
  7. Apply checklist and report material issues first.

Output style

When asked to design or review APIs, respond concisely with:

  1. Endpoint proposal (route + method list).
  2. Contract notes (request/response + validation).
  3. Security checks (authn/authz + sensitive data handling).
  4. Checklist verdict (pass/fail highlights).
  5. Top fixes in priority order.

Additional resources

© open-edge-platform, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file in .agents/skills/fastapi-rest-api-design of open-edge-platform/anomalib.

  • SKILL.md
  • REST_API_CHECKLIST.md

Open the folder on GitHubat commit 4807ef1

Compare with similar skills

Fastapi REST API Design next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Fastapi REST API Design compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Fastapi REST API Design this skillopen-edge-platform/anomalib6.2k—~838Automated safety check: PassApache-2.0
Fastcrudbenavlabs/fastcrud1.6k—~5kAutomated safety check: PassMIT
FastAPI Project Templateswshobson/agents40k11 repos~901Automated safety check: PassMIT
Starlettesimonw/research781—~8.6kAutomated safety check: NotesNone
FastAPI ExpertJeffallan/claude-skills12k—~1.8kAutomated safety check: PassMIT
Python API Endpoint Creatorc0x12c/ai-toolkit106—~764Automated safety check: PassNone

Similar skills

  • Fastcrud

    benavlabs/fastcrud

    A skill your agent uses when building or modifying CRUD endpoints with FastCRUD (the fastcrud PyPI package) in a FastAPI project — covers FastCRUD, crudrouter, EndpointCreator, FilterConfig…

    1.6k GitHub stars~5k tokensUpdated 12 days ago
    Backend & APIsAuto-check passed
  • Scaffolds FastAPI projects with a layered app layout, dependency injection through Depends, async handlers and database access, middleware and pytest setup.

    40k GitHub starsUsed in 11 repos~901 tokens
    Backend & APIsAuto-check passed
  • Starlette

    simonw/research

    Build async web applications and APIs with Starlette 1.0, the lightweight ASGI framework for Python.

    781 GitHub stars~8.6k tokensUpdated 2 days ago
    Backend & APIsAuto-check: notes
  • FastAPI Expert

    Jeffallan/claude-skills

    Builds async Python APIs with FastAPI and Pydantic V2, covering endpoints, JWT authentication, async SQLAlchemy, WebSockets and pytest checks against the OpenAPI docs.

    12k GitHub stars~1.8k tokensUpdated 4 days ago
    Backend & APIsAuto-check passed
  • Creates FastAPI endpoints with layered architecture (Router → Service → Repository).

    106 GitHub stars~764 tokensUpdated 3 mo ago
    Backend & APIsAuto-check passed
  • Python Fastapi Patterns

    aiskillstore/marketplace

    FastAPI web framework patterns. An agent skill from aiskillstore/marketplace.

    430 GitHub starsUsed in 1 repo~1.3k tokens
    Backend & APIsAuto-check: notes

More from open-edge-platform/anomalib

All 17 skills in this repo
  • Anomalib Adding A Datamodule

    open-edge-platform/anomalib

    Adds a new dataset/datamodule to anomalib under src/anomalib/data/.

    6.2k GitHub stars~3.7k tokensUpdated today
    Auto-check passed
  • Anomalib Adding A Model

    open-edge-platform/anomalib

    Adds a new anomaly-detection model to anomalib under src/anomalib/models/.

    6.2k GitHub stars~1.9k tokensUpdated today
    Auto-check passed
  • Anomalib Benchmarking

    open-edge-platform/anomalib

    Runs the anomalib benchmarking pipeline to train/evaluate a grid of model + dataset (+ category) combinations and collect metrics into a results CSV.

    6.2k GitHub stars~1k tokensUpdated today
    Auto-check passed
  • Anomalib Tiled Ensemble

    open-edge-platform/anomalib

    Runs and configures the anomalib tiled-ensemble pipeline, which trains/evaluates one model per image tile and merges results (with optional seam smoothing) for high-resolution anomaly detection.

    6.2k GitHub stars~1.4k tokensUpdated today
    Auto-check passed
  • Anomalib Training

    open-edge-platform/anomalib

    Trains an anomalib model on a dataset via the Python API or CLI, including training on a custom folder-structured dataset with the Folder datamodule.

    6.2k GitHub stars~1.4k tokensUpdated today
    Auto-check passed
  • Model Sample Image Export

    open-edge-platform/anomalib

    Export, validate, and publish model sample-result images into docs/source/images and reference them from README/docs pages.

    6.2k GitHub stars~874 tokensUpdated today
    Auto-check passed

Works with

Categories

Questions about Fastapi REST API Design

What does Fastapi REST API Design do?

Designs and reviews REST APIs for FastAPI services using consistent resource naming, HTTP semantics, validation, security, and error handling patterns. Fastapi REST API Design is an agent skill from open-edge-platform/anomalib. Designs and reviews REST APIs for FastAPI services using consistent resource naming, HTTP semantics, validation, security, and error handling patterns.

When should I use Fastapi REST API Design?

Fastapi REST API Design fits situations like: backend API tasks; endpoint design/refactors; API review requests in FastAPI/Python projects.

How do I install Fastapi REST API Design in Claude Code?

Run `npx skills add open-edge-platform/anomalib --skill fastapi-rest-api-design -a claude-code`. Or copy the skill folder (.agents/skills/fastapi-rest-api-design in open-edge-platform/anomalib) into .claude/skills/fastapi-rest-api-design in your project. Claude Code loads it when a task matches its description.

How do I install Fastapi REST API Design in Codex?

Run `npx skills add open-edge-platform/anomalib --skill fastapi-rest-api-design -a codex`. Or copy the skill folder (.agents/skills/fastapi-rest-api-design in open-edge-platform/anomalib) into .agents/skills/fastapi-rest-api-design in your project. Codex loads it when a task matches its description.

Can I use Fastapi REST API Design in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add open-edge-platform/anomalib --skill fastapi-rest-api-design -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/fastapi-rest-api-design, .gemini/skills/fastapi-rest-api-design, .github/skills/fastapi-rest-api-design and .opencode/skills/fastapi-rest-api-design in your project.

What does Fastapi REST API Design need to run?

SKILL.md names no scripts, command-line tools or credentials: Fastapi REST API Design is instructions for the agent only. Our summary lists: Python 3.

Does Fastapi REST API Design access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Fastapi REST API Design safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Fastapi REST API Design use?

Fastapi REST API Design is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Fastapi REST API Design use?

About 838 tokens (SKILL.md is roughly 3.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Fastapi REST API Design?

Skills that share tags, products or a category with Fastapi REST API Design: Fastcrud (benavlabs/fastcrud, 1.6k stars), FastAPI Project Templates (wshobson/agents, 40k stars), Starlette (simonw/research, 781 stars) and FastAPI Expert (Jeffallan/claude-skills, 12k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Fastapi REST API Design?

open-edge-platform (a GitHub organization) maintains it in open-edge-platform/anomalib, which has 6,227 GitHub stars. The repository holds 17 skills in this directory. The repository was last updated on October 7, 2026.

Source: open-edge-platform/anomalib on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.