一键导入
curl-api
Make HTTP API requests with curl. Use when calling REST APIs, making HTTP requests, testing endpoints, or working with web services via curl.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Make HTTP API requests with curl. Use when calling REST APIs, making HTTP requests, testing endpoints, or working with web services via curl.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use when needing to fetch, read, store, or manage secrets and credentials. Triggers on "get secret", "fetch password", "store credential", "1password", "op read", "vault", or when a task requires API keys, tokens, or passwords that might be in 1Password.
Manage Cloudflare via API — DNS records, tunnels, Pages, zones. This skill should be used when creating or updating DNS records, managing Cloudflare tunnels, deploying to Cloudflare Pages, listing zones, or any Cloudflare API interaction. Triggers on "cloudflare", "DNS record", "tunnel", "cloudflare pages", "CNAME", "zone".
Create a new Claude Code skill from scratch. Use when the user asks to "create a skill", "make a skill", "new skill", "build a skill", "/create-skill", or says something like "create a skill for that" referencing something in the conversation.
Deploy applications to the Hetzner k3s server. This skill should be used when deploying to k3s, creating k8s manifests, setting up cloudflared tunnels, writing deploy scripts, creating GitHub Actions deploy workflows, managing k8s secrets, or writing rollback scripts. Triggers on "deploy to hetzner", "k3s", "k8s manifest", "cloudflared", "deploy script", "rollback script".
Create a project-specific start-work skill for a meta-repo workspace. Scaffolds the full development lifecycle from issue to PR. Use when the user asks to "create start-work", "set up start-work", "add start-work skill", or wants to set up a development workflow for a meta-repo.
Create a new Claude Code custom agent (subagent). Use when the user asks to "create an agent", "make an agent", "new agent", "build an agent", "create a subagent", "/create-agent", or says something like "create an agent for that" referencing something in the conversation.
| name | curl-api |
| description | Make HTTP API requests with curl. Use when calling REST APIs, making HTTP requests, testing endpoints, or working with web services via curl. |
Guidelines for making curl requests that work reliably in Claude Code's shell environment.
NEVER use backslash line continuations (\) - They don't work reliably in this environment.
ALWAYS write single-line commands or use shell variables for complex requests.
curl -s https://api.example.com/endpoint | jq
curl -s -H "Authorization: Bearer $TOKEN" https://api.example.com/endpoint | jq
Use multiple -d flags on a single line:
curl -s -X POST https://api.example.com/endpoint -H "Authorization: Bearer $TOKEN" -d "name=value" -d "other=data" | jq
curl -s -X POST https://api.example.com/endpoint -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" -d '{"key":"value"}' | jq
When commands get long, use variables:
TOKEN="your_api_key_here"
BASE="https://api.example.com"
# Then use them
curl -s -X POST "$BASE/products" -H "Authorization: Bearer $TOKEN" -d "name=Test" | jq
Store IDs from responses:
TOKEN="your_key"
# Create and capture ID
PRODUCT_ID=$(curl -s -X POST https://api.stripe.com/v1/products -H "Authorization: Bearer $TOKEN" -d "name=My Product" | jq -r '.id')
echo "Created: $PRODUCT_ID"
# Use ID in next request
curl -s -X POST https://api.stripe.com/v1/prices -H "Authorization: Bearer $TOKEN" -d "product=$PRODUCT_ID" -d "unit_amount=999" -d "currency=usd" | jq
| Purpose | Flag |
|---|---|
| Bearer Auth | -H "Authorization: Bearer $TOKEN" |
| Basic Auth | -u "user:pass" or -u "$KEY:" (colon for password-less) |
| JSON Content | -H "Content-Type: application/json" |
| Accept JSON | -H "Accept: application/json" |
| Flag | Purpose |
|---|---|
-s | Silent mode (no progress) |
-X POST | HTTP method |
-d "k=v" | Form data (multiple allowed) |
-H "..." | Header (multiple allowed) |
-o file | Output to file |
-w '%{http_code}' | Print status code |
# BAD - Line continuations break
curl -s \
-X POST \
-H "Auth: Bearer $TOKEN" \
https://api.example.com
# GOOD - Single line
curl -s -X POST -H "Auth: Bearer $TOKEN" https://api.example.com
SK="sk_test_your_key"
# Create product
PROD=$(curl -s -X POST https://api.stripe.com/v1/products -H "Authorization: Bearer $SK" -d "name=My Product" -d "description=A great product" | jq -r '.id')
# Create price for product
PRICE=$(curl -s -X POST https://api.stripe.com/v1/prices -H "Authorization: Bearer $SK" -d "product=$PROD" -d "unit_amount=999" -d "currency=eur" -d "recurring[interval]=month" | jq -r '.id')
echo "Product: $PROD, Price: $PRICE"