idorgham/gateflow/api-gateway

Claude Code and agent skill by idorgham/gateflow

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Specialized workflows and patterns for api-gateway.

Install

npx vskill@latest install idorgham/gateflow/api-gateway

SKILL.md

The same SKILL.md was published earlier as idorgham/gateflow/api-gateway.

SKILL: API Gateway Pattern & Middleware

Purpose

Enforce a unified security and routing layer for GateFlow v9.0 APIs, handling authentication, rate limiting, and request normalization.

Core Principles

  1. Auth First: No request passes to services without a valid JWT/Session check (except public routes).
  2. Request Decoration: Injects organizationId and userId into context to enforce multi-tenancy.
  3. Rate Limiting: Throttling based on user ID or IP to prevent abuse.

Implementation Rules

  • Middleware: Use Next.js middleware.ts for global checks.
  • Correlation IDs: Assign unique IDs to every request for debugging.
  • Data Protection: Middleware must strip sensitive fields from incoming payloads.

Anti-Patterns

  • Checking auth manually in every API route (use middleware).
  • Exposing internal server errors to the client (use generic 500s).
  • Relying on client-provided IDs for multi-tenancy.

Code Examples

Next.js Middleware Auth Logic
typescript
export async function middleware(req: NextRequest) {
const session = await getSession(req);
if (!session && !PUBLIC_ROUTES.includes(req.nextUrl.pathname)) {
return NextResponse.json({ error: 'Unauthorized' }, { status: 401 });
}
const response = NextResponse.next();
response.headers.set('x-correlation-id', crypto.randomUUID());
return response;
}
Request Context Injection
typescript
const withAuth = (handler) => async (req, ctx) => {
const session = await getSession(req);
const context = { ...ctx, orgId: session.organizationId, userId: session.id };
return handler(req, context);
};

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
5

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Grok Build (Cursor)
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/idorgham/gateflow/api-gateway/badge)](https://verified-skill.com/skills/idorgham/gateflow/api-gateway)

Something wrong with this skill or its page? Tell us.