Skip to content

charlieviettq/awesome-agent-skill / .claude/skills/serverless-debugging

serverless-debugging

Verified

Debug serverless and edge functions—limited logs, cold starts, timeouts, env/config mismatches. Use for Lambda, Cloud Functions, Workers, Vercel/Netlify functions.

Serverless Debugging

Systematic debugging when traditional server logs and SSH are unavailable. Complements test-failure-triage with environment-specific constraints.

When to use

  • Intermittent 5xx from functions
  • Timeout or memory limit errors
  • Works locally but fails when deployed

When not to use

  • Long-running container services with full shell access
  • Client-only bugs (use browser DevTools skills)

Workflow

  1. Reproduce — identify trigger (HTTP event, queue, schedule)
  2. Logs — cloud provider log group/stream; filter by request ID
  3. Config — compare env vars/secrets: local vs deployed (names only, never log values)
  4. Limits — timeout, memory, payload size, concurrency
  5. Cold start — init duration, heavy imports, VPC ENI delay
  6. Dependencies — outbound network, IAM permissions, region mismatch
  7. Minimal fix — smallest change; redeploy; verify with structured log line

Common failure modes

SymptomLikely cause
Task timed outSlow downstream, missing async, too much work in handler
Cannot find moduleBundle/packaging; wrong runtime
Access deniedIAM role, resource policy
Connection timeoutVPC/subnet/NAT; wrong security group
Works once then failsState in /tmp; connection pool reuse

Practices

  • Structured JSON logs with requestId, stage, durationMs
  • Fail fast on missing required env with clear error message (no secret values)
  • Use X-Ray or vendor tracing for cross-service calls
  • Keep handlers thin; push heavy work to async queues when needed
finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the workStars: 319kUpdated Claude CodeCodexVerifiedInstall
systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixesStars: 319kUpdated Claude CodeCodexVerifiedInstall
test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation codeStars: 319kUpdated Claude CodeCodexVerifiedInstall
skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.Stars: 196kUpdated Claude CodeCodexVerifiedInstall