APIエンドポイントの追加・変更で、DTO、入力検証、OpenAPI仕様、MCPツールの説明や公開範囲を揃え、エージェントからも扱いやすいAPIに整えます。
- APIエンドポイントを追加したいとき
- DTOと入力検証を整えたいとき
- MCPツールとしてAPIを公開したいとき
OpenAPI仕様と生成時のエラーを調べ、SDK生成が止まった原因を分類し、オーバーレイで直すか仕様の修正や判断を求めるかを整理します。
Use when SDK generation failed or seeing errors. Triggers on "generation failed", "speakeasy run failed", "SDK build error", "workflow failed", "Step Failed", "why did generation fail"
実行スコア 未検証
インストール方法を見るSDK生成に失敗したとき、OpenAPI仕様とエラー出力を手がかりに原因を調べ、対処方針と具体的な作業項目を整理します。speakeasy lint openapiで詳細なエラーを確認し、説明文やoperationIdの不足などオーバーレイで補える問題、無効なスキーマや必須項目の不足など仕様の修正が必要な問題、認証方式や設計判断のように利用者の判断が要る問題に分けます。実行時の型不一致やAPI仕様と実際の挙動のずれ、列挙値の不足も、契約テストなどで確認する観点として示します。
speakeasy runが失敗した理由を調べたいときや、生成結果が想定と異なるときに向いています。エラーを一つずつ場当たり的に直すのではなく、まず問題の種類を見極めて、必要な修正先や判断事項をまとめたい場合にも使えます。大きなOpenAPI仕様では、yqやjqでパスやスキーマ、operationIdを絞って確認する方法も扱います。
入力には失敗したOpenAPI仕様のパスが必要です。エラー出力があると診断に役立ちます。元の仕様を無断で変更したり、lintルールを無効にしてエラーを隠したりせず、構造上の問題や設計判断が必要な点は利用者に確認します。ライセンスはApache-2.0です。
この紹介文は、公開されている SKILL.md をもとに AI(OpenAI Codex)が作成しました。正確な仕様は下の原文を確認してください。
インストールする前に、エージェントに与えられる指示の中身を確認できます。
When SDK generation fails, diagnose the root cause and determine the fix strategy.
speakeasy run failed with errors| Input | Required | Description |
|---|---|---|
| OpenAPI spec | Yes | Path to spec that failed generation |
| Error output | Helpful | Error messages from failed run |
| Output | Description |
|---|---|
| Diagnosis | Root cause of failure |
| Fix strategy | Overlay vs spec fix vs user decision |
| Action items | Specific steps to resolve |
Run lint to get detailed errors:
speakeasy lint openapi --non-interactive -s <spec-path>
Categorize issues:
| Issue Type | Fix Strategy | Example |
|---|---|---|
| Missing operationId | Overlay | Use speakeasy suggest operation-ids |
| Missing description | Overlay | Add via overlay |
| Invalid $ref | Ask user | Broken reference needs spec fix |
| Circular reference | Ask user | Design decision needed |
| Missing security | Ask user | Auth design needed |
PROBLEM
│
├─ ResponseValidationError at runtime?
│ └─ SDK types don't match server responses
│ ├─ Run contract tests to identify mismatches
│ └─ Fix spec or create overlay to correct types
│
├─ SDK doesn't match live API behavior?
│ ├─ Spec may have drifted from API
│ │ → Run contract tests to detect drift
│ └─ Third-party spec may be inaccurate
│ → Validate with contract testing before trusting
│
├─ Type mismatch errors in generated SDK?
│ ├─ At compile time → Check spec schema definitions
│ └─ At runtime → Server returns unexpected types
│ → Contract testing required
│
└─ Enum value not recognized?
└─ API returned value not in spec enum
├─ Add missing value to spec/overlay
└─ Or use open enums for anti-fragility
Use yq (YAML) or jq (JSON) to inspect specs without loading full content:
# List all paths
yq '.paths | keys' spec.yaml
# Inspect a specific endpoint
yq '.paths["/users/{id}"]' spec.yaml
# List all schema names
yq '.components.schemas | keys' spec.yaml
# List all operationIds
yq '[.paths[][].operationId // empty] | unique' spec.yaml
For complex issues, produce a document:
## OpenAPI Spec Analysis
### Blocking Issues (require user input)
- [List issues that need human decision]
### Fixable Issues (can use overlays)
- [List issues with proposed overlay fixes]
### Recommended Approach
[Your recommendation]
manage-openapi-overlays - Fix issues with overlayssetup-sdk-testing - Contract testing for validationwriting-openapi-specs - Spec design best practicesまだレビューはありません。使ってみた感想をお寄せください。
ログインなしで書き込めます。使ってみた感想、質問、動かなかった環境などを気軽にどうぞ。
まだコメントはありません。最初のコメントを書いてみませんか。
APIエンドポイントの追加・変更で、DTO、入力検証、OpenAPI仕様、MCPツールの説明や公開範囲を揃え、エージェントからも扱いやすいAPIに整えます。
既存コードのデザインシステム利用状況を調べ、旧UI部品やlucide-reactのアイコンを@trycompai/design-systemの部品・Carbonアイコンへ置き換えるスキルです。
指定されたファイルのフックやAPI利用を点検し、禁止パターンをSWRやapiClientなどの指定方式へ修正するための監査手順と実装規約をまとめています。
NestJSのAPIとフロントエンドを調べ、権限チェックや監査ログのルール違反を修正するための確認項目を示します。
権限で表示や操作が変わるコンポーネントの単体テストを点検し、不足分の追加や失敗の修正を行って、管理者と閲覧専用ユーザーの動作を確かめます。
Better Authを使ったTypeScript認証の設定を支援し、データベース接続、セッション管理、メール認証、OAuth、プラグインやセキュリティ項目を整理します。