Agent skill
fastapi
FastAPI documentation optimized for AI coding agents
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/fastapi
SKILL.md
Fastapi Skill
Fastapi documentation optimized for ai coding agents, generated from official documentation.
When to Use This Skill
This skill should be triggered when:
- Working with fastapi
- Asking about fastapi features or APIs
- Implementing fastapi solutions
- Debugging fastapi code
- Learning fastapi best practices
Quick Reference
Common Patterns
Pattern 1: This includes, for example:
BackgroundTasks
Pattern 2: For example:
class Cat:
def __init__(self, name: str):
self.name = name
fluffy = Cat(name="Mr Fluffy")
Pattern 3: Info To use forms, first install python-multipart
python-multipart
Pattern 4: Make sure you create a virtual environment, activate it, and then install it, for example:
$ pip install python-multipart
Pattern 5: For example:
app.add_middleware(MiddlewareA)
app.add_middleware(MiddlewareB)
Pattern 6: But if you go to, for example:
http://127.0.0.1:8000/items/?skip=20
Pattern 7: Let's take this application as example:
from fastapi import FastAPI
app = FastAPI()
@app.get("/items/")
async def read_items(q: str | None = None):
results = {"items": [{"item_id": "Foo"}, {"item_id": "Bar"}]}
if q:
results.update({"q": q})
return results
Pattern 8: If you are inside of a normal def path operation function, you can access the UploadFile
def
Example Code Patterns
Example 1 (sql):
from app.routers import items
Example 2 (php):
$ pip install "fastapi[standard]"
---> 100%
Reference Files
This skill includes comprehensive documentation in references/:
- api.md - Api documentation
- tutorial.md - Tutorial documentation
Use view to read specific reference files when detailed information is needed.
Working with This Skill
For Beginners
Start with the getting_started or tutorials reference files for foundational concepts.
For Specific Features
Use the appropriate category reference file (api, guides, etc.) for detailed information.
For Code Examples
The quick reference section above contains common patterns extracted from the official docs.
Resources
references/
Organized documentation extracted from official sources. These files contain:
- Detailed explanations
- Code examples with language annotations
- Links to original documentation
- Table of contents for quick navigation
scripts/
Add helper scripts here for common automation tasks.
assets/
Add templates, boilerplate, or example projects here.
Notes
- This skill was automatically generated from official documentation
- Reference files preserve the structure and examples from source docs
- Code examples include language detection for better syntax highlighting
- Quick reference patterns are extracted from common usage examples in the docs
Updating
To refresh this skill with updated documentation:
- Re-run the scraper with the same configuration
- The skill will be rebuilt with the latest information
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?