Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Add new HTTP endpoints to Catalyst-Relay server. Use when creating routes, API endpoints, or HTTP handlers.
.claude/skills/aiskillstore-add-endpoint/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | -4% | 0% |
| case-02 | ✗→✓ | ▲ Improved | -18% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 13% | 0% |
| case-12 | ✗→✓ | ▲ Improved | -34% | 0% |
| case-10 | ✗→✓ | ▲ Improved | -53% | 0% |
Each endpoint gets its own file with colocated schema, types, and handler.
Location: src/server/routes/{category}/{endpoint}.ts
typescript// src/server/routes/auth/login.ts import { z } from 'zod'; import type { Context } from 'hono'; import type { ISessionManager } from '../types'; // 1. Request schema (colocated) export const loginRequestSchema = z.object({ url: z.string().url(), client: z.string().min(1).max(3), auth: authConfigSchema }); // 2. Response type (colocated) export interface LoginResponse { sessionId: string; username: string; expiresAt: number; } // 3. Single handler export (factory pattern) export function loginHandler(sessionManager: ISessionManager) { return async (c: Context) => { const body = await c.req.json(); const validation = loginRequestSchema.safeParse(body); if (!validation.success) { return c.json({ success: false as const, error: 'Invalid request', code: 'VALIDATION_ERROR' }, 400); } // ... implementation ... return c.json({ success: true as const, data: response }); }; }
Register routes in src/server/routes/index.ts:
typescriptimport { loginHandler } from './auth/login'; export function registerRoutes(app: Hono, sessionManager: ISessionManager) { // Auth routes app.post('/login', loginHandler(sessionManager)); // Add your new route here }
All endpoints use a consistent envelope:
typescript// Success return c.json({ success: true as const, data: result }); // Error return c.json({ success: false as const, error: 'Human-readable message', code: 'MACHINE_CODE' }, statusCode);
Use as const for literal types in discriminated unions.
If the endpoint wraps core functionality, add a method to ADTClient:
| HTTP Endpoint | Library Method | |--------------|----------------| | POST /login | client.login() | | GET /packages | client.getPackages() | | POST /objects/read | client.read(objects) |
Create endpoint docs in docs/endpoints/{category}.md.
Required structure:
## Sections TOC with anchor linksSee docs/endpoints/auth.md for a complete example.
- [ ] Create route file in src/server/routes/{category}/
- [ ] Add Zod schema for request validation
- [ ] Add response type interface
- [ ] Export handler function (factory pattern)
- [ ] Wire route in src/server/routes/index.ts
- [ ] Add library method to ADTClient if applicable
- [ ] Document in docs/endpoints/{category}.md
- [ ] Run typecheck: bun run typecheck| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→pass | 25,707 | 21,184 | -18% | 1 | 1 | 0% | 4,330 | 4,175 | -4% | 0 | 0 | — |
case-02 | fail→pass | 22,325 | 18,412 | -18% | 1 | 1 | 0% | 4,507 | 3,680 | -18% | 0 | 0 | — |
case-03 | fail→pass | 15,583 | 18,725 | +20% | 1 | 1 | 0% | 3,315 | 3,736 | +13% | 0 | 0 | — |
case-04 | pass→pass | 22,608 | 11,771 | -48% | 1 | 1 | 0% | 3,640 | 3,110 | -15% | 0 | 0 | — |
case-05 | pass→pass | 9,687 | 9,993 | +3% | 1 | 1 | 0% | 1,779 | 2,028 | +14% | 0 | 0 | — |
case-06 | pass→pass | 9,236 | 10,075 | +9% | 1 | 1 | 0% | 711 | 1,785 | +151% | 0 | 0 | — |
case-07 | fail→fail | 14,366 | 4,725 | -67% | 1 | 1 | 0% | 1,686 | 1,762 | +5% | 0 | 0 | — |
case-12 | fail→pass | 11,925 | 3,707 | -69% | 1 | 1 | 0% | 2,228 | 1,473 | -34% | 0 | 0 | — |
case-08 | pass→pass | 17,782 | 5,505 | -69% | 1 | 1 | 0% | 2,249 | 1,918 | -15% | 0 | 0 | — |
case-09 | pass→pass | 18,478 | 11,618 | -37% | 1 | 1 | 0% | 2,708 | 2,106 | -22% | 0 | 0 | — |
case-10 | fail→pass | 13,696 | 8,688 | -37% | 1 | 1 | 0% | 2,949 | 1,396 | -53% | 0 | 0 | — |
case-11 | fail→pass | 19,374 | 3,995 | -79% | 1 | 1 | 0% | 2,527 | 1,615 | -36% | 0 | 0 | — |
case-13 | fail→pass | 18,132 | 5,767 | -68% | 1 | 1 | 0% | 2,263 | 1,801 | -20% | 0 | 0 | — |
case-14 | fail→pass | 17,475 | 3,115 | -82% | 1 | 1 | 0% | 2,050 | 1,314 | -36% | 0 | 0 | — |
case-15 | fail→fail | 14,796 | 6,499 | -56% | 1 | 1 | 0% | 1,534 | 1,054 | -31% | 0 | 0 | — |
case-16 | pass→pass | 12,820 | 3,236 | -75% | 1 | 1 | 0% | 2,247 | 1,441 | -36% | 0 | 0 | — |
case-17 | fail→pass | 7,465 | 6,552 | -12% | 1 | 1 | 0% | 1,223 | 1,038 | -15% | 0 | 0 | — |
case-18 | fail→pass | 13,738 | 11,932 | -13% | 1 | 1 | 0% | 2,238 | 2,060 | -8% | 0 | 0 | — |
case-19 | fail→pass | 17,262 | 9,283 | -46% | 1 | 1 | 0% | 2,257 | 1,590 | -30% | 0 | 0 | — |
case-20 | fail→pass | 12,943 | 7,463 | -42% | 1 | 1 | 0% | 2,323 | 1,248 | -46% | 0 | 0 | — |
case-21 | pass→fail | 14,984 | 6,990 | -53% | 1 | 1 | 0% | 1,687 | 1,186 | -30% | 0 | 0 | — |
case-22 | fail→pass | 19,428 | 8,724 | -55% | 1 | 1 | 0% | 2,400 | 1,585 | -34% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +55 percentage points is the difference between those two pass rates over the 22 comparable cases. 1 case got worse with the skill loaded, and it is included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.