create-handler

create-handler is a skill for Claude Code, Codex, Cursor from girijashankarj/cursor-handbook. It costs 28 tokens per session (1,013 once invoked), scanned A, original, MIT.

A workflow for creating an API handler, the code that receives a web request and returns a response. It gathers the endpoint details, creates the expected folders, and follows the project's handler pattern.

In plain words
What is it for?
Use it to create routes for operations such as creating, reading, updating, listing, or deleting an entity. It can also scaffold the handler's logic and schema directories.
Why use it?
It reduces guesswork when adding an API endpoint by making the required request, response, validation, and file-structure decisions explicit.

Skill for Claude CodeCodexCursor

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.

agentmods
npx agentmods add skills/girijashankarj/cursor-handbook/create-handler
Any agent
npx skills add girijashankarj/cursor-handbook --skill create-handler
Clone the repo
git clone --depth 1 https://github.com/girijashankarj/cursor-handbook

Made for: Claude Code, Codex, Cursor.

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 create-handler

README.md
[![agentmods](https://agentmods.dev/badge/skills/girijashankarj/cursor-handbook/create-handler.svg)](https://agentmods.dev/skills/girijashankarj/cursor-handbook/create-handler)
Your own site
<a href="https://agentmods.dev/skills/girijashankarj/cursor-handbook/create-handler"><img src="https://agentmods.dev/badge/skills/girijashankarj/cursor-handbook/create-handler.svg" alt="Measured on agentmods" height="20"></a>
Per session 28 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,013 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00028 $0.01013
Opus 5 $0.00014 $0.00507
Sonnet 5 $0.00006 $0.00203
Haiku 4.5 $0.00003 $0.00101

Measured yesterday against content hash 02ef6dd4599c, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

create-handler 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 yesterday.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/scaffold-handler-dirs.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

.cursor/skills/backend/create-handler/SKILL.md · 108 lines

How it starts

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

Skill: Create API Handler

Step-by-step workflow for creating a new API handler following the {{CONFIG.patterns.handlerFlowSteps}}-step handler pattern.

Scripts (Cursor skills scripts/ support)

This skill includes a scripts/ folder. The agent can run these scripts as part of the workflow:

  • scripts/scaffold-handler-dirs.sh — Creates the handler directory structure. Usage: ./scripts/scaffold-handler-dirs.sh <entity> <operation> (e.g. order create).

Trigger

When the user asks to create a new API endpoint, handler, or route.

Prerequisites

  • Project configuration loaded ({{CONFIG.paths.handlerBasePath}} exists)
  • Understanding of the entity and operation

Steps

Step 1: Gather Requirements

  • Identify the entity (e.g., Order, Product, User)
  • Identify the operation (e.g., create, read, update, list, delete)
  • Determine HTTP method and URL path
  • Identify request parameters and body schema
  • Identify response format

Step 2: Create Directory Structure

mkdir -p {{CONFIG.paths.handlerBasePath}}/{entity}/{operation}/logic
mkdir -p {{CONFIG.paths.handlerBasePath}}/{entity}/{operation}/schemas

Expected structure:

{{CONFIG.paths.handlerBasePath}}/{entity}/{operation}/
├── {{CONFIG.fileNames.handlerEntry}}
├── logic/
│   ├── validate-request.ts
│   ├── validate-business.ts
│   ├── pre-processing.ts
│   ├── operation.ts
│   ├── post-operation.ts
│   └── response.ts
└── schemas/
    ├── {{CONFIG.fileNames.requestSchema}}
    └── {{CONFIG.fileNames.responseSchema}}

Step 3: Create Request Schema

  • Define JSON Schema in schemas/{{CONFIG.fileNames.requestSchema}}
  • Include all required and optional fields
  • Add type validation and constraints
  • Add description for each field

Step 4: Create Response Schema

  • Define JSON Schema in schemas/{{CONFIG.fileNames.responseSchema}}
  • Follow response envelope pattern: { data, meta }
  • Include all response fields with types

Read the full file on GitHub · 108 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. yesterday First seen · 108 lines · 28 tokens per session scan A 02ef6dd4599c

Subscribe to this mod's changes

create-handler is a skill published in the GitHub repository girijashankarj/cursor-handbook (30 stars, last pushed 5d ago), licensed MIT. It adds 28 tokens to every session and 1,013 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-09-03.

Related

Other skills, from other repositories

firebase-messaging

Use when setting up Firebase Cloud Messaging, managing permissions and tokens, handling background/foreground notification taps, or dispatching messages server-side (HTTP v1).

evanca/flutter-ai-rules · 35 tokens

firebase-cloud-functions

Use when calling callable functions (httpsCallable), passing data to server-side logic, handling function errors/timeouts, configuring regions, or testing with the Emulator Suite.

evanca/flutter-ai-rules · 36 tokens

mobile-rn-screen

Polish an existing React Native screen to feel intentional, native, and human-crafted. Use for "this screen looks off", "feels clunky on iOS", "Android version looks wrong", "jank when scrolling", "button is unreachable", or any RN-specific UX polish pass.

kensaurus/cursor-kenji · 64 tokens

mobile-emulator-test

QA a native Android build end-to-end on the emulator. Use for "test on emulator", "QA Android build", "verify native build", "white screen", "cache rehydration", "Expo dev-client QA", "adb reverse". Pairs Metro/adb walk with Supabase + Sentry MCPs for three-layer CRUD verification.

kensaurus/cursor-kenji · 74 tokens

design-generative-art

Create original algorithmic visuals with p5.js, Canvas, or SVG using seeded randomness and interactive controls. Use when "generative art", "procedural visuals", "flow fields", "particle system", or "art from code". Data charts → data-visualization. UI illustration → design-frontend.

kensaurus/cursor-kenji · 67 tokens

audit-security

Static OWASP review of app code (injection, headers, deps). Use when "review security" or "check vulnerabilities". Session/route×gate/getSession → audit-auth-flows. Plan-only burndown → plan-security-audit. Table RLS → plan-rls-audit. LLM attacks → audit-llm-security.

kensaurus/cursor-kenji · 74 tokens