بنقرة واحدة
add-daemon-endpoint
Add a new daemon REST endpoint with types, handler, web API proxy, and hook.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Add a new daemon REST endpoint with types, handler, web API proxy, and hook.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Run full repo verification (lint, typecheck, test, security, diff review) and fix failures.
Audit documentation freshness — find docs that are stale or missing coverage for recent code changes.
Create a new Next.js API route with proper typing and error handling.
Create a new database service following the FXFlow pattern.
Wire a new WebSocket event end-to-end (daemon → types → hook → component).
Refactor code to meet file-size limits and DRY rules without changing behavior.
| name | add-daemon-endpoint |
| description | Add a new daemon REST endpoint with types, handler, web API proxy, and hook. |
| disable-model-invocation | true |
Wire a new REST endpoint through daemon → web API → hook.
$ARGUMENTS[0] — HTTP method and path (e.g., "POST /actions/my-action")$ARGUMENTS[1] — Description of what it doespackages/types/src/index.ts — Add request/response types:
export interface MyActionRequest { ... }
export interface MyActionResponse { ... }
apps/daemons/src/server.ts — Add route handler:
if (method === "POST" && pathname === "/actions/my-action") {
const body = await parseBody<MyActionRequest>(req)
// ... execute action
return json(result)
}
apps/web/src/app/api/my-action/route.ts — Create Next.js API route that proxies to daemon:
const DAEMON_URL = process.env.NEXT_PUBLIC_DAEMON_REST_URL || "http://localhost:4100"
export async function POST(request: Request) {
const body = await request.json()
const res = await fetch(`${DAEMON_URL}/actions/my-action`, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify(body),
})
const data = await res.json()
return Response.json(data)
}
apps/web/src/hooks/use-*.ts — Add hook method or create new hook:
const myAction = async (params: MyActionRequest) => {
const res = await fetch("/api/my-action", { method: "POST", body: JSON.stringify(params) })
// handle response, toast, etc.
}
Run /verify.