Borrowing it
Nothing to install: this file belongs to timothywarner/copilot-dev. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/timothywarner/copilot-dev/main/.github/skills/api-endpoint-generator/SKILL.mdgit clone --depth 1 https://github.com/timothywarner/copilot-devWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/timothywarner/copilot-dev/api-endpoint-generator)<a href="https://agentmods.dev/skills/timothywarner/copilot-dev/api-endpoint-generator"><img src="https://agentmods.dev/badge/skills/timothywarner/copilot-dev/api-endpoint-generator/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/timothywarner/copilot-dev/api-endpoint-generator"><img src="https://agentmods.dev/badge/skills/timothywarner/copilot-dev/api-endpoint-generator.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
What 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.1 | $0.00092 | $0.02277 |
| Opus 5.5 | $0.00037 | $0.00911 |
| Sonnet 5.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 2mo 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.
- 2mo 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 1mo ago), licensed MIT. It adds 92 tokens to every session and 2,277 once invoked, about $0.0004 per session on Opus 5.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
sync-new-data-type
Adds scaffolding for a new Sync data type in Chromium across protocol buffers, DataType definitions, feature flags, controller builders, unit tests, and metrics.
generate-testability-wrappers
DO NOT USE when the target already consumes an injected interface or built-in abstraction such as IFileSystem or TimeProvider, even if the request says "generate a wrapper"; no new wrapper is needed. Use only when C# source calls an ambient/static dependency and no injectable seam exists: first-time TimeProvider…
convex-test
Generate convex-test tests for the app's Convex functions.
testing
Testing and code quality context for Jest, React Testing Library, ESLint, and test patterns. Use when writing tests or fixing linting issues.
platform-apex-test-generate
Use to generate and validate Apex test classes with TestDataFactory patterns, bulk testing (251+ records), mocking, assertions, and disciplined test-fix loops. Use when creating Apex test classes (for triggers, services, controllers, batch jobs, queueables, and callouts), improving coverage, debugging or fixing…
platform-apex-test-run
Apex test execution, coverage analysis, and test-fix loops with 120-point scoring. Use when the user runs Apex tests, checks code coverage, fixes failing tests, or touches Test.cls / Test.cls files. DO NOT TRIGGER when writing Apex production code (use platform-apex-generate), Agentforce agent testing (use…