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/surfmind-space/awesome-surfmind/api-to-examplenpx skills add surfmind-space/awesome-surfmind --skill api-to-examplegit clone --depth 1 https://github.com/surfmind-space/awesome-surfmindWrote 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.
[](https://agentmods.dev/skills/surfmind-space/awesome-surfmind/api-to-example)<a href="https://agentmods.dev/skills/surfmind-space/awesome-surfmind/api-to-example"><img src="https://agentmods.dev/badge/skills/surfmind-space/awesome-surfmind/api-to-example.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00075 | $0.00607 |
| Opus 5 | $0.00037 | $0.00303 |
| Sonnet 5 | $0.00015 | $0.00121 |
| Haiku 4.5 | $0.00007 | $0.00061 |
Grade A, and why
api-to-example scanned grade A with 1 finding 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 4d 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.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
description: Turns REST API documentation into a runnable curl, fetch, or code example with required headers, request body, and placeholders for secrets. Use when the user wants to generate a request from API docs, an en How it starts
The opening of the file, as written. The whole thing — 45 lines — stays where its author put it; the contents beside it link to each section on GitHub.
API to Example
Turn the documented API endpoint into the smallest runnable example the user can paste and run — curl, fetch, or a language-specific snippet — complete with the required headers, request body shape, and placeholders for every secret. Work only from what the docs show; don't invent undocumented fields or claim a parameter is required when the docs don't say so.
- Extract the endpoint, method, auth scheme, required headers, parameters, request body schema, and the success response shape from the visible docs or OpenAPI/Swagger spec.
- Build the minimal example that would actually succeed, using placeholders like
$API_KEYor<account-id>for secrets and private values. - Verify the example carries every required header and parameter the docs list before presenting it; note any required field the docs leave unspecified.
- Add the expected response and the one or two errors a caller is most likely to hit (bad auth, missing field).
Return concise headings and include these sections when they fit: Runnable example, Required inputs, Expected response, Common mistakes. Preserve exact endpoint paths, header names, and field names. Be specific but don't overclaim; never include real secrets, and if the docs are incomplete, say what's missing and give the best supported example. Respond in the same language as the user's request.
Example
Docs (an endpoint that creates a charge):
POST /v1/charges— requiresAuthorization: Bearer <key>. Body:amount(integer, required),currency(string, required),description(string, optional).
Example:
Runnable example (curl):
curl https://api.example.com/v1/charges \ -H "Authorization: Bearer $API_KEY" \ -H "Content-Type: application/json" \ -d '{"amount": 2000, "currency": "usd", "description": "Test charge"}'Required inputs:
$API_KEY(secret bearer token);amountin the smallest currency unit; a supportedcurrencycode.Expected response:
200with the created charge object, including itsidandstatus.Common mistakes: Omitting
Content-Type: application/json(the body is ignored); sendingamountas a decimal instead of an integer; a stale key returns401.
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.
- 4d ago First seen · 45 lines · 75 tokens per session scan A d5a4a59af9a0
api-to-example is a skill published in the GitHub repository surfmind-space/awesome-surfmind (5 stars, last pushed 1mo ago), licensed MIT. It adds 75 tokens to every session and 607 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 1 finding (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
cs-master
Expert computer scientist for algorithms, complexity analysis, and distributed systems.
uiux-master
UI/UX expert for design systems, accessibility, and avoiding generic AI-generated design patterns.
c-master
C programming expert for memory management, systems programming, and performance optimization.
data-science
ML engineering expert for feature engineering, model debugging, and production pipelines.
go-master
Go expert for goroutines, channels, microservices, and concurrent patterns.
network-devops
Network performance expert for latency optimization, packet analysis, and infrastructure tuning.