Discover API
rand/cc-polymath
Automatically discover API design skills when working with REST APIs, GraphQL schemas, API authentication, OAuth, JWT, rate limiting, API versioning, error handling, or endpoint design.
“API route implementation patterns with RLS, validation, and error handling. Use when creating API routes, implementing CRUD endpoints, adding server-side validation, handling…”
$ npx skills add bybren-llc/safe-agentic-workflow --skill api-patterns -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install bybren-llc/safe-agentic-workflow api-patterns --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/bybren-llc/safe-agentic-workflow.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/api-patterns .claude/skills/api-patterns && rm -rf skills-srcUse ~/.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/
Install the "api-patterns" agent skill from https://github.com/bybren-llc/safe-agentic-workflow/tree/main/.agents/skills/api-patterns into .claude/skills/api-patterns/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "api-patterns", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/bybren-llc/safe-agentic-workflow/tree/main/.agents/skills/api-patternsType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add bybren-llc/safe-agentic-workflow --skill api-patterns -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install bybren-llc/safe-agentic-workflow api-patterns --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/bybren-llc/safe-agentic-workflow.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.agents/skills/api-patterns .agents/skills/api-patterns && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "api-patterns" agent skill from https://github.com/bybren-llc/safe-agentic-workflow/tree/main/.agents/skills/api-patterns into .agents/skills/api-patterns/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "api-patterns", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add bybren-llc/safe-agentic-workflow --skill api-patterns -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install bybren-llc/safe-agentic-workflow api-patterns --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/bybren-llc/safe-agentic-workflow.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.agents/skills/api-patterns .cursor/skills/api-patterns && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "api-patterns" agent skill from https://github.com/bybren-llc/safe-agentic-workflow/tree/main/.agents/skills/api-patterns into .cursor/skills/api-patterns/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "api-patterns", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/bybren-llc/safe-agentic-workflow.git --path .agents/skills/api-patterns--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add bybren-llc/safe-agentic-workflow --skill api-patterns -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install bybren-llc/safe-agentic-workflow api-patterns --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/bybren-llc/safe-agentic-workflow.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.agents/skills/api-patterns .gemini/skills/api-patterns && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "api-patterns" agent skill from https://github.com/bybren-llc/safe-agentic-workflow/tree/main/.agents/skills/api-patterns into .gemini/skills/api-patterns/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "api-patterns", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install bybren-llc/safe-agentic-workflow api-patternsInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add bybren-llc/safe-agentic-workflow --skill api-patterns -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/bybren-llc/safe-agentic-workflow.git skills-src && mkdir -p .github/skills && cp -r skills-src/.agents/skills/api-patterns .github/skills/api-patterns && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "api-patterns" agent skill from https://github.com/bybren-llc/safe-agentic-workflow/tree/main/.agents/skills/api-patterns into .github/skills/api-patterns/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "api-patterns", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add bybren-llc/safe-agentic-workflow --skill api-patterns -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install bybren-llc/safe-agentic-workflow api-patterns --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/bybren-llc/safe-agentic-workflow.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.agents/skills/api-patterns .opencode/skills/api-patterns && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "api-patterns" agent skill from https://github.com/bybren-llc/safe-agentic-workflow/tree/main/.agents/skills/api-patterns into .opencode/skills/api-patterns/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "api-patterns", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
api-patterns“API route implementation patterns with RLS, validation, and error handling. Use when creating API routes, implementing CRUD endpoints, adding server-side validation, handling webhooks, or implementing error handling patterns. Do NOT use for frontend-only changes or database migrations without API involvement.”
API Route Patterns is a skill in bybren-llc/safe-agentic-workflow (421 stars). Its SKILL.md is about 1.6k tokens, with 3 other files in the folder (scripts, references, assets). Licence: MIT.
Read from SKILL.md and the folder at commit 26ca58b. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Ships 1 file in scripts/, which the agent can run.
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
API Route Patterns loads about 1.6k tokens when it runs. Until then it costs about 81 tokens; SKILL.md has 207 words of instructions outside code blocks.
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.
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); the scripts in this folder are not scanned.
The full file from bybren-llc/safe-agentic-workflow at commit 26ca58b, republished under its MIT licence (© bybren-llc). 207 words, ~1,565 tokens.
.claude/skills/api-patterns/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.TEMPLATE: This skill uses
{{PLACEHOLDER}}tokens. Replace with your project values before use.
Route to existing API patterns and provide checklists for safe, validated API route implementation. All API routes MUST use RLS context helpers -- see rls-patterns skill.
| Pattern | Location | Purpose |
|---|---|---|
| User Context API | patterns_library/api/user-context-api.md | User-scoped operations |
| Admin Context API | patterns_library/api/admin-context-api.md | Admin-scoped operations |
| Zod Validation | patterns_library/api/zod-validation-api.md | Request/response validation |
| Webhook Handler | patterns_library/api/webhook-handler.md | Webhook processing |
| Bonus Content | patterns_library/api/bonus-content-delivery.md | Protected content delivery |
// FORBIDDEN: Direct ORM/DB calls (bypass RLS)
const users = await db.user.findMany();
// Must use: withUserContext, withAdminContext, or withSystemContext
// FORBIDDEN: Missing authentication check
export async function GET(req: Request) {
return getUserData(); // No auth check!
}
// FORBIDDEN: Unvalidated user input
const { userId } = await req.json();
// Must validate with schema validation (Zod, Pydantic, etc.)
// FORBIDDEN: Generic error responses
return new Response("Error", { status: 500 });
// Must use structured error response// CORRECT: RLS context + auth check
export async function GET(req: Request) {
const { userId } = await auth();
if (!userId) {
return NextResponse.json({ error: "Unauthorized" }, { status: 401 });
}
const data = await withUserContext(db, userId, async (client) => {
return client.user.findUnique({ where: { user_id: userId } });
});
return NextResponse.json(data);
}
// CORRECT: Schema validation
const schema = z.object({
email: z.string().email(),
name: z.string().min(1),
});
const result = schema.safeParse(body);
if (!result.success) {
return NextResponse.json(
{ error: "Validation failed", details: result.error.flatten() },
{ status: 400 },
);
}Before ANY API route:
withUserContext/withAdminContext/withSystemContext){ "data": { ... }, "success": true }{
"error": "Human-readable error message",
"code": "ERROR_CODE",
"details": "optional_details"
}| Code | When to Use |
|---|---|
| 200 | Success |
| 201 | Created (POST) |
| 400 | Bad request / validation error |
| 401 | Not authenticated |
| 403 | Forbidden (authenticated but not authorized) |
| 404 | Resource not found |
| 500 | Server error |
import { auth } from "{{AUTH_IMPORT}}";
import { NextResponse } from "next/server";
import { z } from "zod";
import { withUserContext } from "{{RLS_IMPORT}}";
import { db } from "{{DB_IMPORT}}";
// Request validation schema
const RequestSchema = z.object({
// Define expected fields
});
export async function POST(req: Request) {
try {
// 1. Authenticate
const { userId } = await auth();
if (!userId) {
return NextResponse.json({ error: "Unauthorized" }, { status: 401 });
}
// 2. Parse and validate request
const body = await req.json();
const result = RequestSchema.safeParse(body);
if (!result.success) {
return NextResponse.json(
{ error: "Validation failed", details: result.error.flatten() },
{ status: 400 },
);
}
// 3. Execute with RLS context
const data = await withUserContext(db, userId, async (client) => {
return client.resource.create({ data: result.data });
});
// 4. Return success response
return NextResponse.json({ data, success: true }, { status: 201 });
} catch (error) {
console.error("API error:", error);
return NextResponse.json(
{ error: "Internal server error" },
{ status: 500 },
);
}
}For documenting new endpoints:
## Endpoint: POST /api/resource
### Description
Creates a new resource for the authenticated user.
### Authentication
Required: {{AUTH_PROVIDER}} session
### Request Body
| Field | Type | Required | Description |
| ----- | ------ | -------- | ------------- |
| name | string | Yes | Resource name |
| type | string | No | Resource type |
### Response
**Success (201)**:
{ "data": { "id": 1, "name": "..." }, "success": true }
**Error (400)**:
{ "error": "Validation failed", "details": {...} }
### RLS Context
Uses `withUserContext` - user can only access own resources.© bybren-llc, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 3 other files (scripts, references, assets) in .agents/skills/api-patterns of bybren-llc/safe-agentic-workflow.
Open the folder on GitHubat commit 26ca58b
API Route Patterns 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.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| API Route Patterns this skillbybren-llc/safe-agentic-workflow | 421 | — | ~1.6k | Automated safety check: Pass | MIT | |
| Discover APIrand/cc-polymath | 181 | 1 repos | ~1.5k | Automated safety check: Pass | MIT | |
| Node Backend Development Guidelinesdiet103/claude-code-infrastructure-showcase | 10k | 2 repos | ~2k | Automated safety check: Pass | MIT | |
| API DesignerJeffallan/claude-skills | 12k | 2 repos | ~2k | Automated safety check: Pass | MIT | |
| Pangolin CRUD Endpointsfosrl/pangolin | 23k | — | ~461 | Automated safety check: Pass | Custom licence | |
| Email Best Practicesviclafouch/meme-studio | 110 | 7 repos | ~787 | Automated safety check: Pass | None |
rand/cc-polymath
Automatically discover API design skills when working with REST APIs, GraphQL schemas, API authentication, OAuth, JWT, rate limiting, API versioning, error handling, or endpoint design.
diet103/claude-code-infrastructure-showcase
Sets layered architecture and coding rules for Node.js, Express and TypeScript microservices, covering routes, controllers, services, repositories, Prisma, Sentry and Zod.
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.
fosrl/pangolin
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…
viclafouch/meme-studio
A skill your agent uses when building email features, emails going to spam, high bounce rates, setting up SPF/DKIM/DMARC authentication, implementing email capture, ensuring compliance (CAN-SPAM…
saleor/saleor
Checklist for adding, changing, deprecating or removing Saleor GraphQL fields, mutations, enums and webhook event types so the change passes review first time.
bybren-llc/safe-agentic-workflow
Agent assignment matrix, blocker escalation, and TDM coordination patterns. Use when assigning work to specialist agents, managing blockers across agents…
bybren-llc/safe-agentic-workflow
Documentation templates for ADRs, runbooks, architecture docs, and knowledge transfer documents. Use when creating Architecture Decision Records, writing…
bybren-llc/safe-agentic-workflow
Deployment workflows, pre-deploy validation, smoke testing, and rollback procedures. Use when deploying to staging or production, running smoke tests…
bybren-llc/safe-agentic-workflow
Frontend patterns for modern web frameworks, component libraries, auth flows, and analytics. Use when building UI components, creating pages, implementing…
bybren-llc/safe-agentic-workflow
Advanced git operations including rebase, bisect, cherry-pick, and conflict resolution. Use when rebasing feature branches, debugging with bisect…
bybren-llc/safe-agentic-workflow
Ticket management best practices for Linear or equivalent project tracker. Use when creating issues, updating ticket status, attaching evidence, parsing…
Works with
Categories
Run `npx skills add bybren-llc/safe-agentic-workflow --skill api-patterns -a claude-code`. Or copy the skill folder (.agents/skills/api-patterns in bybren-llc/safe-agentic-workflow) into .claude/skills/api-patterns in your project. Claude Code loads it when a task matches its description.
Run `npx skills add bybren-llc/safe-agentic-workflow --skill api-patterns -a codex`. Or copy the skill folder (.agents/skills/api-patterns in bybren-llc/safe-agentic-workflow) into .agents/skills/api-patterns in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add bybren-llc/safe-agentic-workflow --skill api-patterns -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/api-patterns, .gemini/skills/api-patterns, .github/skills/api-patterns and .opencode/skills/api-patterns in your project.
SKILL.md names no scripts, command-line tools or credentials: API Route Patterns is instructions for the agent only.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
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. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.
API Route Patterns is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.6k tokens (SKILL.md is roughly 6.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with API Route Patterns: Discover API (rand/cc-polymath, 181 stars), Node Backend Development Guidelines (diet103/claude-code-infrastructure-showcase, 10k stars), API Designer (Jeffallan/claude-skills, 12k stars) and Pangolin CRUD Endpoints (fosrl/pangolin, 23k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
bybren-llc (a GitHub organization) maintains it in bybren-llc/safe-agentic-workflow, which has 421 GitHub stars. The repository holds 42 skills in this directory. The repository was last updated on July 20, 2026.
Source: bybren-llc/safe-agentic-workflow on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.