api-protocol-security

api-protocol-security is a skill for Claude Code, Codex from zhaji2333/CkSKILLS. It costs 87 tokens per session (1,203 once invoked), scanned A, original, MIT.

A security testing method for web and service interfaces such as REST, GraphQL, gRPC, and WebSocket APIs. It checks how requests, permissions, documentation, older versions, gateways, and resource limits behave.

In plain words
What is it for?
Use it to test every supported request method and parameter, object and field permissions, API documentation, debug endpoints, old versions, GraphQL queries, WebSocket messages, and request limits.
Why use it?
It helps expose unauthorized data access, weak authentication, hidden administrative endpoints, unsafe request parsing, excessive resource use, and rate-limit bypasses.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/zhaji2333/ckskills/api-protocol-security
Any agent
npx skills add zhaji2333/CkSKILLS --skill api-protocol-security
Clone the repo
git clone --depth 1 https://github.com/zhaji2333/CkSKILLS

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for api-protocol-security

README.md
[![agentmods](https://agentmods.dev/badge/skills/zhaji2333/ckskills/api-protocol-security.svg)](https://agentmods.dev/skills/zhaji2333/ckskills/api-protocol-security)
Your own site
<a href="https://agentmods.dev/skills/zhaji2333/ckskills/api-protocol-security"><img src="https://agentmods.dev/badge/skills/zhaji2333/ckskills/api-protocol-security.svg" alt="Measured on agentmods" height="20"></a>
Per session 87 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,203 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00087 $0.01203
Opus 5 $0.00044 $0.00602
Sonnet 5 $0.00017 $0.00241
Haiku 4.5 $0.00009 $0.00120

Measured today against content hash 8c5e27fef9ad, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

api-protocol-security scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured today.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.agents/skills/api-protocol-security/SKILL.md · 88 lines

What it actually says

api-protocol-security — API 与协议层安全专项深度挖掘

何时调用(触发条件)

  • REST/GraphQL/gRPC/WebSocket 接口
  • 接口文档暴露(Swagger/OpenAPI/api-docs)
  • 调试端点(/actuator /debug /console /metrics)
  • 旧版本接口(/api/v1 未下线)、内部接口外泄
  • 路径已知的未授权 API / 网关(路径未知、无账号、独立 H5/迁域残留 → 先 unauth-path-key-hunt
  • 微服务网关、反向代理
  • HTTP 解析差异(走私)、缓存投毒
  • 资源消耗类攻击(深层查询、巨型请求)

一、API/接口类场景表(全景)

场景 漏洞类型 挖掘要点
REST API 越权/注入/信息泄露 全方法测试(GET/POST/PUT/DELETE/PATCH)
GraphQL 内省泄露/深度攻击/批量查询 __schema查询、嵌套查询DoS、别名批量
gRPC 反序列化/未授权 protobuf解析、接口鉴权
WebSocket 鉴权缺失/注入/越权 连接无token验证、消息可伪造
接口文档(Swagger/OpenAPI) 敏感接口泄露 /swagger-ui /api-docs暴露
调试接口 未授权访问/RCE /actuator /debug /console
旧版本接口 鉴权缺失/逻辑差异 /api/v1旧版本未下线
内部接口外泄 未授权/敏感操作 内部RPC接口可公网访问

二、REST API 测试要点

  • 每个接口测试全部 HTTP 方法(GET/POST/PUT/DELETE/PATCH/OPTIONS)
  • 每个参数测试:正常值、空值、边界值、类型混淆、数组化、超长、特殊字符
  • 鉴权测试:有 token/无 token/过期 token/其他用户 token
  • 隐藏参数/调试参数全部尝试(debug=1、test=1、_method=PUT)
  • BOLA(对象级授权):遍历资源 ID、批量参数
  • 速率限制:登录、验证码、短信、转账接口是否可绕过(IP/Header 伪造)

三、GraphQL 专项

  • 内省查询{__schema{types{name}}} 是否开放
  • 深度攻击:嵌套查询(friends 循环)造成 DoS
  • 别名批量:同一查询别名多次执行绕过速率限制
  • 批量枚举user(id:1) 遍历获取数据
  • 越权:字段级权限缺失(隐藏字段可查)

四、WebSocket 专项

  • 连接时是否验证 token(无鉴权直连)
  • 消息伪造:他人会话/敏感操作
  • 注入:SQL/命令注入点进入消息处理
  • 越权:通过消息 ID 操作他人资源

五、HTTP 走私 / 协议层(O类)

  • 反向代理解析差异(Content-Length vs Transfer-Encoding)
  • 请求边界混淆 → 前置代理放行、后端走私
  • 测试工具:smuggler / Burp 扩展
  • 影响:缓存投毒、绕过鉴权、越权访问其他用户请求

六、资源消耗 DoS(P类)

  • 正则灾难回溯(ReDoS)
  • 巨型 JSON/XML 解析
  • 图像炸弹(解压炸弹)
  • 深度递归(GraphQL 嵌套)
  • 无速率限制的批量接口

七、验证要点

  • 全方法测试结果记录:每个方法的状态码/响应差异
  • 未授权访问:直接调用管理接口/调试端点是否 200
  • BOLA:A 用户 token 读取 B 用户数据即确认
  • 走私:请求包能否污染下一个请求的响应
  • 报告标注:接口文档暴露范围、可枚举数据量、速率限制缺失的影响

八、修复建议

  • 统一网关鉴权,接口文档/调试端点仅内网开放
  • 旧版本接口下线或同步鉴权
  • GraphQL:关闭内省、深度/复杂度限制、别名限制
  • WebSocket:连接鉴权 + 消息级权限校验
  • 代理统一解析(规范 CL/TE)、禁止走私
  • 速率限制:服务端按用户/IP,防 Header 伪造
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. today Changed · +1 lines 8c5e27fef9ad
  2. 4d ago First seen · 87 lines · 87 tokens per session scan A ca36a1e08815

Subscribe to this mod's changes

api-protocol-security is a skill published in the GitHub repository zhaji2333/CkSKILLS (73 stars, last pushed 3d ago), licensed MIT. It adds 87 tokens to every session and 1,203 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

dingtalk_channel_connect

Use a headed browser to automatically complete DingTalk channel integration for QwenPaw. Applicable when the user mentions DingTalk, developer console, Client ID, Client Secret, bot, Stream mode, binding or configuring a channel. Supports pausing when a login page is detected and resuming after the user logs in.

agentscope-ai/QwenPaw · 69 tokens

pdf

当用户需要对PDF文件进行任何操作时,请使用此技能。包括从 PDF 中读取或提取文本/表格、合并多个 PDF、拆分 PDF、旋转页面、添加水印、创建新PDF、填写PDF表单、加密/解密 PDF、提取图片,以及对扫描版 PDF 进行 OCR 使其可搜索。如果用户提到 .pdf 文件或要求生成 PDF,请使用此技能。.

agentscope-ai/QwenPaw · 95 tokens

make_plan

For external plan request scenarios, guides the Agent to request a clear, actionable, step-by-step plan from a stronger Agent via listagents and chatwithagent, emphasizing that the plan is executed by the requester, not by the consulted Agent.

agentscope-ai/QwenPaw · 51 tokens

gpt-image-2

面向 GPT Image 2 的图像生成 / 编辑技能。可在 3 种环境下使用:(A) Garden 本地模式,通过 OpenAI 兼容接口直接出图并落盘;(B) Host-Native 模式,把本 Skill 当作提示词工程指引,把渲染好的 prompt 交给宿主 Agent 自带的图像工具出图;(C) Advisor 模式,宿主无任何图像工具时退化为高质量 prompt 顾问。涵盖 18 大类、80+ 个结构化模板,覆盖海报 / UI / 产品 / 信息图 / 学术图 / 技术架构图 / 漫画 / 头像 / 流程板 / 电影分镜 / IP 周边 / 编辑工作流等场景。.

ConardLi/garden-skills · 177 tokens

new

Create a new project to start development quickly.

clacky-ai/openclacky · 10 tokens

officecli-word-form

Use this skill to create fillable Word forms (.docx) with real Content Controls (SDT) + legacy FormField checkboxes + MERGEFIELD mail-merge placeholders + document protection. Trigger on: 'fillable form', 'form fields', 'content controls', 'SDT', 'word form', 'fill in', 'only editable fields', 'protect document'…

iOfficeAI/OfficeCLI · 224 tokens