Claude-Pipeline: Skill for Claude Code

.agents/skills/scaffold-api/SKILL.md

scaffold-api is a skill for Claude Code from TheAstrelo/Claude-Pipeline. It costs 17 tokens per session (551 once invoked), scanned A, original, MIT.

A template for creating an authenticated API endpoint in a Next.js application. Next.js is a framework for building web applications, and an API endpoint is a URL that receives requests and returns data.

In plain words
What is it for?
Use it to add a new GET route under src/pages/api, including authentication, database access, error responses, and API documentation.
Why use it?
It removes repetitive setup when adding an endpoint that checks the user's identity, handles HTTP methods, queries the database, and documents the endpoint for Swagger.

Skill for Claude Code

Written for Claude Code: argument-hint in frontmatter. Also seen: installed under .agents/ (shared by several agents).

This is TheAstrelo/Claude-Pipeline's own configuration. It tells Claude Code how to work on Claude-Pipeline itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything Claude-Pipeline configures →

Reuse

Borrowing it

Nothing to install: this file belongs to TheAstrelo/Claude-Pipeline. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/TheAstrelo/Claude-Pipeline/main/.agents/skills/scaffold-api/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/TheAstrelo/Claude-Pipeline

Made for: Claude Code.

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 scaffold-api

README.md
[![agentmods](https://agentmods.dev/badge/skills/theastrelo/claude-pipeline/scaffold-api/github.svg)](https://agentmods.dev/skills/theastrelo/claude-pipeline/scaffold-api)
Your own site
<a href="https://agentmods.dev/skills/theastrelo/claude-pipeline/scaffold-api"><img src="https://agentmods.dev/badge/skills/theastrelo/claude-pipeline/scaffold-api/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 scaffold-api

Your own site · 80×15
<a href="https://agentmods.dev/skills/theastrelo/claude-pipeline/scaffold-api"><img src="https://agentmods.dev/badge/skills/theastrelo/claude-pipeline/scaffold-api.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 17 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 551 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found 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.00017 $0.00551
Opus 5 $0.00009 $0.00275
Sonnet 5 $0.00003 $0.00110
Haiku 4.5 $0.00002 $0.00055

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

Security

Grade A, and why

scaffold-api 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.

.agents/skills/scaffold-api/SKILL.md · 72 lines

How it starts

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

Create a new Next.js API route at src/pages/api/$ARGUMENTS.ts following these project conventions exactly:

Required Structure

  1. Swagger JSDoc comment block at the top of the file:
/**
 * @swagger
 * /api/$ARGUMENTS:
 *   get:
 *     summary: <describe endpoint>
 *     description: <longer description>
 *     tags: [<Feature Area>]
 *     security:
 *       - BearerAuth: []
 *       - CookieAuth: []
 *     parameters: [...]
 *     responses:
 *       200: { description: Success }
 *       401: { description: Unauthorized }
 *       500: { description: Server error }
 */
  1. Imports — always use these exact patterns:
import type { NextApiResponse } from 'next';
import { requireAuth, AuthenticatedRequest } from '@infrastructure/auth/middleware';
import pool from '@infrastructure/database/connection';
  1. Handler function with method check and userId extraction:
async function handler(req: AuthenticatedRequest, res: NextApiResponse) {
  if (req.method !== 'GET') {
    return res.status(405).json({ error: 'Method not allowed' });
  }

  const userId = req.userId!;

  try {
    // Query logic here using pool.query()
    const { rows } = await pool.query('SELECT ...', [userId]);
    return res.status(200).json(rows);
  } catch (error) {
    console.error('[API_NAME] Error:', error);
    return res.status(500).json({ error: 'Internal server error' });
  }
}
  1. Default export with auth wrapper:
export default requireAuth(handler);

Rules

  • Use requireAdmin instead of requireAuth if the route is admin-only
  • Use AuthenticatedRequest type, never NextApiRequest
  • Access user via req.userId! (non-null assertion)
  • Use pool.query() for database access — no ORM
  • Never use do as a SQL alias (PostgreSQL reserved word) — use d instead
  • Parse numeric scores with parseFloat(String(value)).toFixed(1)
  • Define TypeScript interfaces for response shapes at the top of the file
  • Add proper query parameter validation before database queries

Read the full file on GitHub · 72 lines

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 · 72 lines · 17 tokens per session scan A f5f869e7822f

Subscribe to this mod's changes

scaffold-api is a skill published in the GitHub repository TheAstrelo/Claude-Pipeline (45 stars, last pushed 5d ago), licensed MIT. It adds 17 tokens to every session and 551 once invoked, about $0.0001 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.

Related

Other skills, from other repositories

jentic

Use this skill whenever the user wants to work with a third-party or external API/tool through the Jentic platform — e.g. asks to "find the vessel-tracking API and add it", "get rows from this Google Sheet", connect Slack, import/search/discover an API, integrate or automate a SaaS, pull data from a service, or call…

jentic/jentic-one · 0 tokens

contribute-spec-fix

Fix a broken OpenAPI spec in jentic-public-apis with an OpenAPI Overlay, validate it (spectral lint + idempotency check), and contribute it back via a PR to the community catalog. Falls back to applying the same overlay to the local Jentic registry if the user can't wait for maintainer approval, and closes the loop by…

jentic/jentic-one · 138 tokens

tanstack-start

Build a full-stack TanStack Start app on Cloudflare Workers from scratch — SSR, file-based routing, server functions, D1+Drizzle, better-auth, Tailwind v4+shadcn/ui. Use whenever the user mentions TanStack Start, asks to scaffold a full-stack Cloudflare app with SSR, wants an SSR dashboard, or asks for a React 19 +…

jezweb/claude-skills · 115 tokens

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

event-driven-architecture

Kafka, RabbitMQ, SQS/SNS, event sourcing, CQRS, saga patterns, dead letter queues, and idempotency. Use when designing asynchronous systems, implementing message-driven workflows, or building event streaming pipelines.

travisjneuman/.claude · 50 tokens