curl
Files
SKILL.mdagentsreferencesscripts
Install
Install the containing plugin
/plugin install shared-skills@llm-skills
Invoke this skill after installation
/shared-skills:curl
This skill is bundled inside shared-skills. Install the plugin once, then Claude Code can use any of its included skills. Browse the full plugin repository at github.com/alisonaquinas/llm-shared-skills.
SKILL.md
name: curl description: > Transfer data with URL syntax using curl for HTTP requests, API calls, downloads, uploads, headers, authentication, redirects, and response inspection. Use when the agent needs to fetch an endpoint, send JSON or form data, inspect HTTP status and headers, download a file with precise request control, or troubleshoot TLS, proxy, and redirect behavior from the command line.
curl
Transfer data with URL syntax for HTTP, HTTPS, and related protocols.
Quick Start
- Verify
curlis available:curl --version - Establish the command surface:
curl --helporman curl - Start with a safe probe:
curl --head --fail --location https://example.com
Intent Router
Load only the reference file needed for the active request.
references/install-and-setup.md— Installing curl, checking versions, CA store, and proxy basicsreferences/cheatsheet.md— Common flags, GET and POST requests, headers, output capture, and status extractionreferences/advanced-usage.md— Multipart uploads, auth flows, retries, resume, proxies, APIs, and structured response outputreferences/troubleshooting.md— DNS, TLS, redirect, quoting, proxy, timeout, and HTTP failure recovery
Core Workflow
- Verify the installed build and TLS backend:
curl --version - Inspect the target safely first with
--heador a simple GET before sending data - Add request details explicitly:
--request,--header,--data,--user,--location - Fail clearly on HTTP errors with
--failor--fail-with-body - Separate body, headers, and status output intentionally with
--output,--dump-header, and--write-out
Quick Workflows
Read-only endpoint check
curl --head --fail --location https://example.com
JSON API request
curl --fail-with-body --location --request POST \
--header "Content-Type: application/json" \
--data '{"name":"demo"}' \
https://example.com/api/items
File download with explicit output
curl --fail --location --output artifact.zip https://example.com/download/artifact.zip
Quick Command Reference
curl --version
curl --head --fail --location https://example.com
curl --fail --location https://example.com/api/items
curl --fail --location --header "Accept: application/json" https://example.com/api/items
curl --fail-with-body --location --request POST \
--header "Content-Type: application/json" \
--data '{"name":"demo"}' \
https://example.com/api/items
curl --fail --location --output artifact.zip https://example.com/download/artifact.zip
curl --silent --show-error --output response.json \
--write-out "%{http_code}\n" \
https://example.com/api/items
curl --fail --location --user "$API_USER:$API_PASS" https://example.com/api/secure
man curl
Safety Notes
| Area | Guardrail |
|---|---|
| Initial probe | Start with --head or a read-only GET before mutating requests or large downloads. |
| HTTP failures | Prefer --fail or --fail-with-body so scripts stop on 4xx and 5xx responses. |
| Redirects | Add --location only when redirect following is intended; unexpected redirects can hide the true target. |
| Secrets | Avoid inline credentials when shell history, process listings, or logs are exposed. Prefer environment variables, netrc, config files, or prompting. |
| TLS verification | Keep certificate verification enabled. Use --insecure only for a temporary diagnostic step and remove it after identifying the issue. |
| Output paths | Set --output explicitly for files to avoid mixing binary payloads into terminal logs or pipelines. |
| Request bodies | Confirm method, content type, and payload before sending writes to production services. |
| Structured output | Use --write-out and --dump-header to separate status and headers from the body for reliable automation. |
Scope Boundary
This skill does not cover full-site mirroring or recursive crawling. Use wget for those workflows.
Source Policy
- Treat the installed
curlbehavior andcurl --helporman curlas runtime truth. - Use the local build output from
curl --versionto confirm TLS backend and supported protocols. - Validate advanced flags against the official curl manual before documenting them.
- Prefer explicit flags over shorthand when documenting reproducible request behavior.
Resource Index
scripts/install.sh— Install curl on macOS or Linux.scripts/install.ps1— Install curl on Windows or any platform via PowerShell.