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.
npx agentmods add skills/davidtoby/agent-skills/api-learnernpx skills add davidtoby/agent-skills --skill api-learnergit clone --depth 1 https://github.com/davidtoby/agent-skillsWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00022 | $0.00862 |
| Opus 5 | $0.00011 | $0.00431 |
| Sonnet 5 | $0.00004 | $0.00172 |
| Haiku 4.5 | $0.00002 | $0.00086 |
Grade B, and why
api-learner scanned grade B with 2 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 2d ago.
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.
Asks for rootmediumPrivilege escalation
A mod that escalates privileges can change anything on the machine, not only the project.
sudo -u OpenClaw /opt/OpenClaw/scripts/capture-api.js --port 9222 --duration 300 Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
description: "Workflow for learning site APIs via traffic capture and replacing browser automation with direct curl calls." How it starts
The opening of the file, as written. The whole thing — 86 lines — stays where its author put it; the contents beside it link to each section on GitHub.
API Learner — Browser-to-API Migration
Instead of fighting browser timeouts on heavy sites, you can use learned API patterns to make direct curl calls. This is faster, more reliable, and avoids CDP timeout issues.
When to Suggest API Capture
Suggest this to the operator when:
- A site repeatedly causes browser timeouts (heavy SPAs, JS-heavy storefronts)
- You're doing the same browser task repeatedly (search → add to cart → repeat)
- The browser tool fails with "timed out after 20000ms" on a site you use often
Do NOT use API skills for:
- First visits to a new site (need to discover the workflow first)
- CAPTCHA or bot-detection flows
- Checkout / payment flows (the operator handles these manually)
- Sites where you need to see visual layout (e.g., comparing product images)
How API Learning Works
- The operator starts a capture on the relevant VNC browser port
- Normal browsing happens — manually or via the browser tool
- Capture script records all XHR/Fetch API calls passively
- Generator analyzes the traffic and produces a SKILL.md with endpoint docs
- You use curl with fresh cookies instead of the browser tool
Using a Generated API Skill
Once an API skill exists (e.g., api-example), follow this pattern:
Step 1: Extract fresh cookies
COOKIES=$(/opt/OpenClaw/scripts/extract-cookies.js --domain <domain> --port <cdp-port>)
The VNC browser must be open and logged into the site. Cookies come from the live browser session.
Step 2: Make API calls
Use curl with the cookie header:
curl -s 'https://www.example.com/api/search?q=spinach' \
-H "Cookie: $COOKIES" | python3 -m json.tool
Step 3: Handle failures
- 401/403: Cookies expired. Re-extract and retry.
- Changed responses: API may have been updated. Tell the operator to re-capture.
- Unexpected errors: Fall back to the
browsertool. Report to the operator.
Starting a New Capture (For the Operator)
To capture traffic from a site:
# Capture from Mise's browser (port 9222) for 5 minutes
sudo -u OpenClaw /opt/OpenClaw/scripts/capture-api.js --port 9222 --duration 300
# Capture from Headhunter's browser (port 9223) for 5 minutes
sudo -u OpenClaw /opt/OpenClaw/scripts/capture-api.js --port 9223 --duration 300
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.
- 2d ago First seen · 86 lines · 22 tokens per session scan B 4a6050a35598
api-learner is a skill published in the GitHub repository davidtoby/agent-skills (10 stars, last pushed 28d ago), licensed MIT. It adds 22 tokens to every session and 862 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it B with 2 findings (asks for root, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
chip-seq
ChIP-seq peak calling and downstream interpretation with MACS3, signal track export, annotation, motif analysis, and differential binding review.
web-skills-protocol
Auto-discover and use Web Skills Protocol (WSP) skills when interacting with websites. Use this skill whenever the user asks you to interact with, use, or perform actions on a website or web service — such as searching a site, placing an order, deploying an app, or calling a web API. Before scraping HTML or guessing…
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.
browser_cdp
Use this skill when the user explicitly wants to connect to a running Chrome browser, scan local CDP ports, specify a cdpport, or share a single browser across multiple agents/tools. By default browser opens no debugging port; pass an explicit cdpport only when the user wants another local tool to attach.
browser_cdp
当用户明确希望连接到已运行的 Chrome 浏览器、扫描本地 CDP 端口、显式指定 cdpport,或让多个 agent / 工具共享同一个浏览器时,使用本 skill。browser 默认不开放调试端口;仅当用户明确希望其他本地工具附加时才显式传入 cdpport。.
browser_visible
当用户需要控制 browser 的浏览器启动方式时,使用本 skill。browser 默认由 Playwright 直接管理、不开放调试端口(需让其他本地工具附加时显式传 cdpport);headed 控制是否显示窗口,privatemode 保留用于兼容、不再改变默认行为,browserargs 传入额外的 Chromium 启动参数,executablepath 指定自定义浏览器可执行文件路径。.