Knowledge skill for API contracts and endpoint patterns. Injected into Builder and Validator agents during engage to enforce consistent API design, error handling, and request/response schemas. Not user-invocable.
التثبيت
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
Knowledge skill for API contracts and endpoint patterns. Injected into Builder and Validator agents during engage to enforce consistent API design, error handling, and request/response schemas. Not user-invocable.
user-invocable
false
Knowledge: API Contracts
This knowledge skill provides context about API design patterns and contracts. Injected into Builder (Scotty) and Validator (McCoy) agents during engage.
Endpoint Patterns
Route Structure
// Routes follow RESTful conventionsGET /api/{resource} -- List resources
GET /api/{resource}/:id -- Get single resource
POST /api/{resource} -- Create resource
PUT /api/{resource}/:id -- Updateresource (full replace)
PATCH /api/{resource}/:id -- Updateresource (partial)
DELETE /api/{resource}/:id -- Delete resource
Handler Shape
exportconst handleGetResource = async (req: Request): Promise<Response> => {
// 1. Parse and validate inputconst params = validateParams(req);
// 2. Execute business logicconst result = await service.getResource(params.id);
// 3. Return structured responsereturnResponse.json({ data: result });
};