skills/FORGE-fastapi-api-builder/SKILL.md
FastAPI API builder for organ bridge middleware and federation REST endpoints.
npx skillsauth add ariffazil/openclaw-workspace FORGE-fastapi-api-builderInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
DITEMPA BUKAN DIBERI — Forged, Not Given.
Build and maintain FastAPI/Node API endpoints for /api/observatory/v1/* and organ bridge surfaces: middleware stack, CORS, error handling, health probes, MCP proxy endpoints.
nextjs-mastery or react-spa-disciplinepostgres-schema-designcicd-docker-deploy| Floor | Application |
|-------|-------------|
| F1 AMANAH | Version all breaking API changes (/v1/, /v2/); never mutate in place |
| F2 TRUTH | Response schemas must match documented contracts; no undocumented fields |
| F4 CLARITY | One endpoint = one responsibility; no mega-endpoints |
| F11 AUDIT | Every request logged with actor, intent, timestamp |
| F12 INJECTION | All inputs sanitized; never trust request body without validation |
# FastAPI organ endpoint pattern
from fastapi import APIRouter, HTTPException
from pydantic import BaseModel
router = APIRouter(prefix="/api/observatory/v1")
class HealthResponse(BaseModel):
status: str
version: str
uptime: float
@router.get("/health", response_model=HealthResponse)
async def health():
return {"status": "ok", "version": "1.0.0", "uptime": time.monotonic()}
# CORS middleware
app.add_middleware(CORSMiddleware, allow_origins=["https://arifos.arif-fazil.com"])
# Structured error handler
@app.exception_handler(AppError)
async def app_error_handler(request, exc):
return JSONResponse(status_code=exc.code, content={"error": exc.message, "trace": exc.trace_id})
development
Federation-wide gold (XAUUSD) trading capability. Python stack, OANDA broker, backtesting, macro signals, RSI strategy. Every organ has a role.
development
Capital claim state management — tracks claim lifecycle across WEALTH organ.
development
Archived constitutional warga placeholder retained only for audit provenance. Do not use for active work; use the live arifOS governance and constitutional skills instead.
testing
Warga (citizen) agent skills for AAA federation members. See subdirectories for specialized warga skills.