Communitygithub.com

APIバージョニングと後方互換性

APIの移行戦略、非推奨ワークフロー、ヘッダー/URL/コンテントネゴシエーションに基づくバージョン管理を提供します。APIバージョニング、後方互換性、非推奨、破壊的変更、API移行、v1 v2、sunsetヘッダーといったトピックでアクティブになります。

APIバージョニングと後方互換性 とは?

このスキルは、APIのバージョン管理と後方互換性に関する包括的なガイダンスを提供します。URLパスベース(`/v2/`)、ヘッダーベース(`API-Version`)、コンテントネゴシエーション(`Accept: application/vnd.myapi.v2+json`)の3つの主要なバージョン戦略を解説し、各アプローチのトレードオフを明確にします。特にStripeモデルに代表される日付ベースのバージョン管理手法も含まれており、変更履歴を日付で管理する実践的なパターンを提示します。また、RFC 8594に準拠したSunsetヘッダーの実装や、非推奨バージョンからの移行を促すLinkヘッダーの設定方法など、消費者に優しい非推奨ワークフローの実装手順も詳細に説明しています。このスキルは、Express.jsを用いた並列バージョン展開のコード例や、OpenAPI 3.1オーバーレイ、Optic、Bump.shといったツールチェーンとの連携方法も網羅しており、API開発者が日常的に直面するバージョン管理の課題に対する実践的な解決策を提供します。

対応~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/curiositech/windags-skills/tree/HEAD/skills/api-versioning-backward-compatibility

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

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

ドキュメント

APIバージョニングと後方互換性 は何をしますか?

既存の利用者に影響を与えずにAPIを進化させるためのバージョン管理戦略を設計します。

アクティベーショントリガー

対象とするトピック: "APIバージョニング", "後方互換性", "非推奨", "破壊的変更", "API移行", "v1 v2", "sunsetヘッダー", "API進化", "非破壊的変更"

対象外トピック: データスキーマ進化 → schema-evolution-manager | ゲートウェイルーティング → api-gateway-reverse-proxy-expert | GraphQL非推奨 → graphql-server-architect

クイックスタート

  1. 変更を分類する — 追加的(安全)、修正(破壊的の可能性あり)、削除(破壊的)
  2. 戦略を選択する — URLパス(/v2/)、ヘッダー(API-Version)、またはコンテントネゴシエーション
  3. Sunsetヘッダーを実装する — RFC 8594に従い、旧バージョンの終了日を消費者に通知
  4. バージョンを並行運用する — メジャーバージョンでは最低6ヶ月の重複期間を設ける
  5. 採用状況を監視する — バージョンごとのトラフィックを追跡して廃止時期を判断

コア機能

領域技術
URLバージョニング/api/v1/, /api/v2/ パスベースルーティング
ヘッダーバージョニングAPI-Version: 2024-01-15, Accept-Version
コンテントネゴシエーションAccept: application/vnd.myapi.v2+json
非推奨化Sunsetヘッダー (RFC 8594), Deprecationヘッダー
ツーリングOpenAPI 3.1オーバーレイ, Optic, Bump.sh

アーキテクチャパターン

バージョニング戦略の決定木

追加のみか?(新しいフィールド、新しいエンドポイント)
  ├─ YES → バージョン不要(後方互換性あり)
  └─ NO → フィールド名や型の変更か?
       ├─ YES → 新旧両方のフィールドを維持できるか?
       │    ├─ YES → 新しいフィールドを追加し、古いフィールドを非推奨に(マイナーバージョン)
       │    └─ NO → メジャーバージョンアップ(v1 → v2)
       └─ NO → 削除か?
            └─ YES → サンセット期間を設けてメジャーバージョンアップ

並列バージョン展開

// バージョンベースのルーティングを行うExpressルーター
import { Router } from 'express';

const v1Router = Router();
const v2Router = Router();

// v1: { name: string }を返す
v1Router.get('/users/:id', async (req, res) => {
  const user = await getUser(req.params.id);
  res.json({ name: user.fullName }); // レガシー形式
});

// v2: { firstName, lastName, displayName }を返す
v2Router.get('/users/:id', async (req, res) => {
  const user = await getUser(req.params.id);
  res.json({
    firstName: user.firstName,
    lastName: user.lastName,
    displayName: user.fullName,
  });
});

app.use('/api/v1', v1Router);
app.use('/api/v2', v2Router);

// v1用Sunsetヘッダーミドルウェア
v1Router.use((req, res, next) => {
  res.set('Sunset', 'Sat, 01 Nov 2026 00:00:00 GMT');
  res.set('Deprecation', 'true');
  res.set('Link', '</api/v2>; rel="successor-version"');
  next();
});

日付ベースのバージョニング(Stripeモデル)

API-Version: 2026-03-15

変更は数値ではなく日付に紐づける:
  2026-01-01 → ベースライン
  2026-03-15 → `name`を`display_name`にリネーム
  2026-06-01 → `legacy_field`を削除

サーバーはバージョン指定のないリクエストをアカウントのデフォルトバージョンにピン留めする。
各バージョンは、内部の正規モデルに対する変換レイヤーとして機能する。

アンチパターン

  1. 過剰なバージョニング — ほとんどの変更は追加的でありバージョンアップは不要。フィールドは自由に追加してよい
  2. サンセット期限なし — 具体的な廃止日を設定せずに非推奨化すると、バージョンが永久に残り続ける
  3. コントローラー全体のコピー — バージョンごとにビジネスロジックを複製するのではなく、変換/アダプターレイヤーを使用する
  4. 未知のフィールドを無視 — APIは寛容な読み取り手であるべき。入力の未知フィールドは無視する(Postelの法則)
  5. マイナーバージョンでの破壊的変更 — 利用者が依存していたものを削除することは、意図に関わらず破壊的変更である

品質チェックリスト

  • 追加的変更(新しいフィールド、新しいエンドポイント)はバージョンアップなしでリリースされる
  • 破壊的変更には6ヶ月以上のサンセット期間を伴うメジャーバージョンアップが必要
  • 非推奨バージョンにSunsetヘッダー(RFC 8594)が設定されている
  • Linkヘッダーが利用者を後継バージョンに誘導する
  • バージョンごとのトラフィックを監視して移行の進捗を追跡する
  • バージョンごとにOpenAPI仕様が公開され、差分ツール(Optic/Bump.sh)が使用されている
  • 利用者への通知計画:チェンジログ、メール、ダッシュボード警告
  • バージョンルーティングはアプリケーションコードではなくゲートウェイレベルで処理される
  • 統合テストで後方互換性を検証する(コントラクトテスト)

Individual skills in this repo

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

curiositech/windags-skills

Expert in 2000s-era music visualization (Milkdrop, AVS, Geiss) and modern WebGL implementations. Specializes in Butterchurn integration, Web Audio API AnalyserNode FFT data, GLSL shaders for audio-reactive visuals, and psychedelic generative art. Activate on "Milkdrop", "music visualization", "WebGL visualizer", "Butterchurn", "audio reactive", "FFT visualization", "spectrum analyzer". NOT for simple bar charts/waveforms (use basic canvas), video editing, or non-audio visuals.

curiositech/windags-skills

Expert legal research agent for finding and scraping expungement data state by state. Knows authoritative sources, URL patterns, Firecrawl configuration, and 2026 legal landscape.

curiositech/windags-skills

Expert in 3D computer vision labeling tools, workflows, and AI-assisted annotation for LiDAR, point clouds, and sensor fusion. Covers SAM4D/Point-SAM, human-in-the-loop architectures, and vertical-specific training strategies. Activate on '3D labeling', 'point cloud annotation', 'LiDAR labeling', 'SAM 3D', 'SAM4D', 'sensor fusion annotation', '3D bounding box', 'semantic segmentation point cloud'. NOT for 2D image labeling (use clip-aware-embeddings), general ML training (use ml-engineer), video annotation without 3D (use computer-vision-pipeline), or VLM prompt engineering (use prompt-engineer).

curiositech/windags-skills

Implement WCAG 2.2 AA/AAA compliance with automated testing, keyboard navigation, screen reader support, and focus management. Activate on: accessibility audit, WCAG compliance, keyboard navigation, screen reader, aria attributes, axe-core, focus trap. NOT for: design-level accessibility review (use design-accessibility-auditor), color contrast only (use css-in-js-architect).

curiositech/windags-skills

Time-blind friendly planning, executive function support, and daily structure for ADHD brains. Specializes in realistic time estimation, dopamine-aware task design, and building systems that actually work for neurodivergent minds.

curiositech/windags-skills

Designs digital experiences for ADHD brains using neuroscience research and UX principles. Expert in reducing cognitive load, time blindness solutions, dopamine-driven engagement, and compassionate design patterns. Activate on 'ADHD design', 'cognitive load', 'accessibility', 'neurodivergent UX', 'time blindness', 'dopamine-driven', 'executive function'. NOT for general accessibility (WCAG only), neurotypical UX design, or simple UI styling without ADHD context.

curiositech/windags-skills

>- Apply crisis decision-making research to agent routing, uncertainty triage, and coordination failure analysis in time-pressured systems. Use when diagnosing handoff failures, analytical paralysis, or expert judgment under incomplete information. NOT for routine coding, simple CRUD design, or static single-agent tasks with complete information.

curiositech/windags-skills

Extend and modify the admin dashboard, developer portal, and operations console. Use when adding new admin tabs, metrics, monitoring features, or internal tools. Activates for dashboard development, analytics, user management, and internal tooling.

curiositech/windags-skills

Conversation patterns and interaction protocols for multi-agent systems. Covers request/response, pub/sub, blackboard, delegation chains, debate, critique, consensus, fan-out/fan-in, supervisor-worker, and peer negotiation. Deep analysis of AutoGen conversation patterns, CrewAI delegation, LangGraph state passing, and FIPA-ACL performatives. Teaches how to design what agents say to each other and in what order. Activate on: "agent conversation", "agent protocol", "multi-agent debate", "agent delegation", "supervisor worker pattern", "agent voting", "consensus protocol", "fan-out fan-in", "agent negotiation", "blackboard pattern", "agent dialogue", "conversation topology", "agent handoff". NOT for: wire format or serialization (use agent-interchange-formats), orchestration infrastructure (use agentic-infrastructure-2026), single agent behavior (use agentic-patterns).

curiositech/windags-skills

Meta-agent for creating new custom agents, skills, and MCP integrations. Expert in agent design, MCP development, skill architecture, and rapid prototyping. Activate on 'create agent', 'new skill', 'MCP server', 'custom tool', 'agent design'. NOT for using existing agents (invoke them directly), general coding (use language-specific skills), or infrastructure setup (use deployment-engineer).

curiositech/windags-skills

AI-powered calendar management and agent-based scheduling coordination. Covers calendar APIs (Google Calendar, CalDAV/iCal), AI scheduling assistants (Reclaim, Clockwise, Motion, Cal.com), building custom calendar agents with MCP, multi-calendar merging, timezone management, focus block protection, meeting fatigue detection, and agent-to-agent meeting negotiation protocols. Activate on: "calendar agent", "AI scheduling", "calendar coordination", "meeting scheduling", "calendar API", "focus time protection", "calendar optimization", "Google Calendar MCP", "Reclaim", "Clockwise", "Motion", "Cal.com", "smart scheduling", "calendar-aware agent", "timezone scheduling", "agent negotiation meetings". NOT for: manual calendar UI component design (use form-validation-architect), project management scheduling or Gantt charts (use project-management-guru-adhd), general time-tracking or pomodoro apps (use adhd-daily-planner for time-awareness), building the agent itself from scratch (use agent-creator).

curiositech/windags-skills

Build and adopt production AI agent infrastructure in 2026. Covers framework selection (LangGraph, CrewAI, AutoGen, MCP), orchestration patterns, evaluation, observability, memory systems, and tool use. Also covers the SOCIAL dimension: how to sell agent infrastructure internally, change management, measuring ROI, building trust in autonomous systems, and scaling adoption across teams. Activate on: "agent infrastructure", "agent framework comparison", "which agent framework", "sell AI tools internally", "agent adoption", "agent observability", "agent evaluation", "MCP architecture", "agentic mesh", "enterprise AI agents", "AI change management", "agent ROI". NOT for: building specific agents (use ai-engineer), designing agent behavior patterns (use agentic-patterns), prompt tuning (use prompt-engineer).

curiositech/windags-skills

Fundamental patterns for effective agentic behavior. Teaches decomposition, tool orchestration, error recovery, context management, quality self-assessment, and knowing when to stop. Model-agnostic principles that make any agent more effective regardless of domain. Activate on: "how should I structure this agent", "agentic workflow", "agent patterns", "multi-step task", "tool orchestration", "/agentic-patterns", "decompose this", "agent best practices", "chain of actions", "when should the agent stop", "agent loop design". NOT for: creating agent infrastructure (use agent-creator), building DAGs (use windags-architect), specific tool implementation.

curiositech/windags-skills

Automated discovery and matching of agent skills for dynamic task routing and capability assessment

curiositech/windags-skills

Cryptographic security for agentic systems — zero-trust agent networking, signed message envelopes (JWS/JWE), capability-based security (ocaps), Merkle tree audit trails, WASM sandboxing, and formal verification. Covers CLI dev tool security, mTLS between agents, permission boundaries (least privilege for AI agents), and supply chain security for skills/plugins. Activate on: "agent security", "zero trust agents", "secure agent communication", "capability-based security", "ocap", "signed messages between agents", "agent audit trail", "sandbox agent execution", "agent permissions", "mTLS agents", "cryptographic verification", "agent supply chain", "OWASP agentic", "prove agent did X", "tamper-proof agent logs". NOT for: application-level SAST scanning (use security-auditor), network firewall rules (use infrastructure), SOC2/HIPAA compliance (organizational), or prompt injection defense (use prompt-engineer).

curiositech/windags-skills

Data structures and serialization formats for agent-to-agent communication. Covers message envelopes, structured output schemas, capability declarations, task handoff payloads, error/retry signaling, and context windows as data structures. Deep comparison of A2A protocol, MCP, OpenAI function calling, and LangChain message types. Teaches when to use rigid schemas vs free-form with validation, typed vs untyped, streaming vs batch. Activate on: "agent message format", "agent communication schema", "agent-to-agent protocol", "A2A protocol", "MCP message format", "structured output for agents", "agent interop", "interchange format", "agent serialization", "task handoff format", "capability declaration". NOT for: what agents say to each other (use agent-conversation-protocols), orchestration topology (use multi-agent-coordination), building agent infrastructure (use agentic-infrastructure-2026).

curiositech/windags-skills

Logic-based agent programming language implementing BDI architecture for practical autonomous agent development

curiositech/windags-skills

>- Design AgentSpeak(L)-style BDI agents with context-guarded plans, selection functions, and intention stacks. Use for interruptible autonomy, agent policy, and multi-agent orchestration in dynamic environments. NOT for simple rule engines, static planners, or centralized workflows.

curiositech/windags-skills

Foundational concurrent computation model where actors communicate exclusively through asynchronous message passing

curiositech/windags-skills

license: Apache-2.0 NOT for unrelated tasks outside this domain.

関連スキル