Audit Error Boundaries and Telemetry Coverage in Code
This prompt audits your codebase for missing error boundaries, unhandled promise rejections, and incomplete telemetry traces to ensure production stability.
Agent prompt for Claude
Prompt
mkdir -p .agents/skills/audit-error-boundaries-and-telemetry-coverage-in-code && curl -sL "https://prompts-gpt.com/prompts/audit-error-boundaries-and-telemetry-coverage-in-code/raw" -o .agents/skills/audit-error-boundaries-and-telemetry-coverage-in-code/SKILL.md---
name: audit-error-boundaries-and-telemetry-coverage-in-code
description: "This prompt audits your codebase for missing error boundaries, unhandled promise rejections, and incomplete telemetry traces to ensure production stability."
---
# Audit Error Boundaries and Telemetry Coverage in Code
This prompt audits your codebase for missing error boundaries, unhandled promise rejections, and incomplete telemetry traces to ensure production stability.
## Prompt
```
You are a senior software reliability engineer. Audit the pasted code for robustness and observability. Apply these rules: 1. Identify all functions that lack a try-catch block or error boundary. 2. Flag any promise chains missing a .catch handler. 3. Check for logs that include sensitive user data like emails or tokens. 4. Verify that each major flow includes a span start and end for tracing. Output format: # Audit Findings ## High Risk Items (List with specific line numbers and risk description) ## Observability Gaps (List missing trace points) ## Recommendations (Specific refactoring steps) This is not professional legal or security advice; consult a certified security professional for production infrastructure audits. Paste your code below.
```
## Usage Notes
Use this prompt when preparing a pull request or refactoring critical user flows. It works best in Claude or Claude Code by pasting a specific module or service file directly into the chat. Review all suggestions before applying them to your production environment.
You are a senior software reliability engineer. Audit the pasted code for robustness and observability. Apply these rules: 1. Identify all functions that lack a try-catch block or error boundary. 2. Flag any promise chains missing a .catch handler. 3. Check for logs that include sensitive user data like emails or tokens. 4. Verify that each major flow includes a span start and end for tracing. Output format: # Audit Findings ## High Risk Items (List with specific line numbers and risk description) ## Observability Gaps (List missing trace points) ## Recommendations (Specific refactoring steps) This is not professional legal or security advice; consult a certified security professional for production infrastructure audits. Paste your code below.Example output
Tips and common edits
Why this works
- Forces a structured review of failure points like unhandled promises.
- Prioritizes data security by flagging unredacted logs in plain text.
- Ensures observability standards by checking for span lifecycle management.
Use this prompt when preparing a pull request or refactoring critical user flows. It works best in Claude or Claude Code by pasting a specific module or service file directly into the chat. Review all suggestions before applying them to your production environment.
Common edits
- Add specific compliance standards if working in a regulated industry.
- Expand the scope to include database query timeout checks if applicable.
Reuse it: Use in a workflowAdapt in the builder
Prompt details
- By
- Prompts-GPT editors
- Published
Did this prompt work?
More like this
Triage Dead-Letter Queue Logs for Failed AI Agents
Sort unhandled agent run failures into an actionable classification table separating tool downtime, invalid schema calls, and missing user context.
Automated Database Migration Safety Review for Claude Code
You get a structured risk assessment of your SQL migration scripts to prevent production downtime, data loss, and long-running table locks.
Create Error Handling Contracts for AI Agents
This prompt transforms raw stack traces into structured error envelopes that provide agents with specific remediation steps and valid parameter constraints for self-correction.
Design Idempotent API Tool Schemas and Retry Policies
Generate robust JSON tool schemas for AI agents that enforce idempotency, define safe retry status codes, and specify clear error recovery strategies for external APIs.
Find the failing line in a stack trace
Isolate your application code from noisy framework trace logs and explain the root runtime crash. Use it when debugging confusing error logs.
Audit API Route Handlers for Auth and Permission Leaks
Get a structured security audit of your API route handlers that evaluates tenant isolation, role-based access control, and input validation risks.
- Create MCP Tool Configuration for Claude Code
- Agent Pipeline Failure Mode Audit with Retry, Fallback, and Human Escalation Rules
- Agent Run Pre-Mortem and Self-Correction Loop Designer
- Checkpoint and Rollback Manager with Compensation Steps and Failure Injection Tests
- Create safe user error messages with correlation IDs
- Evaluate prompt consistency across repeated runs