Communityコーディング&開発github.com

getedgehq/http-error-triage

サードパーティAPIのHTTPエラーを見たときに、本当に認証情報や権限の問題なのか、CDN/WAFブロック、エンドポイントの誤り、クライアント署名の禁止かを切り分けるためのスキルです。APIが401/403/402/429を返したときに「キーが無効」「クレジット切れ」「プランにアクセス権がない」「レート制限中」と判断する前に実行してください。

http-error-triage とは?

このスキルは、サードパーティAPIからのHTTPエラー(特に401、403、402、429)を受け取ったときに、その原因が本当に認証情報や権限、クレジット切れなのか、それともCDNやWAFによるブロック、エンドポイントの指定ミス、クライアント署名の禁止といった別の要因なのかを体系的に切り分けるための手順を提供します。実在のインシデント(2026年7月30日)に基づいて設計されており、当時は誤った原因特定により756行ものブラウザ自動化回避策が作成され、顧客に不要なプラン変更を依頼しそうになりました。本来の原因は単なるUser-Agentヘッダの欠落でした。このスキルでは3つの制御テスト(無効な資格情報、存在しないパス、レスポンスヘッダの確認)と既知のシグネチャテーブルを提示し、エラー原因を迅速に切り分けます。また、デフォルトのリクエストヘッダ設定や実際のコスト測定方法も含まれています。Claude Code、Cursor、CodexなどのAIエージェントで使用可能で、誤った診断による時間とリソースの浪費を防ぎます。

対応~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/getedgehq/skills/tree/main/http-error-triage

Installed? Explore more コーディング&開発 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

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

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

ドキュメント

HTTP エラー トリアージ

HTTP エラーはリクエストが失敗したことを示します。しかし、通常は なぜ 失敗したのかは教えてくれません。 403 を見て「キーが無効だ」と結論づけるのは、数字を着せた推測にすぎません。

実在のインシデント(2026-07-30)に端を発しています。あるサードパーティの連絡先エンリッチメントAPIが、 6日間すべての呼び出しに対して 403 error code: 1010 を返しました。これは「キーに権限がない」、「クレジット切れ」、 「月間クォータに達した」と解釈されました。その思い込みに基づいて756行のブラウザ自動化回避策が構築され、 顧客には正常なプランを確認するよう依頼するところでした。実際の原因は User-Agent の欠落で、CDNがエッジでクライアントを 禁止したのです。1つのヘッダで修正されました:200 OK、完全なデータ、そしてクレジット残高はずっとそこにありました。

診断前に実行すべき3つの制御テスト

1. 無効な資格情報の制御テスト。 同じリクエストを、意図的に無効な資格情報と、資格情報なしで送信します。

for label, key in [("real", REAL_KEY), ("garbage", "0"*36), ("empty", "")]:
    ...  # 同じURL、同じメソッド、同じヘッダ

3つすべてが 同じ ステータスとボディを返した場合、エラーは資格情報に関するものではありません。 権限、クォータ、有効性についての情報はまったくありません。キーについての推論をやめてください。

2. 無意味なパスの制御テスト。 確実に存在しないパスと、サイトルートをリクエストします。

GET https://api.example.com/definitely-not-a-real-path-12345
GET https://api.example.com/
GET https://www.example.com/          # マーケティングサイト

APIエラーがマーケティングサイトからも返ってきた場合、オリジンの 手前 でブロックされています。 API呼び出しについての情報は何も役に立ちません。

3. レスポンスヘッダを読む(ボディだけでなく)。

except urllib.error.HTTPError as e:
    print(e.code, e.headers.get("server"), e.read()[:200])

「auth」エラーで server: cloudflare は決定的な手がかりです。cf-ray、x-amzn-waf、akamai も同様です。 これらはインフラストラクチャであり、APIではありません。

既知のシグネチャ

症状実際の原因修正方法
403 + ボディ error code: 1010、server: cloudflareCloudflareがクライアント署名を禁止実際のブラウザの User-Agent を送信
すべてのパス(/ を含む)で同じエラーエッジ/WAFブロックまたはIP禁止UAを変更し、次にIP/プロキシを変更
402本当にクレジット切れ:リクエストは 認証されたチャージアップ;キーは正常
429(成功の直後)本当のレート制限リクエストを調整し、バックオフを追加
400(フィールドメッセージあり)APIに到達し、認証が通ったペイロードを修正;これは良い知らせ

400 バリデーションエラーはトリアージにとって 成功のシグナル です:認証が受け入れられたことを証明します。

サーバーサイドAPI呼び出しのデフォルトヘッダ

Python の urllib は User-Agent: Python-urllib/3.x を送信しますが、これは多くのWAFが即座に禁止します。 常に以下を設定してください:

headers = {
    "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) "
                  "AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0 Safari/537.36",
    "Accept": "application/json",
    "Content-Type": "application/json",
}

その後、一括処理の前にコストを測定する

動作するようになったら、支出を推定しないでください。1回の呼び出しの前後に使用量を読み取り、プロバイダ自身の課金フィールドをレスポンスで確認します。

before = usage(); result = call(); after = usage()
print("charged:", result.get("billing"), "| measured:", before - after)

報告すべきこと

テストしたことと、まだ不明なことを述べてください。「両方のキーで403」は、空のキーでも同じ403が返ってくる場合、発見とは言えません。代わりにこう言いましょう:「ここでの403は情報量がなく、nullの資格情報でも同じエラーが返ってきます。原因は認証より上流にあります。」

Individual skills in this repo

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

getedgehq/agent-evals

Build evals for an AI agent that already does real work. Use when someone asks "how do I know my agent is right", wants to test an agent before trusting it, compare models on cost versus quality, or turn production failures into tests. Walks from first tasks and yes/no verifiers, to isolated environments, to a trace-driven improvement loop.

getedgehq/cli-ux-review

Audit a command-line tool for user-friendliness — clear situation / next-step / options in every output, colour-highlighted runnable commands, no raw jargon, no silent hangs. Invoke for "CLI UX audit", "review my CLI", "is this CLI intuitive", or before any CLI release.

getedgehq/generate-image

Generate images with OpenAI GPT Image 2 via the Codex CLI, billed through the user's ChatGPT Plus subscription (no OpenAI API key, no per-image API cost). Use when the user asks to create, generate, or make an image, picture, illustration, icon, hero graphic, or concept art from a text prompt.

getedgehq/harness-first

Diagnose and fix an unreliable, expensive, or unsafe LLM agent by auditing its harness (golden set, judge, cost caps, data layer, action approvals, tracing) before blaming or swapping the model. Use when someone says an agent is "burning tokens", "hallucinating", "brittle", gives inconsistent answers, asks whether to switch to a cheaper/better model, or wants to ship an agent or prompt change to customers.

getedgehq/linkedin-media-prep

Convert, crop, resize, and compress images and videos for optimal LinkedIn upload quality and file size. Use when the user wants to prepare a photo, image, or video for LinkedIn (profile picture, cover photo, post image, article featured image, post video, or video ad), optimize file size for LinkedIn, crop and resize for LinkedIn dimensions, convert HEIC/RAW/PNG/MOV to LinkedIn-ready JPEG or MP4, or mentions LinkedIn media requirements, specs, or limits.

getedgehq/monid

>-

getedgehq/opendraft

An 18-agent pipeline that turns one topic line into a drafted

getedgehq/people-search

Find and rank professional people for recruiting, partnerships, sales, or research from user-provided data, public web sources, an authenticated search session, or a connected provider. Use for people discovery, LinkedIn or Sales Navigator search design, profile-list ranking, or provider filter translation.

getedgehq/rocketlist

Turn a CV into a shortlist of live startup roles from Rocketlist's public job board, including adjacent job titles the person would never have searched for, each with its published salary, the evidence for the fit, and a direct apply link. Use for "find roles I would be a strong fit for", career pivots, remote or VC-backed job hunts, and salary-visible role discovery.

getedgehq/security-audit-checklist

Run a comprehensive security audit across application code, cloud infrastructure, containers, CI/CD pipelines, and infrastructure-as-code. Covers privacy compliance, OWASP basics, secret leakage, API security, IAM misconfigurations, storage exposure, Kubernetes hardening, and network security. Use when the user asks to audit, review, or harden app or cloud security, check for secrets, scan for XSS/SQLi, verify security headers, review Terraform/CloudFormation, audit AWS/GCP/Azure configs, or perform any security-focused review.

getedgehq/shadcn-first

>-

getedgehq/skills

Develop or review a branded long-form YouTube channel using Simon Kaiser's public creator-led approach: audience fit, recurring formats, natural brand integration, Time with Brand, and an organic, paid, and Shorts strategy. Use for channel strategy, format briefs, and pilots.

getedgehq/skills

Build a YouTube strategy, evidence-backed idea slate, and title plus thumbnail package using Paddy Galloway's public method. Use when planning a channel, choosing concepts, or preparing a video before filming.

getedgehq/skills

Build or review a buyer-centered strategic narrative using Andy Raskin's public method. Use for sales or investor deck stories, homepage positioning, keynotes, launch narratives, and why-now messaging.

getedgehq/skills

Turn a product URL, launch brief, or approved script into a production-ready launch video. Use for product reveals, feature announcements, SaaS launches, and narrated product films; not for generic explainers or editing existing footage.

getedgehq/strip-image-ai-metadata

Strip C2PA and AI-generation metadata from images (PNG, JPEG, WebP) to remove "Generated by AI" / "ChatGPT" / "DALL-E" labels that platforms like LinkedIn, Instagram, and X display. Use when the user wants to clean AI-generated images before posting, remove AI attribution from photos, strip C2PA manifests, sanitize image metadata for professional use, or verify whether an image contains C2PA data.

getedgehq/top-down-comms

>-

getedgehq/workplan

Create, update, or close work plans for multi-step tasks. Use when starting refactors, bug lists, feature work, migrations, or any task with 2+ steps. Also use after auto-compaction to re-orient. Triggers: "workplan", "work plan", "create a plan", "what's the plan", "where was I", or when Claude detects

関連スキル