salvage-session-archives

salvage-session-archives is a skill for Claude Code from eranw2000/claude-maintenance-skills. It costs 97 tokens per session (2,094 once invoked), scanned D, original, MIT.

A cleanup skill that reads leftover Claude Code session transcripts for a project and finds useful facts, decisions, or warnings missing from its CLAUDE.md file.

In plain words
What is it for?
Use it during project cleanup or when you want to salvage information from old session archives. It appends recovered notes to CLAUDE.md and deletes the leftover folders.
Why use it?
It helps recover project knowledge from sessions that ended before their important details were recorded. It also checks for duplicates or contradictions before adding anything.

Skill for Claude Code

Written for Claude Code: disable-model-invocation in frontmatter. Also seen: model in frontmatter; reads .claude/ paths; mentions CLAUDE.md.

Good fit Use it during project cleanup or when you want to salvage information from old session archives. It appends recovered notes to CLAUDE.md and deletes the leftover folders.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/eranw2000/claude-maintenance-skills/salvage-session-archives
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 eranw2000/claude-maintenance-skills --skill salvage-session-archives
Clone the repo
git clone --depth 1 https://github.com/eranw2000/claude-maintenance-skills

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 salvage-session-archives

README.md
[![agentmods](https://agentmods.dev/badge/skills/eranw2000/claude-maintenance-skills/salvage-session-archives/github.svg)](https://agentmods.dev/skills/eranw2000/claude-maintenance-skills/salvage-session-archives)
Your own site
<a href="https://agentmods.dev/skills/eranw2000/claude-maintenance-skills/salvage-session-archives"><img src="https://agentmods.dev/badge/skills/eranw2000/claude-maintenance-skills/salvage-session-archives/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 salvage-session-archives

Your own site · 80×15
<a href="https://agentmods.dev/skills/eranw2000/claude-maintenance-skills/salvage-session-archives"><img src="https://agentmods.dev/badge/skills/eranw2000/claude-maintenance-skills/salvage-session-archives.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 97 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,094 The whole file, excluding the scripts and references it only reads on demand.
Security scan D 2 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00097 $0.02094
Opus 5.5 $0.00039 $0.00838
Sonnet 5.5 $0.00019 $0.00419
Haiku 4.5 $0.00010 $0.00209

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

Security

Grade D, and why

salvage-session-archives scanned grade D with 2 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.

Asks the agent to reveal its instructionsmediumSystem prompt leakage

Directions to print, repeat or translate the system prompt extract configuration the operator did not intend to expose.

- Output instructions: append (via Edit with a unique anchor at end of file, NOT Write) a section titled exactly `## Salvaged from session archives`. Organize by topic, not by session. Tight bullets. Plain language: no e

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

Ask the user to confirm before deleting. On confirmation, `rm -rf` each leftover folder identified in step 2. After deletion, run a quick `find` to confirm only the canonical project folder remains. Never delete the cano
salvage-session-archives/SKILL.md · 125 lines

How it starts

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

Salvage session archives for a project

Goal: recover any durable knowledge that lives in old session .jsonl transcripts but never made it into the project's CLAUDE.md, then clean up.

The Claude Code harness writes transcripts into auto-named "leftover folders" with dashed paths (e.g. ~/.claude/projects/-Users-<username>--claude-projects-<ProjectName>/). Sessions that ended cleanly already distilled their content via an end-of-session save, but premature exits, subagent runs, and quietly-discovered gotchas often leave salvageable material behind.

When to run

  • User asks to salvage / collect / extract / mine session archives or leftover folders.
  • End-of-quarter cleanup pass across multiple projects.

Steps

1. Identify the project from the current working directory

Do NOT ask the user which project to work on. Derive <project_name> from the current working directory (pwd). Handle these cases:

  • pwd is ~/.claude/projects/<ProjectName>/ → use <ProjectName> directly. This is the canonical project directory.
  • pwd is the project's source repo (anywhere on disk) or a subdir of it → use the repo directory's basename as <ProjectName>. The canonical project directory is ~/.claude/projects/<ProjectName>/.
  • pwd is a dash-prefixed leftover folder like ~/.claude/projects/-Users-<username>--claude-projects-<ProjectName>/ → use <ProjectName> (the trailing segment after the last -).
  • pwd is ~/.claude itself or any other location that doesn't clearly map to a project → only in this case, list ~/.claude/projects/ and ask the user which project to target (show the 3-4 most recently-touched via ls -lt).

State the inferred project name in one sentence before continuing, so the user can redirect if needed. Then proceed without waiting for confirmation.

2. Find every leftover folder for that project

Run find ~/.claude -maxdepth 3 -type d -iname "*<project_name>*" and inspect the results. Real leftover folders are the dash-prefixed ones (Claude Code encodes each session's working-directory path into the folder name, replacing every / with -, so a -Users-<username>-... prefix is just your $HOME dash-encoded). For example:

Read the full file on GitHub · 125 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 e521716c20fd
  2. 2mo ago First seen · 125 lines · 97 tokens per session scan D ba60003a68d8

Subscribe to this mod's changes

salvage-session-archives is a skill published in the GitHub repository eranw2000/claude-maintenance-skills (8 stars, last pushed 4d ago), licensed MIT. It adds 97 tokens to every session and 2,094 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it D with 2 findings (asks the agent to reveal its instructions, recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

salvage-session-archives compared with skills from other repositories

salvage-session-archives next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
salvage-session-archiveseranw2000/claude-maintenance-skillsSkill84d agoMITD97Claude Code
hive-mind-advancedfrankxai/claude-skills-librarySkill47yesterdayMITA47Claude Code
creator-productivityfrankxai/claude-skills-librarySkill47yesterdayMITA62Claude Code
memory-prunefrankxai/claude-skills-librarySkill47yesterdayMITA67Claude Code
creator-intelligencefrankxai/claude-skills-librarySkill47yesterdayMITA51Claude Code
strategic-compactfrankxai/claude-skills-librarySkill47yesterdayMITA52Claude Code, Codex
deep-cleanopencue/cuecardsSkill7yesterdayMITA87Claude Code, Codex