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})
testing
OpenClaw edge agent bridge — operational triage, doctor, restart, and A2A bridge routing for the federation edge (Telegram surface). USE WHEN: "openclaw unhealthy", "gateway down", "edge bot not responding", "a2a bridge disconnected", "watchdog tripped", "openclaw doctor", "openclaw restart". NOT for token/security audit — use FORGE-telegram-audit.
tools
Generate images, videos, TTS, voice clone, and music via MiniMax MCP server. Use when user asks to "draw", "generate image", "create picture", "make a photo", "text to image", "image generation".
testing
Single load-bearing constitutional-judgment skill. Routes all F1–F13, verdict, hold, seal, scope, authority and floor-check calls through the live arif_judge surface. Replaces 7 overlapping predecessors (arifos-constitutional-judge, arifos-constitutional-judge, arifos-constitutional-judge, arifos-constitutional-judge, arifos-constitutional-judge, arifos-constitutional-judge, arifos-constitutional-judge).
development
MANDATORY LSP grounding gate BEFORE any code mutation on .ts, .py, .js, .tsx, .jsx files. Forces the agent to read real-time compiler diagnostics and structural project context before editing — eliminating blind guesses and anchoring every mutation in F2 (TRUTH). Routes through arifOS kernel (:8088) for centralized gate logic.