What problem does it solve?
Proxy, gateway, WAF, and CDN middleware often misclassify normal long response bodies as upstream errors because they contain technical terms like Cloudflare, 502, bad gateway, or error. This Skill defines a safe decision hierarchy so response classification relies on HTTP status, headers, and business payload structure instead of naive keyword matching.
Core Features & Use Cases
- Prioritized Decision Hierarchy: Classify responses by transport/HTTP status first, then headers and content type, then business JSON envelope, and only lastly body heuristics.
- Strong vs Weak Signal Split: Treat brand words (cloudflare, nginx, openresty) and short phrases (bad gateway, error) as weak evidence usable only on short bodies (<= 512 bytes) or alongside error statuses.
- Go Decision Template: Provides a reference
isUpstreamFailure implementation plus a regression test matrix covering long bodies, short error pages, valid JSON with weak keywords, and streaming chunks.
- Use Case: When reviewing a reverse proxy that flags any body containing "bad gateway" as an upstream failure, apply this Skill to rewrite the check so technical articles and model outputs are no longer misclassified.
Quick Start
Use the cc-api-proxy-safety skill to review my gateway response-matching logic and check whether it misjudges normal response bodies containing CDN or error keywords.