audit-recover

audit-recover is a skill for Claude Code from RickyTong1/audit-harness. It costs 105 tokens per session (952 once invoked), scanned A, original, MIT.

A recovery procedure for finding earlier task context in audit records when the current conversation is incomplete. It uses session files, action logs, corrections, and conclusions.

In plain words
What is it for?
Use it to recover the current task status, user corrections, decisions, and—when needed—more complete session history.
Why use it?
It reduces the risk of forgetting previous decisions, repeating rejected ideas, or giving vague answers when session history is missing.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit Use it to recover the current task status, user corrections, decisions, and—when needed—more complete session history.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/rickytong1/audit-harness/audit-recover
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 RickyTong1/audit-harness --skill audit-recover
Clone the repo
git clone --depth 1 https://github.com/RickyTong1/audit-harness

Made for: Claude Code.

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 audit-recover

README.md
[![agentmods](https://agentmods.dev/badge/skills/rickytong1/audit-harness/audit-recover/github.svg)](https://agentmods.dev/skills/rickytong1/audit-harness/audit-recover)
Your own site
<a href="https://agentmods.dev/skills/rickytong1/audit-harness/audit-recover"><img src="https://agentmods.dev/badge/skills/rickytong1/audit-harness/audit-recover/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 audit-recover

Your own site · 80×15
<a href="https://agentmods.dev/skills/rickytong1/audit-harness/audit-recover"><img src="https://agentmods.dev/badge/skills/rickytong1/audit-harness/audit-recover.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 105 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 952 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.00105 $0.00952
Opus 5 $0.00053 $0.00476
Sonnet 5 $0.00021 $0.00190
Haiku 4.5 $0.00011 $0.00095

Measured 12d ago against content hash cc1e493fe3e3, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

audit-recover 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 12d 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.

skills/audit-recover/SKILL.md · 109 lines

What it actually says

/recover — Context 恢复

触发方式

/recover              # 恢复当前 session 的 context
/recover full         # 恢复当前 session + 最近 3 天的完整 context
/recover {session_id} # 恢复指定 session 的 context

核心原则

不确定就查审计记录,不要凭印象工作。

这不是一个"可选的辅助工具"——当 context 丢失时,/recover 是唯一可靠的恢复手段。 凭印象工作会导致重犯已被用户否定的错误,这比不工作更糟糕。

何时触发

用户手动触发

用户说"你刚才说的什么来着"、"回忆一下之前的讨论"等。

Claude 主动触发(更重要)

信号 判断方式
无法回忆会话前期的具体内容 用户引用了"之前讨论的",但你找不到对应内容
不确定当前任务做到哪一步了 要继续工作但不知道上次停在哪
要提出的方案可能已被用户否定 不确定某个判断是否被纠正过
回答变得笼统,缺少具体细节 无法说出具体的数字、文件名、结论

执行步骤

分级加载

按以下优先级渐进加载,避免一次性占满 context:

Level 0 — 索引摘要(~200 tokens)

读取 .claude/runs/index.json → 最近 5 条 entry 的 id + task + status

Level 1 — 任务状态(~500 tokens)

读取 .claude/runs/.current_session → 获取当前 session_id
读取 .claude/runs/{session_id}/session.json → task + start_time
读取 .claude/runs/{session_id}/audit_trail.jsonl → 最后 3 条记录的 action + output
→ "当前做到哪了"

Level 2 — 用户修正 + 决策上下文(~1,000 tokens)⚠️ 最重要

在 .claude/runs/ 下所有 audit_trail.jsonl 中搜索 "user_correction"
搜索所有 conclusions 字段
读取最新 .claude/runs/daily/ 下的日报 §四异常 + §六待办
→ "用户否定了什么、得出了什么结论、有什么未解决的问题"

Level 3 — 完整上下文(~3,000 tokens,仅在 /recover full 时加载)

完整的 audit_trail.jsonl
完整的 audit_pending.jsonl(如果还有未归档的)

输出恢复报告

=== Context 恢复报告 ===
来源: .claude/runs/{session_id}/
恢复级别: Level 2

当前任务: {session.task}
任务状态: {最后一个 audit 记录的 output}

⚠️ 用户修正记录(必须遵守):
  1. [时间] 原始判断: "..."
     修正: "..."
     原则: ...

关键结论:
  - ...

未解决问题:
  - ...

⚠️ 以上内容从审计记录恢复,不是从记忆中回忆的。

注意事项

  • 恢复的 user_correction 记录具有最高优先级——后续工作中不得违反
  • 如果恢复后发现当前想法与 user_correction 矛盾,必须修正想法
  • 恢复报告应简洁,避免把整个审计记录复制到 context
  • 优先恢复"为什么"和"不要做什么",而非"做了什么"
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. 12d ago First seen · 109 lines · 105 tokens per session scan A cc1e493fe3e3

Subscribe to this mod's changes

audit-recover is a skill published in the GitHub repository RickyTong1/audit-harness (472 stars, last pushed 3mo ago), licensed MIT. It adds 105 tokens to every session and 952 once invoked, about $0.0005 per session on Opus 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

Other skills, from other repositories

media-ingest

Ingest video, audio, PDF, book, screenshot, and GitHub repo content into the brain. Multi-format handling with entity extraction and backlink propagation. Covers video-ingest, youtube-ingest, and book-ingest subtypes.

garrytan/gbrain · 52 tokens

mem0-oss-to-platform

Plan and then execute a migration of a project from the mem0 open-source / self-hosted SDK (the local Memory class) to the mem0 Platform / hosted / managed SDK (the MemoryClient class). Use this whenever a developer wants to move, switch, or migrate their mem0 usage off OSS/self-hosted to the hosted API — e.g.…

mem0ai/mem0 · 273 tokens

Cortex

Operate Cortex, the LifeOS memory system — the typed Knowledge Archive (People, Companies, Ideas, Research with typed related: links) plus recall of prior work sessions, ISAs, and conversations. Search, add, harvest, develop, ingest, distill, graph-navigate, recall. USE WHEN cortex, knowledge, knowledge base, search…

danielmiessler/LifeOS · 196 tokens

memory

Use when the user asks to remember, recall, forget, update, search, or inspect durable OpenSquilla memory, including profile facts in USER.md and long-term notes in MEMORY.md or memory//.md.

opensquilla/opensquilla · 44 tokens

ha-data-stores

Map of Hope Agent's local data stores and safe read-only query workflow. Use when the user asks where Hope Agent stores data, wants to inspect sessions/messages/memory/logs/background jobs/knowledge indexes/settings, asks the model to query local app data, or debugging requires checking persisted state. Trigger…

shiwenwen/hope-agent · 115 tokens

establishing-project-context

Use when the user asks to establish shared project language, or project work exposes a conflicting, renamed, or deprecated domain term that needs active semantic modeling. Routine small tasks stay on the fast path.

GanyuanRan/Aegis · 45 tokens