archive-session
Archives session data and statistics into a version-controlled folder structure at project completion.
Install
mkdir -p .claude/skills/archive-session && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/18223" && unzip -o skill.zip -d .claude/skills/archive-session && rm skill.zipInstalls to .claude/skills/archive-session
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Archive the current Claude session into development/<date-slug>/ (transcript, statistics, analytics scaffold) at the end of a feature, before committing. User-invoked only — type /archive-session.Key capabilities
- →Determine the target folder for session archives
- →Capture in-session-only data like dollar cost to a raw file
- →Run a Python script to finalize session artifacts
- →Scaffold an analytics.md template for narrative analysis
- →Verify transcript scrubbing for sensitive information
How it works
The skill identifies a target folder, captures session data, and runs a Python script to process and archive the session's transcript and statistics. It also scaffolds an analytics file and verifies data scrubbing.
Inputs & outputs
When to use archive-session
- →Finalize development session
- →Archive feature work record
- →Store project statistics
About this skill
Archiving a development session
Run this at the end of a feature-development session, after the work is done but
before committing. It populates the feature's development/<YYYY-MM-DD-slug>/
folder with the record artifacts, then hands back to the user to commit.
Do the deterministic, secret-sensitive work (rendering, scrubbing, token math) via
development/finalize-session.py — never eyeball-redact a transcript yourself. This
skill's job is only to (a) figure out the target folder, (b) capture the two things
the script can't reach from outside a live session, and (c) run the script.
Steps
-
Determine the target folder. It is
development/<YYYY-MM-DD-slug>/for the feature just built. If the user passed a slug as the argument, usedevelopment/<that>/. Otherwise infer it from the activeSPEC.md, the git branch, or the feature under discussion; if it's ambiguous, ask the user. Create the folder if it doesn't exist. If prompts weren't saved yet, remind the user thatNN-*.prompt.mdfiles and anydesign-notes/are part of the record. -
Capture in-session-only data to a gitignored
*.raw.txtfile in the folder:- /usage (dollar cost) — you cannot invoke
/usageyourself (it's a built-in CLI command, not a tool). Ask the user to run/usageand paste its output, then save that verbatim to<dir>/usage.raw.txt. This is the source of the cost figure — the script has no price table. If the user skips it, proceed; the cost section will just say it wasn't captured.
The
.raw.txtfile is gitignored; the script folds its contents intostatistics.md. - /usage (dollar cost) — you cannot invoke
-
Run the script. From the repo root:
python development/finalize-session.py --dir development/<YYYY-MM-DD-slug> \ [--usage-capture development/<YYYY-MM-DD-slug>/usage.raw.txt] \ [--label NN]It defaults to the newest session JSONL under
~/.claude/projects/-workspace/. Pass--label NNonly for a feature spanning multiple sessions (producestranscript-NN.md/statistics-NN.md). Omit--usage-captureif you didn't create it. This writestranscript.md(scrubbed, committed),transcript.raw.md(gitignored), andstatistics.md(committed). -
Scaffold
analytics.mdin the folder if it doesn't already exist — a short template for the user's own narrative analysis (distinct from the auto-generatedstatistics.md, which is machine-written; do not hand-editstatistics.md):# Analytics — <feature> _Your narrative: what went well, what to do differently, decisions worth remembering._ -
Verify and report — do NOT commit. Confirm
transcript.mdscrubbed cleanly with a value-shaped grep (matches actual secret VALUES, not prose mentions of the names — a session that merely discussesSMTP_PASSWORDetc. is fine):grep -nE '(SMTP_PASSWORD|AWS_ACCESS_KEY_ID|AWS_SECRET_ACCESS_KEY|CLOUDFLARE_API_KEY|CLOUDFLARE_EMAIL)[[:space:]]*[=:][[:space:]]*[^[:space:]«]|AKIA[0-9A-Z]{16}|-----BEGIN [A-Z ]*PRIVATE KEY-----|Bearer [A-Za-z0-9._-]{12,}' development/<dir>/transcript.mdThis should return nothing; any hit is a real secret value that slipped the regex — surface it, don't commit. (A bare quoted word that happens to look like a token is left alone by design.) List what was written. Then tell the user the folder is ready and that they can ask you to commit everything (code +
development/<dir>/) in one commit, with you writing the commit message.
When not to use it
- →Before the work is done at the end of a feature-development session
- →When the user wants to eyeball-redact a transcript manually
- →When the user wants to commit before verification
Limitations
- →Requires user invocation at the end of a feature-development session
- →Cannot invoke /usage directly; requires user to paste output
- →Does not commit changes; hands back to the user for commit
How it compares
This skill automates the structured archiving and scrubbing of development session data, ensuring a consistent record, unlike manual collection and redaction.
Compared to similar skills
archive-session side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| archive-session (this skill) | 0 | 24d | No flags | Beginner |
| session-handoff | 13 | 2mo | Review | Beginner |
| spec-to-backlog | 8 | 3mo | No flags | Intermediate |
| create-handoff | 3 | 6mo | Review | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
You might also like
session-handoff
davila7
Creates comprehensive handoff documents for seamless AI agent session transfers. Triggered when: (1) user requests handoff/memory/context save, (2) context window approaches capacity, (3) major task milestone completed, (4) work session ending, (5) user says 'save state', 'create handoff', 'I need to pause', 'context is getting full', (6) resuming work with 'load handoff', 'resume from', 'continue where we left off'. Proactively suggests handoffs after substantial work (multiple file edits, complex debugging, architecture decisions). Solves long-running agent context exhaustion by enabling fresh agents to continue with zero ambiguity.
spec-to-backlog
atlassian
Automatically convert Confluence specification documents into structured Jira backlogs with Epics and implementation tickets. When Claude needs to: (1) Create Jira tickets from a Confluence page, (2) Generate a backlog from a specification, (3) Break down a spec into implementation tasks, or (4) Convert requirements into Jira issues. Handles reading Confluence pages, analyzing specifications, creating Epics with proper structure, and generating detailed implementation tickets linked to the Epic.
create-handoff
parcadei
Create handoff document for transferring work to another session
moai-workflow-project
modu-ai
Integrated project management system with documentation, language initialization, and template optimization modules. Use when setting up projects, generating documentation, configuring multilingual support, or optimizing templates.
granola-core-workflow-b
jeremylongshore
Post-meeting note processing and sharing workflow with Granola. Use when reviewing meeting notes, sharing with team members, or processing action items after meetings. Trigger with phrases like "granola post meeting", "share granola notes", "granola follow up", "process meeting notes", "granola action items".
reporting
comeredon
Final pipeline execution report format. Defines the structure, agent registry, Mermaid gantt chart, and change summary. Used by AnalystAgent in Phase 6.