Communitygithub.com

sickn33/api-patterns

API設計の原則と意思決定。REST vs GraphQL vs tRPCの選択、レスポンス形式、バージョニング、ページネーション。

api-patterns とは?

このスキルは、API設計における主要な原則と実践的な意思決定フレームワークを提供します。特にREST、GraphQL、tRPCの3つの主要なAPIアーキテクチャを比較し、プロジェクトの要件に最適なものを選択するための基準を提示します。レスポンス形式の標準化、バージョニング戦略、効率的なページネーション実装など、実運用で直面する具体的な設計課題に対応します。Claude CodeやCursorなどのAIエージェントで使用可能で、API設計のベストプラクティスに基づいたアドバイスを提供します。開発者はこのスキルを活用することで、一貫性があり保守性の高いAPI設計を短期間で行えるようになります。

対応~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/sickn33/antigravity-awesome-skills/tree/main/skills/api-patterns

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

api-patterns は何をしますか?

API設計の原則と意思決定。REST vs GraphQL vs tRPCの選択、レスポンス形式、バージョニング、ページネーション。

概要

このスキルは、API設計における重要な判断をサポートします。以下の主要トピックをカバーします:

  • アーキテクチャ選択: REST、GraphQL、tRPCの比較と選択基準
  • レスポンス形式: JSON、XML、その他のフォーマットの標準化
  • バージョニング: URLパス、クエリパラメータ、ヘッダーベースの戦略
  • ページネーション: カーソルベース、オフセットベースの実装パターン

使用方法

任意のAIエージェントでこのスキルを呼び出して、API設計に関する質問や判断を支援してもらいます。

# 例: プロジェクトに最適なAPIアーキテクチャを尋ねる
> ユーザーデータを頻繁に更新するリアルタイムチャットアプリには、REST、GraphQL、tRPCのどれが最適ですか?

主要な考慮事項

REST

  • リソース指向の設計
  • HTTPメソッドとステータスコードの標準化
  • キャッシュの容易さ
  • 学習曲線が低い

GraphQL

  • クライアント主導のデータ取得
  • 単一エンドポイント
  • オーバーフェッチとアンダーフェッチの防止
  • 型システムの利点

tRPC

  • 完全な型安全性
  • バンドルサイズの削減
  • フロントエンドとバックエンドの密結合
  • 主にTypeScriptプロジェクト向け

ページネーションパターン

方式利点欠点
オフセットベースシンプルで理解しやすいデータ変更時に一貫性の問題
カーソルベース安定したページネーション実装が複雑

バージョニング戦略

  1. URLパス: v1/, v2/ の形式
  2. クエリパラメータ: ?version=1 の形式
  3. カスタムヘッダー: Accept-Version: 1 の形式
  4. コンテントネゴシエーション: Accept: application/vnd.example.v1+json

参考リンク

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

sickn33/3d-web-experience

Expert in building 3D experiences for the web - Three.js, React Three Fiber, Spline, WebGL, and interactive 3D scenes. Covers product configurators, 3D portfolios, immersive websites, and bringing depth to web experiences.

sickn33/agent-memory-mcp

A hybrid memory system that provides persistent, searchable knowledge management for AI agents (Architecture, Patterns, Decisions).

sickn33/agent-memory-systems

Memory is the cornerstone of intelligent agents. Without it, every interaction starts from zero. This skill covers the architecture of agent memory: short-term (context window), long-term (vector stores), and the cognitive architectures that organize them.

sickn33/ai-agents-architect

Expert in designing and building autonomous AI agents. Masters tool use, memory systems, planning strategies, and multi-agent orchestration.

sickn33/api-documentation-generator

Generate comprehensive, developer-friendly API documentation from code, including endpoints, parameters, examples, and best practices

sickn33/api-security-best-practices

Implement secure API design patterns including authentication, authorization, input validation, rate limiting, and protection against common API vulnerabilities

sickn33/app-store-optimization

Complete App Store Optimization (ASO) toolkit for researching, optimizing, and tracking mobile app performance on Apple App Store and Google Play Store

sickn33/architecture

Architectural decision-making framework. Requirements analysis, trade-off evaluation, ADR documentation. Use when making architecture decisions or analyzing system design.

sickn33/audio-transcriber

Transform audio recordings into professional Markdown documentation with intelligent summaries using LLM integration

sickn33/aws-serverless

Specialized skill for building production-ready serverless applications on AWS. Covers Lambda functions, API Gateway, DynamoDB, SQS/SNS event-driven patterns, SAM/CDK deployment, and cold start optimization.

sickn33/backend-architect

Expert backend architect specializing in scalable API design, microservices architecture, and distributed systems.

sickn33/backend-dev-guidelines

You are a senior backend engineer operating production-grade services under strict architectural and reliability constraints. Use when routes, controllers, services, repositories, express middleware, or prisma database access.

sickn33/bash-linux

Bash/Linux terminal patterns. Critical commands, piping, error handling, scripting. Use when working on macOS or Linux systems.

sickn33/bash-scripting

Bash scripting workflow for creating production-ready shell scripts with defensive patterns, error handling, and testing.

sickn33/brainstorming

Use before creative or constructive work (features, architecture, behavior). Transforms vague ideas into validated designs through disciplined reasoning and collaboration.

sickn33/browser-automation

Browser automation powers web testing, scraping, and AI agent interactions. The difference between a flaky script and a reliable system comes down to understanding selectors, waiting strategies, and anti-detection patterns.

sickn33/browser-extension-builder

Expert in building browser extensions that solve real problems - Chrome, Firefox, and cross-browser extensions. Covers extension architecture, manifest v3, content scripts, popup UIs, monetization strategies, and Chrome Web Store publishing.

sickn33/bullmq-specialist

BullMQ expert for Redis-backed job queues, background processing, and reliable async execution in Node.js/TypeScript applications.

sickn33/bun-development

Fast, modern JavaScript/TypeScript development with the Bun runtime, inspired by [oven-sh/bun](https://github.com/oven-sh/bun).

sickn33/cc-skill-security-review

This skill ensures all code follows security best practices and identifies potential vulnerabilities. Use when implementing authentication or authorization, handling user input or file uploads, or creating new API endpoints.

関連スキル