Agent skill

Express API Design

by johnku2011 in johnku2011/boilerplates-with-ai-skills

A skill your agent uses when adding or changing routes, middleware, or error handling in this Express.js API, to keep endpoints consistent, validated, and testable.

MITAuto-check passedBackend & APIs

Install Express API Design

skills CLI
$ npx skills add johnku2011/boilerplates-with-ai-skills --skill express-api-design -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install johnku2011/boilerplates-with-ai-skills express-api-design --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/johnku2011/boilerplates-with-ai-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/boilerplates/express-api/skills/express-api-design .claude/skills/express-api-design && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
express-api-design
GitHub stars
240
Token cost
~575 tokens
SKILL.md length
280 words
Files
1
Skills in repo
18
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses when adding or changing routes, middleware, or error handling in this Express.js API, to keep endpoints consistent, validated, and testable.

  • Works in 5 steps: Add the route to src/app.js on the app… → Validate and parse input explicitly;… → Return JSON for API routes with a clear… → …
  • Changing routes
  • SKILL.md covers Overview, Process, Route Design and Middleware Order, plus 4 more sections
  • Calls npm

What it does

Express API Design is an agent skill from johnku2011/boilerplates-with-ai-skills. Use when adding or changing routes, middleware, or error handling in this Express.js API, to keep endpoints consistent, validated, and testable.

Its SKILL.md is about 580 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts. Compatibility notes: Express ESM API in this boilerplate

It sits in Backend & APIs, covering API design. It works with Express and Vercel. The licence is MIT.

When your agent uses it

  • Changing routes
  • Error handling in this Express.js API
  • Keep endpoints consistent

Example prompts

  • “/express-api-design”

Requirements

  • Compatibility (from SKILL.md): Express ESM API in this boilerplate
  • Pre-approved tools (allowed-tools): Read

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. Add the route to src/app.js on the app returned by createApp().
  2. Validate and parse input explicitly; never trust request bodies or params.
  3. Return JSON for API routes with a clear shape and correct status codes
  4. Centralize error handling with an error-handling middleware; do not leak
  5. Add a test/ case that starts the app on an ephemeral port and asserts the

What it can do on your machine

Read from SKILL.md and the folder at commit 475dc6a. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Read

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • npm

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use npm, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    Express ESM API in this boilerplate

    From compatibility in the SKILL.md frontmatter.

Context cost

Express API Design loads about 575 tokens when it runs. Until then it costs about 41 tokens; SKILL.md has 280 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~41
When it runs · the whole SKILL.md, loaded when a task matches
~575

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from johnku2011/boilerplates-with-ai-skills at commit 475dc6a, republished under its MIT licence (© johnku2011). 280 words, ~575 tokens.

Download SKILL.mdSave it as .claude/skills/express-api-design/SKILL.md (or your agent's skills folder).
name
express-api-design
description
Use when adding or changing routes, middleware, or error handling in this Express.js API, to keep endpoints consistent, validated, and testable.
allowed-tools
Read
compatibility
Express ESM API in this boilerplate
license
MIT
metadata.stack
express

Express API Design

Overview

Keep the Express app small, testable, and consistent. Build routes on the exported createApp() factory so they can be tested without binding a port.

Process

  1. Add the route to src/app.js on the app returned by createApp().
  2. Validate and parse input explicitly; never trust request bodies or params.
  3. Return JSON for API routes with a clear shape and correct status codes (200/201 success, 400 client error, 404 not found, 500 server error).
  4. Centralize error handling with an error-handling middleware; do not leak stack traces in responses.
  5. Add a test/ case that starts the app on an ephemeral port and asserts the response.

Route Design

  • Use nouns for resources (/items, /items/:id), verbs via HTTP methods.
  • Version breaking changes (/v2/...) or document compatibility in README.
  • Document request/response shapes in README or OpenAPI when the surface grows.

Middleware Order

  1. Security headers / CORS (if needed)
  2. Body parsers with size limits
  3. Authentication (if applicable)
  4. Routes
  5. 404 handler
  6. Error handler (last)

Testing

  • Integration tests: spin up createApp() on port 0, use fetch against http://127.0.0.1:<port>/....
  • Unit tests: pure functions extracted from handlers.
  • Run npm test before every commit.

Guidelines

  • Keep handlers thin; move non-trivial logic into small functions you can unit test.
  • Prefer explicit routes over broad catch-alls.
  • Do not read secrets from the request; read configuration from environment variables at startup.
  • Keep responses deterministic and documented in the README.
  • Assume stateless serverless when deployed to Vercel — no in-memory sessions.

Deployment

See the shared deploy-vercel skill when shipping to Vercel.

Anti-patterns

  • Business logic embedded in anonymous middleware chains.
  • Returning raw error.message or stacks to clients.
  • Global mutable state shared across requests in serverless.

© johnku2011, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in boilerplates/express-api/skills/express-api-design of johnku2011/boilerplates-with-ai-skills.

Open the folder on GitHubat commit 475dc6a

Compare with similar skills

Express API Design next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Express API Design compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Express API Design this skilljohnku2011/boilerplates-with-ai-skills240—~575Automated safety check: PassMIT
Express API Designrevfactory/claude-code-harness120—~276Automated safety check: PassNone
API DesignerJeffallan/claude-skills12k2 repos~2kAutomated safety check: PassMIT
Nodejs Backend Patternsever-works/ever-works15818 repos~4kAutomated safety check: PassAGPL-3.0
cmux Backend Rulesmanaflow-ai/cmux28k1 repos~682Automated safety check: PassCustom licence
Pangolin CRUD Endpointsfosrl/pangolin23k—~461Automated safety check: PassCustom licence

Similar skills

  • Express API Design

    revfactory/claude-code-harness

    Express.js REST API design and implementation guide. An agent skill from revfactory/claude-code-harness.

    120 GitHub stars~276 tokensUpdated 7 mo ago
    Backend & APIsAuto-check passed
  • API Designer

    Jeffallan/claude-skills

    Designs REST and GraphQL APIs from resource modeling to an OpenAPI 3.1 contract, with versioning, pagination and RFC 7807 error handling.

    12k GitHub starsUsed in 2 repos~2k tokens
    Backend & APIsAuto-check passed
  • Nodejs Backend Patterns

    ever-works/ever-works

    Build production-ready Node.js backend services with Express/Fastify, implementing middleware patterns, error handling, authentication, database integration, and API design best practices.

    158 GitHub starsUsed in 18 repos~4k tokens
    Backend & APIsAuto-check passed
  • cmux Backend Rules

    manaflow-ai/cmux

    Sets the backend TypeScript and Cloud VM rules for cmux: Effect-based services, thin route handlers, Postgres as source of truth, migrations and provider secrets.

    28k GitHub starsUsed in 1 repo~682 tokens
    Backend & APIsAuto-check passed
  • Use whenever asked to add, create, or scaffold a CRUD endpoint, router, or entity in this repo's server (create/list/get/update/delete handlers, new…

    23k GitHub stars~461 tokensUpdated today
    Backend & APIsAuto-check passed
  • API Design Principles

    jh941213/my-cc-harness

    REST 및 GraphQL API 설계 원칙 가이드. An agent skill from jh941213/my-cc-harness.

    126 GitHub starsUsed in 20 repos~3.4k tokens
    Backend & APIsAuto-check passed

More from johnku2011/boilerplates-with-ai-skills

All 18 skills in this repo
  • Project Security

    johnku2011/boilerplates-with-ai-skills

    A skill your agent uses when reviewing security-sensitive code paths — check auth, secrets, input validation, dependency risk, and data exposure before shipping.

    240 GitHub stars~650 tokensUpdated 1 mo ago
    Auto-check passed
  • Code Review

    johnku2011/boilerplates-with-ai-skills

    A skill your agent uses when reviewing a diff or pull request — check correctness, tests, readability, security, and server/client boundaries before approving.

    240 GitHub stars~708 tokensUpdated 1 mo ago
    Auto-check passed
  • Python API Design

    johnku2011/boilerplates-with-ai-skills

    A skill your agent uses when adding or changing FastAPI routes, dependencies, or tests in this Python service — keep endpoints typed, validated, and covered by pytest.

    240 GitHub stars~449 tokensUpdated 1 mo ago
    Auto-check passed
  • Bwai Advisor

    johnku2011/boilerplates-with-ai-skills

    Use before scaffolding a bwai project — runs the full startup-goal workflow then recommends the right boilerplate and outputs the exact bwai new command to run.

    240 GitHub stars~1.2k tokensUpdated 1 mo ago
    Auto-check passed
  • Deploy Vercel

    johnku2011/boilerplates-with-ai-skills

    A skill your agent uses when deploying or configuring this project on Vercel — env vars, build settings, serverless limits, and production checks for Next.js or Express.

    240 GitHub stars~660 tokensUpdated 1 mo ago
    Auto-check: notes
  • Nextjs App Router

    johnku2011/boilerplates-with-ai-skills

    A skill your agent uses when adding pages, layouts, route handlers, or data fetching in this Next.js App Router project, to follow server-first conventions correctly.

    240 GitHub stars~587 tokensUpdated 1 mo ago
    Auto-check passed

Works with

Categories

Questions about Express API Design

What does Express API Design do?

A skill your agent uses when adding or changing routes, middleware, or error handling in this Express.js API, to keep endpoints consistent, validated, and testable. Express API Design is an agent skill from johnku2011/boilerplates-with-ai-skills.js API, to keep endpoints consistent, validated, and testable.

When should I use Express API Design?

Express API Design fits situations like: changing routes; error handling in this Express.js API; keep endpoints consistent.

How do I install Express API Design in Claude Code?

Run `npx skills add johnku2011/boilerplates-with-ai-skills --skill express-api-design -a claude-code`. Or copy the skill folder (boilerplates/express-api/skills/express-api-design in johnku2011/boilerplates-with-ai-skills) into .claude/skills/express-api-design in your project. Claude Code loads it when a task matches its description.

How do I install Express API Design in Codex?

Run `npx skills add johnku2011/boilerplates-with-ai-skills --skill express-api-design -a codex`. Or copy the skill folder (boilerplates/express-api/skills/express-api-design in johnku2011/boilerplates-with-ai-skills) into .agents/skills/express-api-design in your project. Codex loads it when a task matches its description.

Can I use Express API Design in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add johnku2011/boilerplates-with-ai-skills --skill express-api-design -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/express-api-design, .gemini/skills/express-api-design, .github/skills/express-api-design and .opencode/skills/express-api-design in your project.

What does Express API Design need to run?

Going by SKILL.md and its folder, Express API Design needs the command-line tools its instructions call (npm). Its frontmatter pre-approves these tools: Read. Compatibility (from SKILL.md): Express ESM API in this boilerplate.

Does Express API Design access the network?

SKILL.md contains no URLs. Its commands use npm, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Express API Design safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Express API Design use?

Express API Design is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Express API Design use?

About 575 tokens (SKILL.md is roughly 2.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Express API Design?

Skills that share tags, products or a category with Express API Design: Express API Design (revfactory/claude-code-harness, 120 stars), API Designer (Jeffallan/claude-skills, 12k stars), Nodejs Backend Patterns (ever-works/ever-works, 158 stars) and cmux Backend Rules (manaflow-ai/cmux, 28k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Express API Design?

johnku2011 (a GitHub user) maintains it in johnku2011/boilerplates-with-ai-skills, which has 240 GitHub stars. The repository holds 18 skills in this directory. The repository was last updated on August 24, 2026.

Source: johnku2011/boilerplates-with-ai-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.