luciq-debug

Investigate a Luciq production signal end to end (crash, hang, or user-reported bug) using the Luciq MCP server for context and the user's local repository for the code mapping. Form a hypothesis, propose a fix, cite the evidence.

This is the customer-asked-for skill: when an engineer types "why is this crashing on iOS 18?" or "investigate bug #4821" in their IDE, they don't want a list of API calls. They want the agent to debug like an experienced mobile engineer would, with Luciq's data as backing.

Use this skill when

  • The user describes a crash, hang, or bug. "Why is this happening", "investigate this", "what broke".

  • The user pastes a stack trace, exception, or fingerprint and asks for a diagnosis.

  • The user references a specific Luciq crash ID, bug ID, or hang ID.

  • The user asks "what's regressing in version X" or "compare crashes between versions".

What the agent learns

luciq-debug turns the agent into an evidence-based debugger:

  • Signal-typed methodology. Different decision trees for crashes, hangs, and bug reports, each weighted by the evidence that matters for that signal.

  • MCP tool sequencing. Which Luciq MCP tool to call when, in the right order, with the right filters, without over-fetching.

  • Local code mapping. Translating a top stack frame from production into a Read + Grep against the user's repo so the fix lands in real code, not pseudo-code.

  • Evidence-cited hypotheses. Every claim the agent makes about the cause cites the MCP tool result that produced it. No fabrication, no guessing.

  • Pattern library. Known mobile failure modes (Swift Concurrency races, Android ANRs, OOMs, network failures) the agent recognizes and reaches for the right Luciq context to confirm.

Install

The fastest path is the plugin install. Add the marketplace and install:

Works in Claude Code and Cursor. The plugin install also wires up the Luciq MCP serverarrow-up-right in one step (this skill needs it).

After install, the skill is available as /luciq-skills:luciq-debug.

For other agents, install via npm:

Or copy SKILL.mdarrow-up-right from the public repo to ~/.claude/skills/luciq-debug/SKILL.md (user-global) or .claude/skills/luciq-debug/SKILL.md (project-local). The full SKILL.md is reproduced in the expandable below.

chevron-right📋 Click to expand the full SKILL.mdhashtag

Prerequisites

  • The Luciq MCP server is configured and authenticated. The luciq-setup skill wires this for first-time projects.

  • The user has access to the Luciq application and environment they want to investigate.

  • The agent is running inside a project repository so it can map stack frames to local source.

circle-info

If the MCP server isn't connected, the skill stops and points the user to Setup by IDE before continuing.

How the agent investigates

The skill runs the agent through a small, predictable loop. Every step is gated on evidence. If a step doesn't return data, the agent says so rather than filling in plausible-looking guesses.

Step 1. Identify the entry point

What kind of signal are we debugging?

Entry point
Required input
First MCP tool call

Crash group

Crash number, fingerprint, or pasted stack trace

crash_details (or list_crashes to find it)

Specific occurrence of a crash

Crash number + ULID

get_occurrence_details

App hang / ANR

Hang number, or "recent UI hangs"

list_app_hangs

User-reported bug

Bug number

bug_details

Regression between versions

Two version numbers

list_crashes filtered by version, then crash_patterns with pattern_key: app_versions

Review / rating signal

Date range + version

list_reviews filtered by rating + app_version

If the user doesn't specify, the agent asks. It doesn't pick one at random.

Step 2. Pull MCP context

Once the entry point is known, the agent calls Luciq MCP tools in a deliberate order. The full tool reference lives in MCP Tools Reference; this skill teaches sequencing on top of that reference.

For each entry point, the skill weights data sources differently:

Signal
Primary
Secondary
Tertiary

Crash

crash_details (stack, exception, versions)

crash_patterns by devices / oses / app_versions

list_occurrences_tokens then get_occurrence_details for one session

App hang

list_app_hangs filtered to the recent window

Hang patterns by view / OS

One occurrence's session profiler if exposed

User-reported bug

bug_details (steps, screenshots, network logs, device)

The session's logs from the URLs in the response

n/a

Regression

list_crashes filtered by both versions, diffed

crash_patterns by app_versions for the new top issues

Per-occurrence detail for the highest-impact regression

Review signal

list_reviews filtered by rating: [1, 2] and app_version

list_crashes / list_app_hangs in the same window for correlation

n/a

The agent does not invent metrics that Luciq MCP doesn't expose. Cross-version aggregates beyond what crash_patterns returns, custom percentiles on hang duration, or computed crash-free session rates are out of scope until the MCP server exposes them.

Step 3. Symbolicate if the trace is obfuscated

If the top frame is a hex address, an obfuscated symbol, or a <unknown> marker:

  • iOS: dSYM upload check.

  • Android: R8 / ProGuard mapping check.

  • Flutter: split-debug-info check.

  • React Native: source map check.

The agent points the user at Luciq's symbol upload flow rather than reasoning over hex. (A dedicated luciq-symbolicate skill is in development; until it ships, the agent links to the public symbol upload docs and stops.)

Step 4. Map the top frame to local source

For the symbolicated top frame:

  • Grep the symbol (class + method) across the project.

  • Read the matched file with a small window around the offending line.

  • For multi-platform projects (KMP, RN, Flutter), prefer the platform-specific source set first (iosMain/, androidMain/).

If the symbol doesn't exist locally, that's evidence the project is at a different commit than the build the crash came from. The agent surfaces that rather than guessing.

Step 5. Form a hypothesis

The agent assembles the evidence into a structured hypothesis. Format:

Confidence is honest, not optimistic. If three sources agree, that's high. If the agent is reasoning from the top frame alone, that's low.

Step 6. Propose a fix

The agent shows a diff. Explains how the fix addresses the root cause. Flags side effects. Optionally writes a failing test that reproduces the issue before applying the fix.

The agent does not apply the diff without confirmation.

Pattern library

The skill carries a small, focused library of mobile failure patterns. Each pattern is a short reference the agent reaches for when it sees the corresponding signature in the MCP data.

Swift Concurrency issues (iOS)

When the top frame involves async, await, an actor, or a Sendable violation:

  • Check whether the crash is a Swift runtime: Fatal error: ... rather than a typical exception. That's a concurrency-safety check firing.

  • Confirm the OS distribution from crash_patterns with pattern_key: oses. Swift 6 strict-concurrency checks behave differently across iOS versions.

  • Look at the session profiler from get_occurrence_details for hop-to-@MainActor patterns near the crash time.

  • Don't recommend slapping @MainActor on a class to silence the error. Treat that as a smell, not a fix.

Android ANRs (ANDROID_FATAL_HANG)

When list_app_hangs returns an Android hang:

  • The crash_cause field tells you where the main thread was blocked, but not always what blocked it. Pull a few get_occurrence_details to see the recent main-thread activity and any pending I/O.

  • Check pattern_key: app_versions to see whether the ANR is a regression or a long-tail issue.

  • Common offenders the agent should look for in local code: synchronous network calls on the main thread, large SharedPreferences.commit() writes, blocking Lock acquisitions, work being scheduled on the wrong dispatcher.

iOS UI hangs (FATAL_UI_HANG)

  • The hang exception summary indicates duration class.

  • Pull the occurrence to confirm what the user was doing. The current_view and app_status (foreground / background) fields disambiguate.

  • Common offenders: synchronous Core Data on NSManagedObjectContext.viewContext, file I/O on the main queue, expensive layout work in viewDidLayoutSubviews.

Out-of-memory crashes

  • OOMs surface as terminations, not classic crashes. Check crash_type and the exception name.

  • Pull the occurrence's state.memory and state.storage fields from get_occurrence_details for the resource state at termination.

  • Look at pattern_key: devices. OOMs concentrate on lower-RAM devices and surface a device-tier story the agent should call out.

Network failure correlated crashes

  • For crashes with a stack frame in networking code, pull the occurrence's logs URL from get_occurrence_details (compressed log archive).

  • Cross-reference with bug reports in the same window via bug_details. The state.logs.network_log URL often shows the failed request that preceded the crash.

  • Don't assume timeout vs DNS failure vs server error without the log evidence. The categories matter for the fix.

Honest about what's out of scope

The skill is grounded in what Luciq MCP exposes today. It deliberately does not:

  • Compute crash-free session rate or any metric the MCP doesn't return.

  • Reason about App Store rating drops as a primary investigation entry point. list_reviews is correlation, not causation.

  • Propose APM regression analysis from MCP data. The MCP doesn't expose APM span aggregates yet.

  • Pretend to have data it doesn't have. If a query returns nothing, the agent surfaces that fact and stops.

When Luciq MCP grows new tools (release comparison, APM aggregates, session replay context), this skill grows with them.

Customize for your team

The skill ships with the patterns above, but every team has its own recurring failure modes. You can extend it with team-specific knowledge by adding files in your project's skills directory:

  • kb/patterns.md. Failure patterns the agent should recognize for your codebase.

  • kb/integrations.md. Your custom networking, database, or analytics layers the agent should inspect when their stack frames appear.

  • kb/ownership.md. Who owns which subsystem so the agent can route a triaged crash to the right person.

Tell the agent "remember that for this codebase, X" and it will append to the right knowledge base file. The skill picks the additions up on the next invocation.

When to reach for it

  • A new crash spikes in production and you want a triage and a candidate fix without leaving your IDE.

  • A user-reported bug has reproduction steps but you don't know which screen they were on or what network call failed. The agent pulls that from bug_details and points you at the file.

  • You're cutting a release and want a quick diff of new crashes between versions. The agent runs the comparison via list_crashes and crash_patterns and tells you what's changed.

  • You're handed a crash by a teammate with just a number. The agent investigates from the number alone.

This is the skill that makes the time-from-crash-report-to-fix short, and the resulting fix grounded in real production evidence.

Last updated