Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/timothywarner/copilot-dev/api-endpoint-generatornpx skills add timothywarner/copilot-dev --skill api-endpoint-generatorgit clone --depth 1 https://github.com/timothywarner/copilot-devWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00092 | $0.02277 |
| Opus 5 | $0.00046 | $0.01138 |
| Sonnet 5 | $0.00018 | $0.00455 |
| Haiku 4.5 | $0.00009 | $0.00228 |
Grade A, and why
api-endpoint-generator scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 268 lines — stays where its author put it; the contents beside it link to each section on GitHub.
API Endpoint Generator Skill
You are an expert API designer. When this skill activates, you generate complete, production-ready REST API endpoints for either TypeScript/Express or Python/FastAPI. Follow every step below exactly.
Step 1: Gather Requirements
Before generating any code, determine:
- Framework: TypeScript + Express, or Python + FastAPI?
- Resource: What entity is being managed? (e.g.,
User,Order,Product) - HTTP method and path:
GET /users/:id,POST /products, etc. - Input shape: What fields does the request body, path params, or query params contain?
- Output shape: What does a success response look like?
- Business rules: Any constraints on the input? (e.g., email must be unique, age >= 18)
If any of these are missing from the user's prompt, ask for them before generating.
Step 2: Apply the Standard Output Structure
Every generated endpoint must include all five layers:
| Layer | Purpose |
|---|---|
| Schema / Validator | Zod (TS) or Pydantic (Python) defines input shape and validates at the boundary |
| Route Handler | The async function that orchestrates validation, logic, and response |
| Typed Request/Response | TypeScript generics or Python type hints — no any, no dict without hints |
| Error Handling | RFC 7807 Problem Details format for all 4xx/5xx responses |
| Unit Test Stub | Vitest (TS) or pytest (Python) — all happy path + key error paths |
Step 3: TypeScript / Express Pattern
Follow this exact template for TypeScript endpoints:
import { Router, Request, Response, NextFunction } from 'express';
import { z } from 'zod';
// --- 1. Input schema (validates and infers the TS type simultaneously) ---
const CreateUserSchema = z.object({
email: z.string().email({ message: 'Must be a valid email address' }),
name: z.string().min(2).max(100),
age: z.number().int().min(0).max(150),
});
// Infer the TypeScript type from the schema — single source of truth
type CreateUserInput = z.infer<typeof CreateUserSchema>;
// --- 2. Response type ---
interface UserResponse {
id: string;
email: string;
name: string;
createdAt: string;
}
// --- 3. Route handler ---
/**
* POST /users
*
* Creates a new user account.
*
* @param req.body - {@link CreateUserInput}
* @returns 201 with the created {@link UserResponse}
* @throws 400 if the request body fails validation
* @throws 409 if the email address is already registered
*/
async function createUser(
req: Request,
res: Response<UserResponse>,
next: NextFunction,
): Promise<void> {
// Validate input — parse() throws ZodError on failure
const parseResult = CreateUserSchema.safeParse(req.body);
if (!parseResult.success) {
// RFC 7807 Problem Details — consistent error envelope
res.status(400).json({
type: 'https://errors.myapp.com/validation-error',
title: 'Validation Error',
status: 400,
detail: 'One or more fields failed validation.',
errors: parseResult.error.flatten().fieldErrors,
} as any);
return;
}
// parseResult.data is now fully typed as CreateUserInput
const input: CreateUserInput = parseResult.data;
try {
// Replace with your actual service/repository call
const user = await userService.create(input);
// Return immutable response — never mutate the entity object directly
res.status(201).json({
id: user.id,
email: user.email,
name: user.name,
createdAt: user.createdAt.toISOString(),
});
} catch (error) {
// Delegate unexpected errors to Express error middleware
next(error);
}
}
// --- 4. Router registration ---
export const userRouter = Router();
userRouter.post('/', createUser);
What ships with it
2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2d ago First seen · 268 lines · 92 tokens per session scan A c3d3f0d47c82
api-endpoint-generator is a skill published in the GitHub repository timothywarner/copilot-dev (46 stars, last pushed 29d ago), licensed MIT. It adds 92 tokens to every session and 2,277 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
improving-frontend-coverage
Runs frontend unit tests with coverage, analyzes coverage reports, and implements meaningful tests to increase coverage by 0.2%. Use when you want to systematically improve frontend test coverage with high-value test cases.
run-helix-tests
Submit and monitor .NET MAUI unit tests on Helix infrastructure. Supports running XAML, Resizetizer, Core, Essentials, and other unit test projects on distributed Helix queues.
prowler-test-api
Testing patterns for Prowler API: JSON:API, Celery tasks, RLS isolation, RBAC. Trigger: When writing tests for api/ (JSON:API requests/assertions, cross-tenant isolation, RBAC, Celery tasks, viewsets/serializers).
qt-qml-test-run
Builds and runs Qt Quick Test (qmltestrunner / CTest) for a QML project, then writes a Markdown report. Use for "run qml tests", "run qmltestrunner".
ordering-and-flakes
Control spec ordering and manage flaky specs — Serial, Ordered containers with BeforeAll/AfterAll/ContinueOnFailure, OncePerOrdered, SpecPriority, plus FlakeAttempts/--flake-attempts, MustPassRepeatedly, --repeat, and --until-it-fails. Use when specs must run in a fixed order, you need once-per-group setup, you're…
golang-testing
Production-ready Golang tests — table-driven tests, testify suites and mocks, parallel tests, fuzzing, fixtures, goroutine leak detection with goleak, snapshot testing, code coverage, integration tests, idiomatic test naming. Use when writing or reviewing Go tests, choosing a testing approach, setting up Go test CI…