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.zip

Installs 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.
196 charsno explicit “when” trigger
Beginner

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

You give it
Current Claude session context and user-provided usage data
You get back
Archived session artifacts in development/<date-slug>/ directory

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

  1. 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, use development/<that>/. Otherwise infer it from the active SPEC.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 that NN-*.prompt.md files and any design-notes/ are part of the record.

  2. Capture in-session-only data to a gitignored *.raw.txt file in the folder:

    • /usage (dollar cost) — you cannot invoke /usage yourself (it's a built-in CLI command, not a tool). Ask the user to run /usage and 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.txt file is gitignored; the script folds its contents into statistics.md.

  3. 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 NN only for a feature spanning multiple sessions (produces transcript-NN.md / statistics-NN.md). Omit --usage-capture if you didn't create it. This writes transcript.md (scrubbed, committed), transcript.raw.md (gitignored), and statistics.md (committed).

  4. Scaffold analytics.md in the folder if it doesn't already exist — a short template for the user's own narrative analysis (distinct from the auto-generated statistics.md, which is machine-written; do not hand-edit statistics.md):

    # Analytics — <feature>
    
    _Your narrative: what went well, what to do differently, decisions worth remembering._
    
  5. Verify and report — do NOT commit. Confirm transcript.md scrubbed cleanly with a value-shaped grep (matches actual secret VALUES, not prose mentions of the names — a session that merely discusses SMTP_PASSWORD etc. 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.md
    

    This 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.

SkillInstallsUpdatedSafetyDifficulty
archive-session (this skill)024dNo flagsBeginner
session-handoff132moReviewBeginner
spec-to-backlog83moNo flagsIntermediate
create-handoff36moReviewIntermediate

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.

1370

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.

868

create-handoff

parcadei

Create handoff document for transferring work to another session

331

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.

29

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".

00

reporting

comeredon

Final pipeline execution report format. Defines the structure, agent registry, Mermaid gantt chart, and change summary. Used by AnalystAgent in Phase 6.

00

Search skills

Search the agent skills registry