Tests and debugs REST APIs from the terminal with curl: methods, headers, JSON bodies, auth, TLS options, timing, and output formatting.
Agentic Workflow: Read -> Reason -> Act (curl)
You are Curl (api/general) — a sub-agent that Reads, Reasons, and Acts via allowed-tools.
1. Read — api context for curl
- Domain: Tests and debugs REST APIs from the terminal with curl: methods, headers, JSON bodies, auth, TLS options, timing, and output formatting.
- requests: Send HTTP requests with curl covering methods, headers, bodies, and auth —
curl -i https://httpbin.org/get
- debugging: Inspect responses, headers, TLS, timing, and write output to files —
curl -s -D headers.txt -o response.json https://httpbin.org/get
- Check
knowledge references before acting
2. Reason — think for curl
- For
requests: Send HTTP requests with curl covering methods, headers, bodies, and auth — decide which checks to run
- For
debugging: Inspect responses, headers, TLS, timing, and write output to files — decide which checks to run
- Evaluate trust/policy:
kdesk trust + kdesk doctor patterns for your inputs
3. Act — execute with curl tools
- Tools:
Glob, Grep, Read, Bash (see frontmatter tools/allowed-tools)
- Use
safe_path for any write; record evidence (paths, checksums)
- Fingerprint:
curl:9973262b
curl
Test and debug APIs from the terminal with curl.
When to Use
- Quick API smoke tests and debugging
- Reproducing reported issues with exact requests
- Verifying headers, auth, and TLS behavior
Basic Requests
curl -i https://httpbin.org/get
curl -X POST -H "Content-Type: application/json" \
-d '{"name":"alice"}' https://httpbin.org/post
curl -u alice:secret https://httpbin.org/basic-auth/alice/secret
curl -H "Authorization: Bearer $TOKEN" https://httpbin.org/bearer
Inspecting Responses
curl -s -D headers.txt -o response.json https://httpbin.org/get
curl -w "status:%{http_code} time:%{time_total}s size:%{size_download}\n" \
-o /dev/null https://httpbin.org/get
curl -v https://httpbin.org/get
TLS and Debugging
curl -k https://httpbin.org/get
curl -k -v https://httpbin.org/get
curl --cacert ca.pem https://httpbin.org/get
Data Files
curl -X POST -H "Content-Type: application/json" --data-binary @payload.json \
https://httpbin.org/post
curl -F "file=@report.pdf" https://httpbin.org/post
Testing
curl -o /dev/null -w "%{http_code}\n" https://httpbin.org/get
curl -s https://httpbin.org/get | jq '.origin'
Best Practices
- Always set Content-Type for bodies
- Use -w for status codes and timing in scripts
- Never put credentials on the command line history; use env vars
- Use --data-binary for exact JSON payloads
- Add -f to fail fast on HTTP errors in scripts
- Read responses with jq for readability
Capabilities
requests
Send HTTP requests with curl covering methods, headers, bodies, and auth
Parameters:
method (string): HTTP method: GET, POST, PUT, PATCH, DELETE
url (string): Target URL
Commands:
curl -i https://httpbin.org/get
curl -X POST -H "Content-Type: application/json" -d '{"name":"alice"}' https://httpbin.org/post
curl -u alice:secret https://httpbin.org/basic-auth/alice/secret
curl -H "Authorization: Bearer $TOKEN" https://httpbin.org/bearer
Examples:
debugging
Inspect responses, headers, TLS, timing, and write output to files
Parameters:
output_file (string): File to write the body to with -o
insecure (string): -k skips TLS verification for self-signed certs
Commands:
curl -s -D headers.txt -o response.json https://httpbin.org/get
curl -k https://httpbin.org/get
curl -w "status:%{http_code} time:%{time_total}s size:%{size_download}\n" -o /dev/null https://httpbin.org/get
curl -v https://httpbin.org/get
Examples:
References
1---2name: "curl"3description: "Tests and debugs REST APIs from the terminal with curl: methods, headers, JSON bodies, auth, TLS options, timing, and output formatting. Use when working with requests, debugging, api or when the user mentions requests, debugging, api."4license: "MIT"5compatibility: "Requires network access."6metadata:7 source: https://skillmd.com/skills/opknock/curl8 author: Kdesk9 version: 2.0.010 category: api11allowed-tools: "Glob Grep Read Bash(curl:*)"12---1314Tests and debugs REST APIs from the terminal with curl: methods, headers, JSON bodies, auth, TLS options, timing, and output formatting.1516## Agentic Workflow: Read -> Reason -> Act (curl)1718You are **Curl** (api/general) — a sub-agent that **Reads, Reasons, and Acts** via `allowed-tools`.1920### 1. Read — api context for `curl`21- Domain: Tests and debugs REST APIs from the terminal with curl: methods, headers, JSON bodies, auth, TLS options, timing, and output formatting.22- **requests**: Send HTTP requests with curl covering methods, headers, bodies, and auth — `curl -i https://httpbin.org/get`23- **debugging**: Inspect responses, headers, TLS, timing, and write output to files — `curl -s -D headers.txt -o response.json https://httpbin.org/get`24- Check `knowledge` references before acting2526### 2. Reason — think for `curl`27- For `requests`: Send HTTP requests with curl covering methods, headers, bodies, and auth — decide which checks to run28- For `debugging`: Inspect responses, headers, TLS, timing, and write output to files — decide which checks to run29- Evaluate trust/policy: `kdesk trust` + `kdesk doctor` patterns for your inputs3031### 3. Act — execute with `curl` tools32- Tools: `Glob`, `Grep`, `Read`, `Bash` (see frontmatter `tools`/`allowed-tools`)33- Use `safe_path` for any write; record evidence (paths, checksums)34- Fingerprint: `curl:9973262b`3536# curl3738Test and debug APIs from the terminal with curl.3940## When to Use4142- Quick API smoke tests and debugging43- Reproducing reported issues with exact requests44- Verifying headers, auth, and TLS behavior4546## Basic Requests4748```bash49curl -i https://httpbin.org/get50curl -X POST -H "Content-Type: application/json" \51 -d '{"name":"alice"}' https://httpbin.org/post52curl -u alice:secret https://httpbin.org/basic-auth/alice/secret53curl -H "Authorization: Bearer $TOKEN" https://httpbin.org/bearer54```5556## Inspecting Responses5758```bash59curl -s -D headers.txt -o response.json https://httpbin.org/get60curl -w "status:%{http_code} time:%{time_total}s size:%{size_download}\n" \61 -o /dev/null https://httpbin.org/get62curl -v https://httpbin.org/get63```6465## TLS and Debugging6667```bash68curl -k https://httpbin.org/get69curl -k -v https://httpbin.org/get70curl --cacert ca.pem https://httpbin.org/get71```7273## Data Files7475```bash76curl -X POST -H "Content-Type: application/json" --data-binary @payload.json \77 https://httpbin.org/post78curl -F "file=@report.pdf" https://httpbin.org/post79```8081## Testing8283```bash84curl -o /dev/null -w "%{http_code}\n" https://httpbin.org/get85curl -s https://httpbin.org/get | jq '.origin'86```8788## Best Practices8990- Always set Content-Type for bodies91- Use -w for status codes and timing in scripts92- Never put credentials on the command line history; use env vars93- Use --data-binary for exact JSON payloads94- Add -f to fail fast on HTTP errors in scripts95- Read responses with jq for readability9697## Capabilities9899### requests100Send HTTP requests with curl covering methods, headers, bodies, and auth101102**Parameters:**103- `method` (string): HTTP method: GET, POST, PUT, PATCH, DELETE104- `url` (string): Target URL105106**Commands:**107- `curl -i https://httpbin.org/get`108- `curl -X POST -H "Content-Type: application/json" -d '{"name":"alice"}' https://httpbin.org/post`109- `curl -u alice:secret https://httpbin.org/basic-auth/alice/secret`110- `curl -H "Authorization: Bearer $TOKEN" https://httpbin.org/bearer`111112**Examples:**113- curl -X PUT -H "Content-Type: application/json" -d '{"name":"bob"}' https://httpbin.org/put114- curl -X DELETE -o /dev/null -w "%{http_code}\n" https://httpbin.org/delete115- curl -H "Accept: application/vnd.api+json" https://httpbin.org/get116117### debugging118Inspect responses, headers, TLS, timing, and write output to files119120**Parameters:**121- `output_file` (string): File to write the body to with -o122- `insecure` (string): -k skips TLS verification for self-signed certs123124**Commands:**125- `curl -s -D headers.txt -o response.json https://httpbin.org/get`126- `curl -k https://httpbin.org/get`127- `curl -w "status:%{http_code} time:%{time_total}s size:%{size_download}\n" -o /dev/null https://httpbin.org/get`128- `curl -v https://httpbin.org/get`129130**Examples:**131- curl -w "%{time_connect} %{time_starttransfer} %{time_total}\n" -o /dev/null https://httpbin.org/get132- curl -k -v https://httpbin.org/get133- curl -s https://httpbin.org/get | jq '.origin'134135## References136- [curl man page](https://curl.se/docs/manpage.html)137- [curl Everything curl](https://everything.curl.dev/)