CommunityProgramación y desarrollogithub.com

getedgehq/http-error-triage

Ejecuta esto antes de concluir algo a partir de un error HTTP en una API de terceros. Separa un problema real de credencial/suscripción de un bloqueo de CDN o WAF, un endpoint incorrecto o una prohibición por firma de cliente. Úsalo siempre que una API devuelva 401/403/402/429 y estés a punto de decir 'la clave está muerta', 'los créditos están agotados', 'el plan no tiene acceso' o 'estamos limitados por tasa'.

¿Qué es http-error-triage?

Esta habilidad ayuda a diagnosticar errores HTTP (401/403/402/429) de APIs de terceros, evitando conclusiones prematuras como 'la clave está muerta' o 'créditos agotados'. Proporciona tres controles rápidos: prueba con credenciales inválidas, con rutas inexistentes y con lectura de headers de respuesta (como 'server: cloudflare') para identificar si el bloqueo ocurre a nivel de infraestructura (CDN/WAF) y no en la API misma. Incluye firmas conocidas (por ejemplo, un 403 con 'error code: 1010' suele ser un bloqueo de Cloudflare por falta de User-Agent) y recomienda headers por defecto para APIs server-side. También sugiere medir el costo real de las llamadas. Es útil para desarrolladores que integran APIs externas y quieren ahorrar tiempo en debugging, soportando cualquier plataforma (Python, etc.).

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

Installed? Explore more Programación y desarrollo skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

Preguntar en tu IA favorita

Abre un nuevo chat con esta habilidad de agente ya precargada.

Documentación

Triaje de errores HTTP

Un error HTTP te dice que una solicitud falló. Normalmente no te dice por qué. Concluir "la clave está muerta" a partir de un 403 es una suposición disfrazada de número.

Nacido de un incidente real (2026-07-30): una API de enriquecimiento de contactos de terceros devolvió 403 error code: 1010 a cada llamada durante seis días. Se interpretó como "clave no autorizada", "créditos agotados", "cuota mensual alcanzada". Se construyó una solución de automatización de navegador de 756 líneas basada en esa creencia, y a un cliente casi se le pidió que revisara un plan que estaba bien. La causa real era un User-Agent faltante, por lo que el CDN prohibió al cliente en el borde. Un header lo solucionó: 200 OK, datos completos, y el saldo de crédito había estado allí todo el tiempo.

Ejecuta estos tres controles antes de diagnosticar

1. El control de credencial inválida. Envía la misma solicitud con una credencial deliberadamente basura, y otra vez sin ninguna.

for label, key in [("real", REAL_KEY), ("garbage", "0"*36), ("empty", "")]:
    ...  # misma URL, mismo método, mismos headers

Si los tres devuelven el mismo estado y cuerpo, el error no tiene que ver con tu credencial. No aporta información sobre autorización, cuota o validez. Deja de razonar sobre la clave.

2. El control de ruta sin sentido. Solicita una ruta que ciertamente no existe, y la raíz del sitio.

GET https://api.example.com/definitely-not-a-real-path-12345
GET https://api.example.com/
GET https://www.example.com/          # su sitio de marketing

Si el error de la API también aparece desde el sitio de marketing, estás siendo bloqueado delante de el origen. Nada sobre la llamada a la API ayudará.

3. Lee los headers de respuesta, no solo el cuerpo.

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

server: cloudflare en un error de "auth" es la pista. También lo son cf-ray, x-amzn-waf, akamai. Esos son infraestructura, no la API.

Firmas conocidas

SíntomaCausa realSolución
403 + cuerpo error code: 1010, server: cloudflareCloudflare bloqueó la firma del clienteEnviar un User-Agent de navegador real
Mismo error para cada ruta incl. /Bloqueo de borde/WAF o prohibición de IPCambiar UA, luego IP/proxy
402Realmente sin créditos: la solicitud se autenticóRecargar; la clave está bien
429 justo después de un éxitoLímite de tasa realEspaciar solicitudes, añadir retroceso
400 con un mensaje de campoLlegaste a la API y la autenticación pasóCorregir el payload; esto es una buena noticia

Un error de validación 400 es una señal de éxito para el triaje: prueba que la autenticación fue aceptada.

Headers por defecto para cualquier llamada a API del lado del servidor

urllib de Python envía User-Agent: Python-urllib/3.x, que muchos WAF bloquean directamente. Siempre establece:

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",
}

Luego mide el costo antes de cualquier barrido

Una vez que funcione, no estimes el gasto. Lee el uso antes y después de una llamada, y lee el propio campo de facturación del proveedor en la respuesta.

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

Qué informar

Indica qué probaste y qué queda desconocido. "Ambas claves 403" no es un hallazgo si una clave vacía devuelve el mismo 403. Di en su lugar: "El 403 no es informativo aquí, una credencial nula también lo devuelve; la causa está antes de la autenticación."

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

Skills relacionados