# audit-agent-history

Scans local AI agent transcripts to isolate recurring mistakes and turn them into project safety rules. Helpful when an assistant repeats the same errors across sessions.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 548 installs
- Author: timschoch
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/timschoch/skilly/tree/HEAD/bundles/workflow/skills/audit-agent-history/SKILL.md
- Updated: 2026-10-23
- HTML: https://affpapa.org/en/nevibecode/skills/audit-agent-history

## What it does

The skill parses session histories located in `~/.claude/projects/` and `~/.codex/sessions/`. It scans for phrases where the user countermands an assistant action, tracking triggers like "no", "stop", or "revert". Corrections are grouped by failure category and calculated relative to message counts, normalizing rates across different models.

Processing runs inside a single dedicated subagent. This keeps heavy raw transcripts out of your primary context window. The skill evaluates the worst session with an identical model to locate why rules failed, then inspects the slowest session to identify tool calls that altered no output.

The final output suggests up to three actionable rules starting with `Never`, complete with authentic positive and negative snippets. Without pre-existing JSONL logs in the default paths, the skill has nothing to evaluate. Approved hazard rules sync directly to the central hub rather than local repository overrides.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add timschoch/skilly --skill audit-agent-history -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/audit-agent-history/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/audit-agent-history/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add timschoch/skilly --skill audit-agent-history -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/audit-agent-history/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add timschoch/skilly --skill audit-agent-history -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/audit-agent-history/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install timschoch/skilly audit-agent-history
```

2. **Manually: put the files in place**
- File: `.github/skills/audit-agent-history/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add timschoch/skilly --skill audit-agent-history -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/timschoch/skilly --path bundles/workflow/skills/audit-agent-history
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/audit-agent-history/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add timschoch/skilly --skill audit-agent-history -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/timschoch/skilly/tree/HEAD/bundles/workflow/skills/audit-agent-history/SKILL.md

## When to use it
- inspect session histories to identify recurring agent mistakes
- convert frequent failure patterns into strict workflow rules
- isolate unhelpful tool invocations in bloated transcripts
- hoist shared local guardrails into the upstream rule repository

## Example prompts
- Audit my Claude Code session logs from the past 30 days and extract common failure modes
- Analyze recent Codex transcripts to draft hazard rules for recurring mistakes
- Inspect the longest agent sessions and flag tool calls that produced no changes

## Similar
- [setup-matt-pocock-skills](https://affpapa.org/en/nevibecode/skills/setup-matt-pocock-skills.md) — skill · 1052851 installs
- [ask-matt](https://affpapa.org/en/nevibecode/skills/ask-matt.md) — skill · 766587 installs
- [to-tickets](https://affpapa.org/en/nevibecode/skills/to-tickets.md) — skill · 711230 installs
- [writing-plans](https://affpapa.org/en/nevibecode/skills/writing-plans.md) — skill · 282859 installs
- [caveman-review](https://affpapa.org/en/nevibecode/skills/caveman-review.md) — skill · 411800 installs
- [caveman-compress](https://affpapa.org/en/nevibecode/skills/caveman-compress.md) — skill · 411500 installs

From the same set: [timschoch/skilly](https://affpapa.org/en/nevibecode/by/timschoch/skilly.md) — 16 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
