idorgham/gateflow/backend-services

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 backend-services.

Install

npx vskill@latest install idorgham/gateflow/backend-services

SKILL.md

The same SKILL.md was published earlier as idorgham/gateflow/backend-services.

SKILL: Scalable Next.js Backend Services

Purpose

Define the architecture and implementation standards for server-side logic in GateFlow v9.0, focusing on Server Actions and API Routes.

Core Principles

  1. Stateless Execution: Services should not rely on local server state; use Redis or DB for persistence.
  2. Result Object Pattern: Always return a consistent { data, error, success } object.
  3. Atomic Operations: Use Prisma transactions for multi-step updates to ensure database integrity.

Implementation Rules

  • Validation: Use Zod for every input.
  • Error Handling: Custom AppError class with status codes and logging.
  • Service Layer: Decouple business logic from API/Action entry points (use src/services/).

Anti-Patterns

  • Fetching data directly in Client Components.
  • Large, monolithic API routes (split by sub-resource).
  • Storing secrets or persistent state in global variables.

Code Examples

Zod Validated Server Action
typescript
'use server';
import { z } from 'zod';
const Schema = z.object({
missionId: z.string(),
status: z.enum(['OPEN', 'CLOSED']),
});
export async function updateMissionStatus(rawInput: unknown) {
try {
const input = Schema.parse(rawInput);
const result = await prisma.mission.update({
where: { id: input.missionId },
data: { status: input.status },
});
return { success: true, data: result };
} catch (error) {
return { success: false, error: 'Validation failed' };
}
}
Transactional Service Layer
typescript
export const closeShift = async (shiftId: string) => {
return await prisma.$transaction(async (tx) => {
const shift = await tx.shift.update({
where: { id: shiftId },
data: { endedAt: new Date() },
});
await tx.log.create({ data: { type: 'SHIFT_CLOSED', shiftId } });
return shift;
});
};

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/backend-services/badge)](https://verified-skill.com/skills/idorgham/gateflow/backend-services)

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