Profiles API request latency with curl timing statistics, response-size analysis, gzip validation, and HTTP/2 checks to identify optimization targets.
Agentic Workflow: Read -> Reason -> Act (api-perf-specialist)
You are api-perf-specialist (backend) — a sub-agent that Reads, Reasons, and Acts via allowed-tools.
1. Read — backend context for api-perf-specialist
- Domain: Profiles API request latency with curl timing statistics, response-size analysis, gzip validation, and HTTP/2 checks to identify optimization targets.
- curl-profiling: Measure DNS, TCP, TLS, TTFB, and total time per request —
curl -w "dns:%{time_namelookup}s connect:%{time_connect}s tls:%{time_appconnect}
- bottleneck-identification: Compare endpoints and payloads to rank bottlenecks —
curl -s -o /dev/null -w '%{time_total}\n' http://localhost:8080/v1/items/1
- Check
knowledge and prerequisites: node.js, python, redis, k6
2. Reason — think for api-perf-specialist
- For
curl-profiling: Measure DNS, TCP, TLS, TTFB, and total time per request — decide which checks to run
- For
bottleneck-identification: Compare endpoints and payloads to rank bottlenecks — decide which checks to run
- Evaluate trust/policy:
kdesk trust + kdesk doctor patterns for your inputs
3. Act — execute with api-perf-specialist tools
- Tools:
Glob, Grep, Read, Bash (see frontmatter tools/allowed-tools)
- Use
safe_path for any write; record evidence (paths, checksums)
- Fingerprint:
api-perf-specialist:2a2dabd4
API Perf Specialist
Profiling API latency with curl.
What This Skill Does
- Measures every network phase of a request
- Compares endpoints, versions, and payload sizes
- Produces reproducible perf evidence for changes
When to Use
- Triaging slow-endpoint reports
- Comparing a fix before/after
- Building a baseline latency map of the API
Real Commands
curl -w "dns:%{time_namelookup}s connect:%{time_connect}s tls:%{time_appconnect}s ttfb:%{time_starttransfer}s total:%{time_total}s\n" -o /dev/null -s https://api.example.com/v1/items
Reading the Phases
- time_namelookup: DNS resolution
- time_connect: TCP handshake
- time_appconnect: TLS handshake
- time_starttransfer: server time to first byte
- time_total: end-to-end including body download
Testing
- Run 5-10 samples and take the median
- Test from multiple regions for network variance
- Compare gzip vs raw body sizes for payload wins
Best Practices
- Always use -o /dev/null to isolate server time
- Vary the query params to catch expensive filters
- Save curl -w outputs to a CSV for trend tracking
Capabilities
curl-profiling
Measure DNS, TCP, TLS, TTFB, and total time per request
Parameters:
write-out-format (string): curl -w format string with timing variables
url (string): Endpoint under test
headers (array): Extra headers like Accept-Encoding or Authorization
Commands:
curl -w "dns:%{time_namelookup}s connect:%{time_connect}s tls:%{time_appconnect}s ttfb:%{time_starttransfer}s total:%{time_total}s size:%{size_download}\n" -o /dev/null -s https://api.example.com/v1/items
curl -s -o /dev/null -w '%{http_code} %{time_total} %{speed_download} bytes/s\n' http://localhost:8080/
curl -s -H 'Accept-Encoding: gzip' -o /dev/null -w 'compressed:%{size_download} raw:%{size_download}_of_%{size_upload}\n' https://api.example.com/v1/items
curl -sI --http2 http://localhost:8080/ | head -1
curl -s -o /dev/null -w '%{time_starttransfer}\n' http://localhost:8080/v1/items?limit=1000
Examples:
- curl -w with time_appconnect isolates TLS handshake cost
- TTFB over total shows server processing vs transfer time
- gzip header comparison shows compression savings
bottleneck-identification
Compare endpoints and payloads to rank bottlenecks
Commands:
curl -s -o /dev/null -w '%{time_total}\n' http://localhost:8080/v1/items/1
curl -s -o /dev/null -w '%{time_total}\n' http://localhost:8080/v2/items/1
curl -s http://localhost:8080/v1/items | jq '.data | length'
curl -s http://localhost:8080/v1/items | wc -c
Examples:
References
1---2name: "api-perf-specialist"3description: "Profiles API request latency with curl timing statistics, response-size analysis, gzip validation, and HTTP/2 checks to identify optimization targets. Use when working with curl profiling, bottleneck identification or when the user mentions curl profiling, bottleneck identification."4license: "MIT"5compatibility: "Requires node.js, python, redis, k6, new-relic. Needs network access."6metadata:7 source: https://skillmd.com/skills/opknock/api-perf-specialist8 author: Kdesk9 version: 2.0.010 category: backend11allowed-tools: "Glob Grep Read Bash(curl:*)"12---1314Profiles API request latency with curl timing statistics, response-size analysis, gzip validation, and HTTP/2 checks to identify optimization targets.1516## Agentic Workflow: Read -> Reason -> Act (api-perf-specialist)1718You are **api-perf-specialist** (backend) — a sub-agent that **Reads, Reasons, and Acts** via `allowed-tools`.1920### 1. Read — backend context for `api-perf-specialist`21- Domain: Profiles API request latency with curl timing statistics, response-size analysis, gzip validation, and HTTP/2 checks to identify optimization targets.22- **curl-profiling**: Measure DNS, TCP, TLS, TTFB, and total time per request — `curl -w "dns:%{time_namelookup}s connect:%{time_connect}s tls:%{time_appconnect}`23- **bottleneck-identification**: Compare endpoints and payloads to rank bottlenecks — `curl -s -o /dev/null -w '%{time_total}\n' http://localhost:8080/v1/items/1`24- Check `knowledge` and `prerequisites: node.js, python, redis, k6`2526### 2. Reason — think for `api-perf-specialist`27- For `curl-profiling`: Measure DNS, TCP, TLS, TTFB, and total time per request — decide which checks to run28- For `bottleneck-identification`: Compare endpoints and payloads to rank bottlenecks — decide which checks to run29- Evaluate trust/policy: `kdesk trust` + `kdesk doctor` patterns for your inputs3031### 3. Act — execute with `api-perf-specialist` tools32- Tools: `Glob`, `Grep`, `Read`, `Bash` (see frontmatter `tools`/`allowed-tools`)33- Use `safe_path` for any write; record evidence (paths, checksums)34- Fingerprint: `api-perf-specialist:2a2dabd4`3536# API Perf Specialist3738Profiling API latency with curl.3940## What This Skill Does41- Measures every network phase of a request42- Compares endpoints, versions, and payload sizes43- Produces reproducible perf evidence for changes4445## When to Use46- Triaging slow-endpoint reports47- Comparing a fix before/after48- Building a baseline latency map of the API4950## Real Commands5152```bash53curl -w "dns:%{time_namelookup}s connect:%{time_connect}s tls:%{time_appconnect}s ttfb:%{time_starttransfer}s total:%{time_total}s\n" -o /dev/null -s https://api.example.com/v1/items54```5556## Reading the Phases57- time_namelookup: DNS resolution58- time_connect: TCP handshake59- time_appconnect: TLS handshake60- time_starttransfer: server time to first byte61- time_total: end-to-end including body download6263## Testing64- Run 5-10 samples and take the median65- Test from multiple regions for network variance66- Compare gzip vs raw body sizes for payload wins6768## Best Practices69- Always use -o /dev/null to isolate server time70- Vary the query params to catch expensive filters71- Save curl -w outputs to a CSV for trend tracking7273## Capabilities7475### curl-profiling76Measure DNS, TCP, TLS, TTFB, and total time per request7778**Parameters:**79- `write-out-format` (string): curl -w format string with timing variables80- `url` (string): Endpoint under test81- `headers` (array): Extra headers like Accept-Encoding or Authorization8283**Commands:**84- `curl -w "dns:%{time_namelookup}s connect:%{time_connect}s tls:%{time_appconnect}s ttfb:%{time_starttransfer}s total:%{time_total}s size:%{size_download}\n" -o /dev/null -s https://api.example.com/v1/items`85- `curl -s -o /dev/null -w '%{http_code} %{time_total} %{speed_download} bytes/s\n' http://localhost:8080/`86- `curl -s -H 'Accept-Encoding: gzip' -o /dev/null -w 'compressed:%{size_download} raw:%{size_download}_of_%{size_upload}\n' https://api.example.com/v1/items`87- `curl -sI --http2 http://localhost:8080/ | head -1`88- `curl -s -o /dev/null -w '%{time_starttransfer}\n' http://localhost:8080/v1/items?limit=1000`8990**Examples:**91- curl -w with time_appconnect isolates TLS handshake cost92- TTFB over total shows server processing vs transfer time93- gzip header comparison shows compression savings9495### bottleneck-identification96Compare endpoints and payloads to rank bottlenecks9798**Commands:**99- `curl -s -o /dev/null -w '%{time_total}\n' http://localhost:8080/v1/items/1`100- `curl -s -o /dev/null -w '%{time_total}\n' http://localhost:8080/v2/items/1`101- `curl -s http://localhost:8080/v1/items | jq '.data | length'`102- `curl -s http://localhost:8080/v1/items | wc -c`103104**Examples:**105- -cli --help106- -api --help107108## References109- [curl -w Variables](https://curl.se/docs/manpage.html#-w)110- [WebPageTest Docs](https://docs.webpagetest.org/)