log-doctor

Analyzes multiplai runtime logs to diagnose failures and produce verified fix-recommendation reports.

Updated May 3, 2026
One-click install
npx skills add https://github.com/spikelab/multiplai-cc-mktplace --skill log-doctor-spikelab
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: log-doctor
Source: https://github.com/spikelab/multiplai-cc-mktplace/tree/main/plugins/multiplai-context/skills/log-doctor
Command: npx skills add https://github.com/spikelab/multiplai-cc-mktplace --skill log-doctor-spikelab

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When a multiplai subsystem misbehaves — a hook times out, a context injection makes no sense, a learning pipeline silently degrades — the evidence is scattered across a dozen log files, and guessing at root causes wastes time. This Skill turns the runtime log directory into an actionable, source-verified fix report. ## Core Features & Use Cases - Passive log scanning: Clusters errors and warnings across subsystems (context_manager, extract_learnings, backfill, dream, session hooks), detects health anomalies, and verifies each root cause against the actual source code before recommending a fix. - Hook timing analysis: Pairs HOOK_ENTRY/HOOK_EXIT lines to show which hook timed out, where its budget went (startup cost, stage breakdown, p95 vs ceiling), and which prompt lost its context. - Injection forensics: Reconstructs context-routing decisions by joining router scores with inject events, explaining why a file was or was not injected (cooldown suppression, low floor, prompt attribution). - Probe mode: Actively exercises a functionality (session lifecycle, deep-research, catalog generation) and asserts its expected log entries appeared, catching missing logging as a bug. - Use Case: A user asks "why is extract_learnings failing?" — the Skill scans recent logs, clusters the recurring traceback, reads the failing code path, and writes a severity-ranked report with a concrete fix target to the workspace INBOX. ## Quick Start Ask the assistant to run log-doctor to analyze the multiplai logs from the last seven days and produce a health report with verified root causes.

Frequently Asked Questions about log-doctor

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

FAQPage Schema
How do I analyze multiplai logs to find what's broken?▼

Run the log_doctor.py scanner with uv, optionally narrowing scope with --subsystem or --days. It clusters errors and warnings by normalized signature, then each candidate root cause is verified against the source code before a fix-recommendation report is written to the workspace INBOX.

How do I find out which hook timed out and why?▼

Use the --hooks flag, which pairs HOOK_ENTRY and HOOK_EXIT lines and prices each run against its configured budget. A killed count above zero identifies the timeout, while p95 percentage, startup p50, and the stage breakdown show where the budget went.

Why did the context router inject the wrong file?▼

Use --injections to reconstruct each routing decision from router scores and activity inject events. Check in order: cooldown suppression of top scorers, a low admission floor, and prompt attribution via the session transcript, since prompts themselves are not logged.

Can I verify a functionality logs correctly without waiting for real usage?▼

Yes, probe mode takes a baseline snapshot with --probe-start, you trigger the functionality (for example a nested session or a dry-run catalog generation), then --probe-check asserts the expected log entries appeared since the baseline.

Does the log scanner modify or rotate my log files?▼

No, the scanner is strictly read-only and never modifies logs. Probe baselines are stored separately in a state file under the logs directory, and log rotation remains the responsibility of the logging subsystems themselves.

How does log-doctor handle malicious text inside log files?▼

Log-derived text is wrapped in untrusted-content fences with control characters stripped and instruction-shaped spans marked as possible injections. Marked spans are reported as findings to the user, never executed or followed as instructions.