api-endpoint-builder

api-endpoint-builder is a skill for Claude Code, Codex from pinkpixel-dev/skills-collection-1. It costs 32 tokens per session (1,770 once invoked), scanned A, a copy of api-endpoint-builder, Apache-2.0.

A guide for building REST API endpoints, which are web routes that receive requests and return data. It covers validation, authentication, business logic, error handling, response formats, documentation, and optional tests.

In plain words
What is it for?
Use it to create CRUD routes, add backend features, validate request data, enforce access checks, format responses, and document new endpoints.
Why use it?
It provides a checklist for implementing endpoint behavior consistently and safely instead of handling each route ad hoc.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to create CRUD routes, add backend features, validate request data, enforce access checks, format responses, and document new endpoints.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/pinkpixel-dev/skills-collection-1/api-endpoint-builder
Install

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.

Any agent
npx skills add pinkpixel-dev/skills-collection-1 --skill api-endpoint-builder
Clone the repo
git clone --depth 1 https://github.com/pinkpixel-dev/skills-collection-1

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for api-endpoint-builder

README.md
[![agentmods](https://agentmods.dev/badge/skills/pinkpixel-dev/skills-collection-1/api-endpoint-builder/github.svg)](https://agentmods.dev/skills/pinkpixel-dev/skills-collection-1/api-endpoint-builder)
Your own site
<a href="https://agentmods.dev/skills/pinkpixel-dev/skills-collection-1/api-endpoint-builder"><img src="https://agentmods.dev/badge/skills/pinkpixel-dev/skills-collection-1/api-endpoint-builder/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.

agentmods 80×15 button for api-endpoint-builder

Your own site · 80×15
<a href="https://agentmods.dev/skills/pinkpixel-dev/skills-collection-1/api-endpoint-builder"><img src="https://agentmods.dev/badge/skills/pinkpixel-dev/skills-collection-1/api-endpoint-builder.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 32 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,770 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 92% copy Near-identical to another mod in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00032 $0.01770
Opus 5 $0.00016 $0.00885
Sonnet 5 $0.00006 $0.00354
Haiku 4.5 $0.00003 $0.00177

Measured 9d ago against content hash c2df24ab4ef8, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

api-endpoint-builder 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 9d 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.

Origin

This is a copy

92% identical to api-endpoint-builder — 5 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

SKILLS/api-endpoint-builder/SKILL.md · 325 lines

How it starts

The opening of the file, as written. The whole thing — 325 lines — stays where its author put it; the contents beside it link to each section on GitHub.

API Endpoint Builder

Build complete, production-ready REST API endpoints with proper validation, error handling, authentication, and documentation.

When to Use This Skill

  • User asks to "create an API endpoint" or "build a REST API"
  • Building new backend features
  • Adding endpoints to existing APIs
  • User mentions "API", "endpoint", "route", or "REST"
  • Creating CRUD operations

What You'll Build

For each endpoint, you create:

  • Route handler with proper HTTP method
  • Input validation (request body, params, query)
  • Authentication/authorization checks
  • Business logic
  • Error handling
  • Response formatting
  • API documentation
  • Tests (if requested)

Endpoint Structure

1. Route Definition

// Express example
router.post('/api/users', authenticate, validateUser, createUser);

// Fastify example
fastify.post('/api/users', {
  preHandler: [authenticate],
  schema: userSchema
}, createUser);

2. Input Validation

Always validate before processing:

const validateUser = (req, res, next) => {
  const { email, name, password } = req.body;
  
  if (!email || !email.includes('@')) {
    return res.status(400).json({ error: 'Valid email required' });
  }
  
  if (!name || name.length < 2) {
    return res.status(400).json({ error: 'Name must be at least 2 characters' });
  }
  
  if (!password || password.length < 8) {
    return res.status(400).json({ error: 'Password must be at least 8 characters' });
  }
  
  next();
};

3. Handler Implementation

const createUser = async (req, res) => {
  try {
    const { email, name, password } = req.body;
    
    // Check if user exists
    const existing = await db.users.findOne({ email });
    if (existing) {
      return res.status(409).json({ error: 'User already exists' });
    }
    
    // Hash password
    const hashedPassword = await bcrypt.hash(password, 10);
    
    // Create user
    const user = await db.users.create({
      email,
      name,
      password: hashedPassword,
      createdAt: new Date()
    });
    
    // Don't return password
    const { password: _, ...userWithoutPassword } = user;
    
    res.status(201).json({
      success: true,
      data: userWithoutPassword
    });
    
  } catch (error) {
    console.error('Create user error:', error);
    res.status(500).json({ error: 'Internal server error' });
  }
};

Read the full file on GitHub · 325 lines

Files

What ships with it

1 file 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.

Changes

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.

  1. 9d ago First seen · 325 lines · 32 tokens per session scan A c2df24ab4ef8

Subscribe to this mod's changes

api-endpoint-builder is a skill published in the GitHub repository pinkpixel-dev/skills-collection-1 (7 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 32 tokens to every session and 1,770 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. It is 92% identical to api-endpoint-builder, differing in 5 lines, and is treated as a copy.

Related

Other skills, from other repositories

authentication-patterns

OAuth 2.0, JWT, SSO, MFA, NextAuth/Clerk/Supabase Auth implementation patterns.

travisjneuman/.claude · 28 tokens

email-systems

Transactional email (Resend, SendGrid, SES), templates (React Email, MJML), deliverability (SPF/DKIM/DMARC), and inboxing best practices. Use when building email infrastructure, designing templates, or troubleshooting deliverability.

travisjneuman/.claude · 55 tokens

frontmcp-development

Use when building any FrontMCP server component other than a tool (for tools, use create-tool). Covers @Resource static resources and parameterized URI templates; @Prompt reusable prompts (RAG, multi-turn); @Provider singleton dependency-injection providers (database pools, API clients); @Agent autonomous LLM agents…

agentfront/frontmcp · 196 tokens

devex-sdk-design

Developer experience (DX) engineering, SDK design patterns, API ergonomics, CLI tooling design, documentation-driven development, and developer onboarding. Use when designing SDKs, improving API ergonomics, building developer tools, or creating developer documentation.

travisjneuman/.claude · 52 tokens

devarch-module

DevArchitecture backend pattern: MediatR CQRS handler/command/query, IResult/IDataResult, Autofac AOP chain, FluentValidation, i18n. backend-expert-csk applies it.

byerlikaya/claude-starter-kit · 47 tokens

aiox-architect

Architect (Aria). Use for system architecture (fullstack, backend, frontend, infrastructure), technology stack selection (technical evaluation), API design (REST/GraphQL/tRPC/We...

SynkraAI/aiox-core · 43 tokens