agentleFS
lordmaculordmacu/nexo-rs/skills/fetch-url/SKILL.md

Fetch URL

Skill8 starsChanged 7 months agoApache-2.0View on GitHub

HTTP GET/POST utility with size cap, SSRF guard, retries, and circuit breaker.

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 4 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this skill to download remote HTTP(S) content — raw API calls, web pages, JSON endpoints, small files — safely.

    line 11
  2. Distinctive:

    Check a public HTTP endpoint (status + headers)

    line 21
  3. Distinctive:

    No arguments. Returns limits, policy, default timeout, user-agent.

    line 36
  4. Distinctive:

    Default timeout (15s) is fine for APIs.

    line 57
  5. Very specific:

    If status is 4xx (-32002 error), the body preview is in the error message — read it before retrying.

    line 59
  6. Very specific:

    If status is 5xx (-32003), retries already exhausted inside the extension.

    line 61

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Fetch URL

Use this skill to download remote HTTP(S) content — raw API calls, web pages, JSON endpoints, small files — safely. Private and metadata hosts are blocked by default to prevent SSRF.

Use when

  • "Fetch this URL"
  • "What does this API return?"
  • Pipeline: fetch → pdf-extract → summarize_text
  • Fetch a webhook payload or a small data file
  • Check a public HTTP endpoint (status + headers)

Do not use when

  • Downloading binaries/archives > 50 MB (hard cap; the LLM context can't hold them anyway)
  • Long-poll / streaming / SSE / WebSocket — this is one-shot request/response
  • Authenticated APIs with complex OAuth flows — use a purpose-built extension (github, whisper, summarize) that owns the auth
  • Calling internal services — set allow_private: true only on explicitly trusted operator calls

Tools

status

No arguments. Returns limits, policy, default timeout, user-agent.

fetch_url

  • url (string, required) — http:// or https:// only
  • method (string, optional) — GET/POST/PUT/DELETE/HEAD/PATCH/OPTIONS (default GET)
  • headers (object, optional) — {"content-type": "application/json", ...}
  • body (string, optional) — request body as raw string; caller sets Content-Type
  • max_bytes (integer, optional) — response cap. Default 5 MB, hard max 50 MB
  • timeout_secs (integer, optional) — per-request timeout. Default 15s, max 120s
  • allow_private (boolean, optional) — override SSRF guard. Default false

Returns {status, final_url, headers, content_type, truncated, bytes_read, body_text?, body_base64?}.

body_text is set for text-like content-types (text/*, json, xml, yaml, javascript) if UTF-8 decodable. Otherwise body_base64 is set and body_text is null.

Execution guidance

  • Start with a small max_bytes (e.g. 100 000) when probing an unknown endpoint — you can always retry with a larger cap.
  • Default timeout (15s) is fine for APIs; bump to 60–120s only for large files.
  • If status is 4xx (-32002 error), the body preview is in the error message — read it before retrying.
  • If status is 5xx (-32003), retries already exhausted inside the extension; do not retry from the LLM side — back off instead.
  • blocked_host error (-32020) → the URL points to a private IP / loopback / metadata endpoint. Do not pass allow_private=true unless the operator explicitly asked to hit an internal service.
  • truncated: true means the body was cut at max_bytes. Warn the user or re-fetch with a bigger cap if needed.
  • For multi-step fetch-and-process, wrap the chain in TaskFlow so a restart doesn't re-fetch.

Common pipelines

URL → summary

1. fetch_url { url, max_bytes: 50000 }
2. summarize_text { text: body_text, length: "medium" }

URL → PDF → summary

1. fetch_url { url: "https://.../doc.pdf", max_bytes: 5000000 }
2. (operator saves body_base64 to /tmp/doc.pdf)
3. pdf-extract.extract_text { path: "/tmp/doc.pdf", max_chars: 50000 }
4. summarize_text { text, length: "long" }

(Auto-saving to disk from inside the LLM is not yet supported — a future extension fetch_url_save could do that safely.)

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.