api-guide

Implement REST and GraphQL APIs with scope-based routing and admin prefixes.

662|179|Updated Oct 6, 2016
One-click install
npx skills add https://github.com/lablup/backend.ai --skill api-guide
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: api-guide
Source: https://github.com/lablup/backend.ai/tree/main/.claude/skills/api-guide
Command: npx skills add https://github.com/lablup/backend.ai --skill api-guide

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires service-guide, repository-guide.

What problem does it solve?

This Skill provides a structured blueprint for implementing REST and GraphQL APIs with consistent patterns, covering standard operations (create, get, search, update, delete, purge), scope prefix rules, admin prefixes, and client SDK/CLI integration.

Core Features & Use Cases

  • Standard API patterns: Defines six operations (create, get, search, update, delete, purge) plus batch variants for bulk updates, deletes, and purges.
  • Scope and Admin patterns: Supports domain-scoped REST/GraphQL endpoints and admin-only operations with permission checks.
  • Client SDK & CLI integration: Aligns with client SDK generation and CLI commands for seamless end-to-end usage.
  • Guidance for architectures: Includes patterns for REST handler → Processor → Service → Repository, GraphQL resolvers, adapters, and domain scope types.

Quick Start

Implement a minimal domain API following the guide: define REST resources and GraphQL types, apply scope/prefix rules, add admin checks, and wire up SDK/CLI integration.

Frequently Asked Questions about api-guide

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I structure REST and GraphQL APIs with consistent handler patterns?

Structure REST and GraphQL APIs using handler-to-processor-to-service-to-repository patterns. This enforces consistent routing, resolver logic, and adapter integration for domain-specific services across both protocols.

What are the standard operations for building REST and GraphQL APIs?

Standard REST and GraphQL API operations include create, get, search, update, delete, and purge. Batch variants are also supported for bulk updates, deletes, and purges to handle bulk data modifications efficiently.

How do I implement scope prefix rules and admin checks for domain APIs?

Implement scope prefix rules and admin checks by applying domain-scoped REST and GraphQL endpoints with dedicated admin prefixes. Admin-only operations require explicit permission checks to ensure secure access control.

Can I align REST and GraphQL API endpoints with client SDK and CLI integration?

Yes, REST and GraphQL API endpoints align with client SDK generation and CLI commands. This integration ensures seamless end-to-end usage from domain service implementation through to client-side operations.

When do I need to apply domain scope types and pagination conventions?

Apply domain scope types and pagination conventions when implementing REST and GraphQL APIs that require structured data segmentation. These patterns enforce consistent data retrieval boundaries across domain-specific services.

Do I need service and repository guides to build APIs with this pattern?

Yes, service and repository guides are required dependencies. The API implementation enforces repository-guide and service-guide patterns to maintain architectural consistency from handlers down to data access layers.