plugins/lisa/skills/root-cause-analysis/SKILL.md
Root cause analysis methodology. Evidence gathering from logs, execution path tracing, strategic log placement, and building irrefutable proof chains.
npx skillsauth add codyswanngt/lisa root-cause-analysisInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Definitively prove what is causing a problem. Do not guess. Do not theorize without evidence. Trace the actual execution path, read real logs, and produce irrefutable proof of root cause.
Core principle: "Show me the proof." Every conclusion must be backed by concrete evidence -- a log line, a stack trace, a reproducible sequence, or a failing test.
logs/, tmp/, stdout/stderr output).next/, dist/, build output)package.json scripts for log-related commandsscripts/*log*, scripts/*tail*, scripts/*watch*.env files referencing log groups or log streams# Discover available log groups
aws logs describe-log-groups --query 'logGroups[].logGroupName' --output text
# Tail recent logs with filter
aws logs filter-log-events \
--log-group-name "/aws/lambda/function-name" \
--start-time $(date -d '30 minutes ago' +%s000) \
--filter-pattern "ERROR" \
--query 'events[].message' --output text
# Follow live logs
aws logs tail "/aws/lambda/function-name" --follow --since 10m
When existing logs are insufficient, add targeted log statements to prove or disprove hypotheses.
// Bad: Vague, unhelpful
console.log("here");
console.log("data:", data);
// Good: Precise, searchable, includes context
console.log("[DEBUG:issue-123] processOrder entry", {
orderId: order.id,
status: order.status,
itemCount: order.items.length,
timestamp: new Date().toISOString(),
});
| Placement | Purpose | |-----------|---------| | Function entry | Confirm the function is called and with what arguments | | Before conditional branches | Verify which branch is taken and why | | Before/after async operations | Detect timing issues, race conditions, failed awaits | | Before/after data transformations | Catch where data becomes corrupted or unexpected | | Error handlers and catch blocks | Ensure errors are not silently swallowed |
When multiple hypotheses exist, design a log placement strategy that eliminates all but one. Each log statement should be placed to confirm or rule out a specific hypothesis.
Build an evidence chain that is irrefutable:
Symptom: [exact error message or behavior]
|
v
Proximate cause: [file:line] -- [the line that directly produces the error]
|
v
Root cause: [file:line] -- [the underlying reason]
|
v
Proof: [log output / test result / reproduction that confirms the chain]
After root cause is confirmed, remove all debug log statements added during investigation. Leave only:
Verify cleanup:
# Search for any remaining debug markers
grep -rn "\[DEBUG:" src/ --include="*.ts" --include="*.tsx" --include="*.js"
## Root Cause Analysis
### Evidence Trail
| Step | Location | Evidence | Conclusion |
|------|----------|----------|------------|
| 1 | file:line | Log output or observed value | What this proves |
| 2 | file:line | Log output or observed value | What this proves |
### Root Cause
**Proximate cause:** The line that directly produces the error.
**Root cause:** The underlying reason this line behaves incorrectly.
**Proof:** The specific evidence that confirms this beyond doubt.
### Recommended Fix
What needs to change and why. Include file:line references.
[DEBUG:issue-name]) so they are easy to find and clean updevelopment
Prepare a machine — a fresh laptop or a throwaway container — to run coding agents, before any repository exists. Detects which of Lisa's supported agents (Claude Code, Codex, Cursor, OpenCode, Antigravity, Copilot) are already installed, asks which credential manager the machine uses (Bitwarden, 1Password, Doppler, Vault, AWS, or none), and installs only what is missing, each by its vendor's own preferred method. Idempotent, headless by default, and emits a Dockerfile for a spin-up/spin-down environment. Run it on a new machine, in a container, or before cloning anything.
tools
Provision and verify a remote execution environment for a host project — Codex Cloud today, other remote surfaces as they are added. Generates a repository-owned setup script that installs the declared toolchain, materializes secrets through lisa-secrets-access, and runs the project's own hook. Provisions by API where one exists, by driving the vendor console where one does not, and by emitting exact config otherwise — then proves the result with the same read-back regardless of which tier did the work. Use before dispatching any work with executionEnv.
tools
Bring a developer's machine in line with the toolchain the project declares. Reports every tool in remoteEnv.tools that is missing, outdated, or unpinned for this platform, and installs the missing ones into ~/.local/bin from the same pinned, checksummed entries the remote surfaces use — but only when asked. Same manifest, same pins, same installers as lisa-setup-remote-env; what differs is consent and that the pin is a floor rather than an equality. Run it on a fresh checkout, after a manifest change, or when a tool fails at the moment of use.
tools
Route one unit of work to a remote execution surface. Reads the executionEnv parameter (local by default, codex-cloud or claude-web today), verifies the environment is provisioned and bound to this repository, submits a thin skill invocation, records the task identifier to .lisa/remote-dispatch.json, and exits without polling. Routing only — the remote runs the identical skill from the identical repository. Composable and inline: other skills invoke it via the Skill tool rather than users calling it directly.