Debugging

From dlt/faultline · View interactive version

Debugging is an AI agent skill from the GitHub repository dlt/faultline. Investigate Rails production errors using the Faultline MCP server. Use when the user mentions a production exception, asks to look at recent errors, debugs a specific error group/occurrence, or wants to trace a slow endpoint.

How to use this skill

Skill file

When the user wants to debug a production error, diagnose it using the Faultline MCP tools — don't ask them to paste a stack trace from the dashboard.

Investigation order

Follow these steps; skip any that don't apply.

  1. Find the error group. If the user named an error class or message, call list_error_groups with search: and pick the most plausible match. If they gave a numeric id, skip to step 2.
  2. Get group context. Call get_error_group with the id. The response includes a summary of the 10 most recent occurrences (no backtraces or locals — those are intentionally omitted to keep the response small).
  3. Pull a full occurrence. Call get_occurrence with the most recent occurrence id to get the full backtrace, captured local variables, filtered request params, request headers, and source context. This is the step that actually lets you fix the bug — don't propose a fix without seeing the locals.
  4. Optional: trace performance. If the error looks performance-related (timeouts, ConnectionTimeoutError, slow queries), call list_traces with the relevant endpoint, then get_trace for span detail.
  5. Propose a fix. Cite specific files and line numbers from the backtrace. Use the local variables to ground claims about what data flowed in.

Tools available

Read-only:

Mutating (only available when the Faultline app sets mcp_readonly: false):

Common pitfalls

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.