add-endpoint
Skill16 starsChanged 7 months agoMITView on GitHub
Use when adding a new API endpoint to app/api/v1/. Covers router creation, registration, and response patterns.
11 other projects use a version of this.
Adopted by
Most recently taken up by
- Juxn89/docs-assistanttheir own version, first seen Nov 16, 2026
- nanotaboada/python-samples-fastapi-restfultheir own version, first seen Nov 1, 2026
- nikzlabs/shipittheir own version, first seen Oct 28, 2026
- KevinArce/create-bun-apitheir own version, first seen Oct 25, 2026
- Ssoulisack/claude-skillstheir own version, first seen Oct 15, 2026
- lepresk/groundworktheir own version, first seen Oct 15, 2026
Other versions11 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 11
- nanotaboada/python-samples-fastapi-restful★ 141same name
- Azure/azure-sdk-tools★ 134same name
- atherio-danp/cde-dotnetcc★ 109same name
- Azure-Samples/art-voice-agent-accelerator★ 74same name
- KevinArce/create-bun-api★ 11same name
- nikzlabs/shipit★ 9same name
- aiqadam/qadam-flow★ 5same name
- jpoindexter/theft-kit★ 1same name
- Juxn89/docs-assistant★ 0same name
- lepresk/groundwork★ 0same name
1 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository7 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- property_app/CLAUDE.mdCLAUDE.md
- property-reportSkill
- property-searchSkill
- add-data-sourceSkill
- add-mcp-toolSkill
- Create-MCP-AppSkill
The file
We split this skill into the rules it gives an agent
2 rules. 0 are common, 0 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 11 edited versions we read keep these.
0
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 55
Prefer returning property_core models directly (Pydantic → JSON automatic)
- Very specific: line 56
If you need an envelope, add to app/schemas/new_endpoint.py
“Common” is measured: kept by at least 6 in 10 of the 11 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Add an API Endpoint
API routers are thin HTTP wrappers — all business logic lives in property_core.
Step 1: Create Router File
Create app/api/v1/new_endpoint.py:
from __future__ import annotations
from fastapi import APIRouter, HTTPException, Query
router = APIRouter(prefix="/new", tags=["new"])
@router.get("/action")
async def action_endpoint(
required: str = Query(..., description="Required parameter"),
optional: str | None = Query(None, description="Optional filter"),
limit: int = Query(50, ge=1, le=200, description="Max results"),
):
"""Endpoint description."""
import asyncio
from property_core import SomeService
try:
result = await asyncio.to_thread(
SomeService().method,
param=required,
limit=limit,
)
except ValueError as exc:
raise HTTPException(status_code=422, detail=str(exc))
return result.model_dump(mode="json")Step 2: Register in routes.py
Open app/api/routes.py:
from .v1 import new_endpoint
api_router.include_router(new_endpoint.router)Step 3: Response Model (optional)
- Prefer returning
property_coremodels directly (Pydantic → JSON automatic) - If you need an envelope, add to
app/schemas/new_endpoint.py - Re-export from
app/schemas/__init__.pyif needed
Patterns
| Pattern | Example |
| Sync service call | app/api/v1/ppd.py |
| Async service call | app/api/v1/analysis.py |
| Simple calculator | app/api/v1/stamp_duty.py |
| Configuration check | app/api/v1/epc.py |
Checklist
- Router file created in
app/api/v1/ - Router registered in
app/api/routes.py - No business logic in the router (property_core handles that)
Query()annotations with descriptions on all parameters- Error handling:
ValueError→ 422, upstream failure → 502
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

