archive
Skill0 starsChanged 29 days agoMITView on GitHub
Export Claude Code session JSONLs to portable, human-readable markdown
22 other projects use a version of this.
Adopted by
Most recently taken up by
- phuthuycoding/kanban-flowtheir own version, first seen Nov 8, 2026
- egregore-labs/egregoretheir own version, first seen Nov 6, 2026
- myowinthein/claude-helmtheir own version, first seen Nov 1, 2026
- serbanghita/plan-critique-skillstheir own version, first seen Nov 1, 2026
- kirkchen/beattheir own version, first seen Nov 1, 2026
- matthewdigiuseppe/MStacktheir own version, first seen Nov 1, 2026
Used with
Projects with it also use distill, plan and 2 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
HK-hubSkilldistill
Strip designs to their essence by removing unnecessary complexity. Great design is simple, powerful, and clean. Use when the user asks to simplify, declutter, reduce noise, remove elements, or make a UI cleaner and more focused.
Also in 3 projects that use this
BlockSkillplan
Draft a TDD, PRD, or lightweight plan in the conversation without committing it.
Also in 5 projects that use this
AnthropicSkillstatus
Case status summary by audience — client-facing (plain language), internal (for the professor), or court-ready (formal caption format per local rules). Same facts, different framing and depth. Use when a student needs to update the client, brief the professor, or prepare a court status report.
Also in 3 projects that use this
Microsoft AzureSkilltest
Also in 3 projects that use this
Other versions22 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 22
- ReScienceLab/opc-skills★ 1.9ksame name
- egregore-labs/egregore★ 293same name
- matthewdigiuseppe/MStack★ 17same name
- bks-lab/open-bridge★ 13same name
- serbanghita/plan-critique-skills★ 13same name
- kirkchen/beat★ 9same name
- philippe-desplats/second-brain★ 6same name
- codebycorey/delta-spec★ 4same name
- grasscaograss/AwesomeWeldoneSkills★ 2same name
- jcordon5/archive-skill★ 2same name
12 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
The file
We split this skill into the rules it gives an agent
3 rules. 0 are common, 1 is distinctive, and 2 are very specific to this project.
0
Common
Most of the 18 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 33
Use ${CLAUDE_PLUGIN_ROOT}/scripts/export-session.py if the env var is set.
- Distinctive: line 44
If not found, STOP and tell the user the plugin is not properly installed.
- Very specific: line 61
Add --output "$OUTPUT" / --force when the user passed them.
“Common” is measured: kept by at least 6 in 10 of the 18 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Archive Claude Code Sessions
Exports Claude Code's session transcripts from ~/.claude/projects/.
You are exporting session JSONL transcripts to self-contained markdown files under
perdure/archives/. Archives survive JSONL pruning, work without Claude Code, and
are readable by anyone with a text editor.
Arguments
$1— session UUID,current(or empty: auto-detect the current session), orall— sweep mode: archive every session in this project that doesn't have an archive yet.--format brief|medium|verbose— verbosity (default:medium)--output <path>— override the default archive path (single-session only)--force— re-archive even if the archive file already exists
Steps
1. Locate the export script
Use ${CLAUDE_PLUGIN_ROOT}/scripts/export-session.py if the env var is set; else
the plugin checkout's root scripts/export-session.py (Codex keeps the whole
checkout) or scripts/export-session.py beside this SKILL.md (skills CLI); else:
# Claude Code's install manifest names the ACTIVE install. A bare
# `find ... | head -1` returns whichever path the filesystem yields first, and
# the plugin cache keeps every version ever installed — that can be an old one.
python3 -c "import json,pathlib;d=json.loads((pathlib.Path.home()/'.claude/plugins/installed_plugins.json').read_text());p=d.get('plugins',d);print(next(v[0]['installPath'] for k,v in p.items() if k.split('@')[0]=='perdure'))"If not found, STOP and tell the user the plugin is not properly installed.
2a. Single session (default)
Determine the session id:
$1is a UUID (36 chars with dashes) → use it.- Empty or
current→ most recently modified JSONL in~/.claude/projects/<cwd-slug>/(cwd-slug =$PWDwith/→-); its filename stem is the id. If its mtime is within the last 60s, note the session is still active and the archive reflects current state.
Run:
python3 "$SCRIPT_PATH" --session-id "$SESSION_ID" --project-dir "$PWD" --format "${FORMAT:-medium}"Add --output "$OUTPUT" / --force when the user passed them. If the archive
already exists without --force, the script stops — relay its message (re-run with
--force to regenerate, or --output for a different path).
2b. Sweep mode ($1 = all)
python3 "$SCRIPT_PATH" --sweep --project-dir "$PWD" --format "${FORMAT:-medium}" ${FORCE:+--force}The script enumerates the project's JSONLs, skips ones already archived (matched by the 8-char UUID suffix), archives the rest, and prints one line each. Good moments to sweep: returning to a project after a gap, before upgrading Claude Code, before cold-storing a project. Not needed right after archiving the current session.
3. Report
✅ Archived
Path(s): perdure/archives/session-<date>-<slug>-<short-id>.md (one line per file in sweep mode)
Format: <brief|medium|verbose>
Source: ~/.claude/projects/<slug>/*.jsonlCommit policy
Archives are gitignored by default (the exporter scaffolds the scoped
.gitignore per the commit-archives preference) — transcripts can contain pasted
secrets and personal content, so committing them is an explicit opt-in with a
redaction pass. See docs/RECORDS-CONVENTION.md (also at
references/RECORDS-CONVENTION.md beside this SKILL.md in a skills-CLI install). Workflow files and ADRs are the
committed-by-default layer; archives are the privacy layer.
Reference
| Format | Contents |
brief | Dialogue prose only; tool calls elided |
medium (default) | Dialogue + one-line tool summaries |
verbose | Dialogue + tool summaries + truncated outputs |
Naming: perdure/archives/session-<YYYY-MM-DD>-<slug>-<short-uuid>.md (first
message date, session slug, first 8 UUID chars for collision safety).
Semantics: idempotent within a session (re-run regenerates from the larger JSONL); per-session filenames never collide; the archive stands alone once written; the JSONL remains the source of truth while it exists. Corrupt JSONLs are skipped with a stderr log, never fatal.
The auto-archive-before-compact preference runs this automatically via the
PreCompact hook.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

