A Claude skill that generates a detailed, structured session archive in markdown for long-term logging and cross-session handoff.
SaferSkills independently audited session-detail (Agent Skill) and scored it 92/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 2 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 2 flagged
The text {match} tells the agent to skip the normal "ask the user first" gate. Used adversarially it removes the human-in-the-loop check before destructive or sensitive actions, turning a normally-gated agent into a fire-and-forget executor.
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Do not ask the user to paste the conversation. You already have it in context. The only question you may ask is the single ambiguity prompt described in Mode Resolution below.
STRICT OUTPUT RULE: Generate exactly two sections -- `<session_full>` and `<context_updates>`. No other sections.
This skill is chat-only in every tool. It prints the archive to chat. It never writes to disk. (The separate Claude Code slash command is the file-writing form; this skill is not.) When you produce output, include a Suggested filename: line so the user can save it manually if they wish.
Determine which tool you are running in and set the filename prefix:
$CLAUDE_SESSION_ID are available. Prefix is code.cowork.claude.If you cannot tell Cowork from Claude.ai, default the prefix to claude.
_sessions/ for a checkpoint whose marker session= equals the current $CLAUDE_SESSION_ID. (This skill reads to detect; it still does not write.)<session_full> block that you generated earlier in this same conversation.seq=1.seq = prior seq + 1.$CLAUDE_SESSION_ID is unavailable and only a same-date file exists, or a checkpoint appears in context that may have been pasted in from a different conversation) -> ASK exactly one line and wait:A prior session-detail checkpoint exists but I cannot confirm it is from this same session. Generate (i)ncremental from it, or (f)ull? [f]: Default to FULL on an empty or unclear reply.
For an INCREMENTAL, capture only what happened AFTER the prior checkpoint's generated point. Do not repeat anything already captured in the prior checkpoint. Begin the archive body with one line: Incremental checkpoint, seq <n>, continues from <prior label> generated <time>. Covers only work since that point.
If the prior checkpoint is missing from context (for example it was compacted out on a long conversation), say so in one line, then produce a FULL rather than guessing at a boundary.
YYYY-MM-DD-HH-MM for now. On Claude Code use date "+%Y-%m-%d-%H-%M"; elsewhere use the current time.01 (best-effort, since there is no disk to count).<prefix>-<YYYY-MM-DD-HH-MM>-SESSION-<##> for a full, or <prefix>-<YYYY-MM-DD-HH-MM>-SESSION-<##>-INC-<NN> for an incremental (NN starts at 02).code-2026-06-20-09-15-session-01-inc-02.md.Place this marker as the very first line inside <session_full>, before the # Session heading: <!-- session-detail | tool=<prefix> | session=<key> | seq=<n> | generated=<YYYY-MM-DD-HH-MM> --> where <key> is $CLAUDE_SESSION_ID on Claude Code (or unverified-<timestamp> if unavailable), and the first user message timestamp on Claude.ai or Cowork.
Output must be pure markdown only, clean and copy-paste ready. No preamble, no meta-commentary above the blocks. Deliver the archive and close with the single line specified in Closing Line.
Generate exactly two sections using the exact XML tags below. No other sections. All content inside the tags must be properly formatted Markdown.
Required sections:
<session_full> -- Full Version<context_updates> -- Context Updates<session_full> <!-- session-detail | tool=[code|claude|cowork] | session=[key] | seq=[n] | generated=[YYYY-MM-DD-HH-MM] -->
Date: [YYYY-MM-DD] Suggested filename: [prefix-yyyy-mm-dd-hh-mm-session-##.md, or -inc-NN.md for an incremental] Duration: [HH hours MM minutes, or omit if not determinable]
[Each item with specific details: what was built, fixed, or configured. Be thorough.]
[For each significant decision:]
[For each issue:]
[For each significant prompt or task in the session:]
[For each prompt generated during this session but NOT executed -- these are prompts created for future work, including Claude Code prompts, fix prompts, audit prompts, or any prompt drafted but deferred. CAPTURE THE FULL BODY VERBATIM, not just a name. Without the full body, the prompt is unrecoverable next session.]
Intent: [What problem this prompt is meant to solve] Suggested filename: [e.g., docs/prompts/fix-checkbox-table-width.md] Target session/phase: [When this should run] Full prompt body:
[Paste the entire prompt body verbatim, including code blocks, constraints, and output requirements. Do not summarize. Do not abbreviate.][Repeat block above for each generated prompt. If no prompts were generated for next session, write "None this session."]
[Implementation details, patterns, configurations, or technical context worth preserving.]
[Key project facts, decisions, and context that should persist across conversations.]
</session_full>
<context_updates>
[Any new project facts, configurations, or constraints established this session that must carry forward. List each as a bullet with enough context to be self-explanatory without the conversation.]
[Any previously held assumptions or facts that were corrected or superseded this session. Format: "OLD: [what was believed] -> NEW: [what is now true]".]
[Decisions made this session that are final and should not be relitigated. Include the rationale in one sentence so future sessions understand the why.]
[Unresolved questions or ambiguities that surfaced this session and need answers before or during the next session.]
[Any known risks, blockers, or gotchas that the next session should be aware of before starting.] </context_updates>
After both sections, output exactly this line (substituting the session ID):
Output ready. Session [SESSION-ID] archived.
[What was decided].Suggested filename: line. Only the separate Claude Code slash command writes files to _sessions/.~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.