# Tool Curl

> User-invoked skill tool-curl. A human runs it by name.

- Skill: `niksavis/tool-curl` (Agent Skill)
- Install (CLI): `npx skillmds@latest add niksavis/tool-curl`
- Raw SKILL.md: https://api.skillmd.com/api/skills/niksavis/tool-curl/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: niksavis (https://skillmd.com/u/niksavis)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/niksavis/tool-curl

---

<!-- Generated by `basicly skills-build` from skill.yaml. Do not edit; edit the source. -->

# tool-curl

## When To Use

- Run low-level HTTP diagnostics with explicit flags.
- Inspect response codes, headers, redirects, and payloads.
- Download artifacts in deterministic script-friendly ways.

## Trusted Commands

```bash
curl -fsSL https://example.com
curl -I https://example.com
curl -fsSLo output.bin https://example.com/file.bin
curl -fsS -w '%{http_code}\n' -o /dev/null https://example.com
curl -fsS -H 'Accept: application/json' https://example.com/api
curl -fsS -X POST -H 'Content-Type: application/json' -d '{"name":"demo"}' https://example.com/api
```

## Safe Defaults

- Use `-f` to fail on HTTP errors.
- Use `-sS` to reduce noise while preserving errors.
- Use `-L` when redirects are expected.

## Common Pitfalls

- Unquoted URLs with `?` or `&` can be mangled by the shell.
- Secrets can leak via verbose output or command history.
- Implicit content negotiation can cause confusing response formats.

## Output Interpretation

- Exit code `22` with `-f` indicates HTTP status >= 400.
- `-I` returns headers only for quick health checks.
- `-w` can emit status/metrics for script decisions.

## Why It Matters For Agents

- curl remains the most portable HTTP primitive across platforms.
- Precise flag control enables reliable debugging and automation.

## Repo Conventions

- Avoid adding network calls beyond stated task scope.
- Keep examples token-safe and never embed credentials.

## Trigger Examples

- Should trigger: "Check whether this endpoint returns a 302 redirect."
- Should trigger: "Download a release binary in a setup script."
- Should not trigger: "Search all Python files for a class name."

