Getting it into your agent
This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.
/plugin marketplace add ngmeyer/skills/plugin install ngmeyer-skillsWrote 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.
[](https://agentmods.dev/skills/ngmeyer/skills/session-recover)<a href="https://agentmods.dev/skills/ngmeyer/skills/session-recover"><img src="https://agentmods.dev/badge/skills/ngmeyer/skills/session-recover.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00166 | $0.03352 |
| Opus 5 | $0.00083 | $0.01676 |
| Sonnet 5 | $0.00033 | $0.00670 |
| Haiku 4.5 | $0.00017 | $0.00335 |
Grade D, and why
session-recover 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 6d 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.
Reads agent configuration directoriesmediumAgent snooping
.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.
- You find two `~/.claude/projects/-*-foo/` directories whose trailing tokens match Recursive force deletehighDestructive command
rm -rf with a variable or a broad path is one typo away from removing the wrong tree.
4. **`rmdir "$LOSER"` failing:** usually a `.DS_Store` on macOS or a stray `todos/` dir. List the contents before retrying; don't `rm -rf` reflexively. How it starts
The opening of the file, as written. The whole thing — 197 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/session-recover — Manually merge duplicate Claude Code project directories
Claude Code stores per-project session transcripts and persistent memory under ~/.claude/projects/{encoded-cwd}/. The encoded cwd is the absolute path with every non-alphanumeric character replaced by -. Two different cwd paths that point at the same logical project (a real directory + its symlink mirror, an external-mount path + a ~/Projects/ shortcut, a Linux user moving from /home/me to /Users/me, etc.) produce two completely separate namespaces — separate session lists in /resume, separate memory dirs, no cross-visibility.
This skill cleans that up: detect the duplicates, unify the memory into the canonical location, archive the orphan transcripts, and capture the lesson so future sessions don't re-create the split.
When this skill applies
- You opened a session and the memory dir is empty, but you remember adding entries in past sessions
claude --resumeshows fewer sessions than you expect- You find two
~/.claude/projects/-*-foo/directories whose trailing tokens match - Cross-session memory references in conversation don't resolve (
[[some-memory]]links to nothing) - A grep for the project name across
~/.claude/projects/returns multiple matches
If none of the above hold, the skill has nothing to do — exit early and tell the user.
Core principle
The canonical path is the one Claude Code's current system prompt tells you it is. When the harness starts a session it announces:
You have a persistent, file-based memory system at
/Users/me/.claude/projects/{ENCODED}/memory/
That's the winner. Everything else with a similar trailing token is a loser candidate. The user can override if they actually want a different path canonical, but default to what the harness chose.
Procedure
Phase 1 — IDENTIFY: find duplicate project dirs
Use the optional argument as a project-name token. If omitted, infer from cwd's trailing component (basename "$PWD") or the conversation.
What ships with it
2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 6d ago First seen · 197 lines · 166 tokens per session scan D 7464f4314c7e
session-recover is a skill published in the GitHub repository ngmeyer/skills (4 stars, last pushed 1mo ago), licensed MIT. It adds 166 tokens to every session and 3,352 once invoked, about $0.0008 per session on Opus 5. A static security scan graded it D with 2 findings (reads agent configuration directories, recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
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.
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.…
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…
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.
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…
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.