agentleFS
reatlatreatlat/fullstory-claude-plugin/skills/api-monitor/SKILL.md

api-monitor

Skill36 starsChanged 17 days agoMITView on GitHub

Monitor API call patterns from session data — endpoint latency, error rates, popular endpoints, and API-driven UX issues. Use when investigating backend performance impact on UX, API errors affecting users, or endpoint usage patterns.

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Check: do slow API calls correlate with:

    line 70
  2. Distinctive:

    After any backend deploy, run this skill against the changed endpoints.

    line 130

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

API Monitor

Monitor API calls that affect user experience — which endpoints are slow, which are erroring, and how API failures manifest in the UI.

When to Use

  • "Are our API calls causing user-facing slowness?"
  • "Which endpoints are returning the most errors?"
  • "Did the backend deploy slow down the checkout API?"
  • "Show me sessions where /api/orders failed"
  • "What's the slowest API call users experience on /dashboard?"
  • "Compare API error rates before and after the backend deploy"

Mental Model

Fullstory captures network requests made by the browser — XHR and Fetch calls. You can see which endpoints users hit, how long they took, and which ones failed. This gives you the user's perspective on API performance, which is different from server-side metrics.

A slow API is invisible server-side but very visible to users: spinners, blank pages, rage clicks on submit buttons.

Workflow

Step 1: Identify API-heavy pages

Which pages make the most API calls?

fullstory:build_metric(
  query="sessions with network activity on /dashboard",
  output_type="trend"
)

Or build segments for pages known to be API-heavy: /checkout, /dashboard, /search, /reports.

Step 2: Find API errors from user sessions

fullstory:build_metric(
  query="network errors (4xx or 5xx responses) on /checkout",
  output_type="top_n"
)
→ group by endpoint to see which API is failing

Present: "504 on /api/orders: 156 users affected (85% of all checkout API errors). 429 on /api/search: 42 users (rate limited)."

Step 3: Investigate error sessions

For the worst endpoint:

fullstory:build_segment("users who received 504 from /api/orders in last 7 days")
fullstory:get_sessions(segment_id, limit=5)
→ session-context agent: "What happened after the 504 error? Did the user retry? See an error message? Abandon the page?"

Step 4: Measure API latency impact

Slow APIs (not errors, but >2s response time) cause UX friction:

fullstory:build_metric(
  query="sessions with network request >2000ms on /checkout",
  output_type="single_number"
)

Check: do slow API calls correlate with:

  • Higher bounce rate?
  • More rage clicks?
  • Lower conversion?

"Users who experienced a slow /api/orders call (>2s) had a 12% conversion rate vs 24% for users with fast calls. The slow API is literally halving checkout conversion."

Step 5: Compare before/after deploys

fullstory:build_metric(query="/api/orders errors", output_type="trend")
fullstory:compute_metric(metric_id, time_range="last_14_days")
→ look for an inflection point at the backend deploy timestamp

Step 6: Report

## API Health — /checkout (last 7 days)

### Error Rates
- /api/orders: 3.2% error rate (504 Gateway Timeout) — 156 users affected 🔴
- /api/payment-methods: 0.1% error rate ✅
- /api/promo/validate: 0.8% error rate (400 Bad Request) 🟡

### Latency
- /api/orders: avg 1.2s, p95 3.8s 🔴
- /api/payment-methods: avg 0.3s ✅
- /api/promo/validate: avg 0.6s ✅

### User Impact
- 504 errors concentrated 7-9 PM ET (peak hours)
- Users who hit a 504: 12% conversion rate (vs 24% for users who didn't)
- Session evidence: users see "Try again" toast, retry once, then abandon

### Correlation
- 504 spike started July 15 — same day as backend deploy v3.1.0

### Recommendations
1. Investigate /api/orders timeout under peak load (P0 — revenue impact)
2. Add retry logic with exponential backoff on the frontend
3. Consider async order submission so 504 doesn't block checkout

API Health Heuristics

MetricHealthyWarningCritical
Error rate<0.5%0.5-2%>2%
p95 latency<1s1-3s>3s
Timeout rate<0.1%0.1-1%>1%
Affected users<10/day10-50/day>50/day

Guidelines

  • Fullstory captures network requests from the browser, not server-side metrics. You see what the user experiences, not what the server measures. They can differ.
  • A 504 error server-side might be a blip. A 504 error user-side means the user saw a failure. Report from the user's perspective.
  • Cross-reference API errors with frustration-hunter — are users rage-clicking submit buttons after API failures?
  • Network capture must be enabled for API monitoring to work. If network requests aren't showing up, check recording block rules (some orgs block API calls for privacy).
  • Slow-but-successful API calls (>2s) are silent UX killers. They don't trigger error tracking but they frustrate users and lower conversion.
  • After any backend deploy, run this skill against the changed endpoints. API regressions are the #1 deploy-caused issue.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.