forensics

Analyze JSONL system logs to identify root causes of repeated failures.

1|Updated Dec 18, 2025
One-click install
npx skills add https://github.com/matt-fell-ai/PAI --skill forensics-matt-fell-ai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: forensics
Source: https://github.com/matt-fell-ai/PAI/tree/main/skills/Forensics
Command: npx skills add https://github.com/matt-fell-ai/PAI --skill forensics-matt-fell-ai

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Forensics provides deep analysis of system logs, session history, and execution failures to identify patterns and root causes.

Core Features & Use Cases

  • Analyze Last Failure: Inspect the most recent failure to determine next steps.
  • Pattern Tracing: Identify recurring tool usage issues and bottlenecks.
  • Cognitive Audit: Review prompts and contexts that led to errors.

Quick Start

  • pai run Forensics debug
  • pai run Forensics audit

Frequently Asked Questions about forensics

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I debug recurring task failures by analyzing logs?

Root-cause debugging analyzes system logs to identify patterns in repeated failures. Forensics parses JSONL logs from your execution history, cross-references them with bug records, and surfaces recursion loops, context loss, and environment drift so you can fix the underlying issue.

What patterns can I detect in tool usage and execution history?

Pattern tracing identifies recurring bottlenecks and tool usage issues across your session history. By reviewing prompts, contexts, and tool outputs that led to errors, you spot systematic problems—like tools called with inconsistent parameters or environments drifting between runs.

Can I audit my prompts and contexts to find where errors originated?

Cognitive audits review the prompts and execution contexts that preceded failures. This traces error sources back to specific decisions or state changes, helping you understand whether problems stem from prompt formulation, missing context, or environmental shifts.

How do I inspect my most recent failure to determine next steps?

Analyzing your last failure isolates the most immediate problem. Forensics examines the final failure's logs and context to clarify whether the issue is reproducible, environmental, or tied to a specific tool invocation, guiding your remediation approach.

What data does forensics analyze to find root causes?

Forensics processes JSONL logs, execution records, and bug metadata stored in your History and Execution directories. It detects recursion loops, context loss, and environment drift by cross-referencing raw outputs with failure records to pinpoint systemic causes.