home / skills / trpc-group / trpc-agent-go / http_get

http_get skill

/openclaw/skills/http_get

This skill fetches a URL using curl and saves the response to out/, enabling automated data retrieval for workflows.

npx playbooks add skill trpc-group/trpc-agent-go --skill http_get

Review the files below or copy the command above to add this skill to your agents.

Files (2)
SKILL.md
348 B
---
name: http_get
description: Fetch a URL with curl and write it to out/.
metadata:
  { "openclaw": { "requires": { "bins": ["bash", "curl"] } } }
---

Overview

This skill fetches a URL using `curl` and writes the response body to `out/`.

Command

bash scripts/http_get.sh https://example.com out/example.html

Output Files

- out/example.html

Overview

This skill fetches a URL using curl and writes the response body to the out/ directory. It runs a simple shell command to retrieve the resource and saves it as a file you specify. Use it when you need a reproducible, scriptable way to download web content within an agent workflow.

How this skill works

The skill executes a bash script that invokes curl with the provided URL and target path. The HTTP response body is written to out/<filename> while preserving basic curl behavior (redirects, status codes, etc.). The script returns the downloaded file path so calling code can read or process the saved content.

When to use it

  • Quickly download a webpage or raw resource for processing
  • Capture HTML or text output for offline analysis or parsing
  • Integrate into pipelines that need a local copy of a URL resource
  • Automate retrieval of assets before running downstream tools
  • Test agent integrations that require fetching external content

Best practices

  • Provide a clear filename under out/ to avoid collisions and to make outputs predictable
  • Validate the URL before calling the script to avoid unnecessary network calls
  • Check curl exit codes and HTTP status in downstream logic to handle failures gracefully
  • Sanitize or limit file sizes if fetching untrusted sources to avoid disk exhaustion
  • Use network and timeout controls (via curl options) for robust automation

Example use cases

  • Download a webpage and run an HTML parser on out/example.html
  • Fetch a JSON endpoint and pass the saved file to a validator or transformer
  • Automate pre-processing in an agent pipeline that needs external content
  • Retrieve remote training examples or prompts for offline model evaluation
  • Quickly capture a resource for debugging an integration

FAQ

What command does the skill run?

It runs a bash script which calls curl with the given URL and writes the response body to the specified path in out/.

How do I specify the output file?

Pass the desired output path under out/ as the second argument, for example: bash scripts/http_get.sh https://example.com out/example.html