Install any skill in seconds. Free to start, no credit card required.
Get Started Free →doccker/cc-api-proxy-safety
网关/代理/WAF/CDN 中间件响应判定与关键词匹配安全规范。适用于 proxy/gateway/waf/cdn/nginx/openresty/rewrite/redirect 等代码,防止把正常长正文中的 Cloudflare、502、bad gateway、error 等技术术语误判为上游错误。
Passed 19 of 22 test cases with the skill, and 17 of 22 without it.
2 fixed17 passed either way3 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 2 test cases the skill fixed. Same model, same prompt, with and without the skill.
我们开发的反向代理在对 HTTP 200 响应体做判断时,总是简单的使用 strings.Contains(body, 'bad gateway')。在处理包含技术博客文章(长度 2KB)的响应时产生误判。请给出改写方案。
| Checked | Without skill | With skill |
|---|---|---|
| Enforces a maximum body length threshold of 512 bytes for weak keyword error detection. | Missed | Passed |
The instructions your model reads when the skill loads.
网关、反向代理、WAF、CDN 中间件实现响应判定时,不要只靠正文关键词判断上游是否失败。关键词可以作为线索,不能替代 HTTP 状态、响应头、内容类型和业务响应结构。
按以下优先级判定响应性质:
Content-Type、Server、Via、CF-Ray、认证/限流头等比正文关键词更可靠。禁止:对完整业务正文做纯 strings.Contains(lowerBody, "cloudflare") / "bad gateway" / "error" 判错。
强特征应同时具备明确上下文,例如:
Content-Type: text/html,正文包含错误页标题,且响应头或状态也指向 CDN/WAF/网关。{"error": {"type": "upstream_error"}}。不要把单个短片段直接当强特征。<html、cf-ray:、cloudflare、502 bad gateway 都可能出现在技术文章、日志展示或用户输入中。
以下内容只能作为弱证据:
cloudflare、openresty、nginxbad gateway、502 bad gateway、upstream errorerror、reconnecting、too many requests弱特征只有在满足以下条件时才可参与判错:
test cases passed, vs 17 / 22 without
Published skills whose descriptions closely match this one, with their headline benchmark lift.
More skills from the same source and nearby in the registry, with their headline benchmark lift.