forensics

forensics is a skill for Claude Code, Codex from open-gsd/gsd-pi. It costs 112 tokens per session (2,239 once invoked), scanned A, original, MIT.

A post-mortem guide for finding why a GSD automatic run failed or became stuck by examining its saved activity and runtime files.

In plain words
What is it for?
It helps inspect event logs, journals, metrics, locks, paused sessions, and debug files, then produce a bug report with file and line references.
Why use it?
It helps trace visible failures back to a root cause instead of guessing from the final symptom.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit It helps inspect event logs, journals, metrics, locks, paused sessions, and debug files, then produce a bug report with file and line references.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/open-gsd/gsd-pi/forensics
About the project

GSD Pi is a command-line coding agent and project workflow system that plans, implements, verifies, and tracks software work through milestones, tasks, Git worktrees, and stored project notes. It is for developers who want structured, longer-running agent sessions using different model providers. The catalogue entries extend GSD Pi with skills and agents.

open-gsd/gsd-pi · 1,404 stars · on GitHub · opengsd.net

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add open-gsd/gsd-pi --skill forensics
Clone the repo
git clone --depth 1 https://github.com/open-gsd/gsd-pi

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for forensics

README.md
[![agentmods](https://agentmods.dev/badge/skills/open-gsd/gsd-pi/forensics/github.svg)](https://agentmods.dev/skills/open-gsd/gsd-pi/forensics)
Your own site
<a href="https://agentmods.dev/skills/open-gsd/gsd-pi/forensics"><img src="https://agentmods.dev/badge/skills/open-gsd/gsd-pi/forensics/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for forensics

Your own site · 80×15
<a href="https://agentmods.dev/skills/open-gsd/gsd-pi/forensics"><img src="https://agentmods.dev/badge/skills/open-gsd/gsd-pi/forensics.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 112 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,239 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00112 $0.02239
Opus 5.5 $0.00045 $0.00896
Sonnet 5.5 $0.00022 $0.00448
Haiku 4.5 $0.00011 $0.00224

Measured 1mo ago against content hash e07319226835, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

forensics scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

src/resources/skills/forensics/SKILL.md · 163 lines

How it starts

The opening of the file, as written. The whole thing — 163 lines — stays where its author put it; the contents beside it link to each section on GitHub.

  • activity/{seq}-{unitType}-{unitId}.jsonl — full tool-call and message stream per unit
  • journal/YYYY-MM-DD.jsonl — iteration-level events. Orchestrator path emits orchestrator-* events (orchestrator-dispatch-match, orchestrator-guard-block, orchestrator-terminal, etc.); legacy loop events (dispatch-match, stuck-detected, guard-block, unit-start/end, terminal) can still appear on non-orchestrator paths.
  • metrics.json — token/cost ledger; duplicate type/id entries indicate a stuck loop
  • auto.lock — JSON snapshot of the currently-owning PID; stale lock = crash mid-unit
  • forensics/ — saved prior reports
  • debug/ — debug logs if enabled
  • runtime/paused-session.json — serialized session when auto-mode paused
  • doctor-history.jsonl — doctor check history

The /gsd forensics command pre-computes a forensic report with anomalies flagged. This skill is the manual investigation that goes deeper, or runs when the automated report isn't enough.

Invocation points:

  • /gsd forensics has been run and user wants deeper analysis
  • Auto-mode exited unexpectedly, no obvious cause
  • Same unit dispatched multiple times (stuck loop suspected)
  • A session crashed and auto.lock is stale
  • User reports "it just stopped" or "it did the wrong thing"

<core_principle> READ-ONLY. Forensics touches no live state. Non-mutating inspection commands (e.g., ps, top -b, cat /proc/*) are allowed for checking process status or reading system files. Strictly prohibited: gsd_* writes, commands that modify state, executing binaries that produce side effects, writing to files (outside the final report), or re-running the failed unit. The evidence must stay pristine for future investigations.

RECOVERY IS A BOUNDARY, NOT A BYPRODUCT. If the failure involves a GSD auto-pause blocker or a failed Task attempt, the recovery routes are authority-controlled: /gsd blocker resolve is cleared only by the human in the native terminal, and a recovery resume (gsd_task_recovery_resume or the operator's /gsd recover <recoveryActionId>) is a gated continuation with its own repair-evidence requirements. Forensics recommends those routes in its Recovery section; it never performs them, and it never recommends direct database, runtime KV/counter, or rendered-file manipulation to unblock a run. Read the gsd-blocker-recovery skill before writing the Recovery section.

SYMPTOM → ROOT CAUSE, WITH CITATIONS. Every claim in the report is backed by an artifact path and either a line number or a JSONL field. "The loop got stuck because of a race" is not useful; ".gsd/journal/2026-04-19.jsonl:142 shows stuck-detected with flowId X, caused by dispatch-guard.ts:87 returning the same unit after unit-end" is.

PRE-PARSED LEADS, NOT CONCLUSIONS. If /gsd forensics has surfaced anomalies, treat them as hypotheses to verify, not answers. </core_principle>

Step 1: Locate the evidence

Read what's in .gsd/:

  1. auto.lock — is it stale? Check PID against ps (read-only inspection, allowed). Stale = crash.
  2. Most recent .gsd/activity/*.jsonl — sort by mtime, newest first. That's the last unit that ran.
  3. Today's .gsd/journal/YYYY-MM-DD.jsonl — the iteration-level view.
  4. .gsd/metrics.json — does any type/id appear more than once? (stuck loop signal)
  5. .gsd/runtime/paused-session.json — if present, what was the pause reason?

Read the full file on GitHub · 163 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago Changed · +3 lines e07319226835
  2. 2mo ago Changed · +6 lines 8929965d1b69
  3. 3mo ago First seen · 154 lines · 112 tokens per session scan A db5b11b0a11b

Subscribe to this mod's changes

forensics is a skill published in the GitHub repository open-gsd/gsd-pi (1,404 stars, last pushed today), licensed MIT. It adds 112 tokens to every session and 2,239 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

forensics compared with skills from other repositories

forensics next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
forensicsopen-gsd/gsd-piSkill1.4ktodayMITA112Claude Code, Codex
gsd-debugopen-gsd/gsd-coreSkill12ktodayMITA13Claude Code
gsd-forensicsopen-gsd/gsd-coreSkill12ktodayMITA21Claude Code
gsd-audit-fixopen-gsd/gsd-coreSkill12ktodayMITA25Claude Code
gsd-ns-reviewopen-gsd/gsd-coreSkill12ktodayMITA16Claude Code
gsd-debugshoootyou/get-shit-done-multiSkill228mo agoMITA13Claude Code
gsd-graphifyopen-gsd/gsd-coreSkill12ktodayMITA22Claude Code, Codex