session-export

session-export is a skill for Claude Code, Codex from crossoverJie/skills. It costs 45 tokens per session (827 once invoked), scanned A, original, Apache-2.0.

A workflow for exporting an AI chat session to a readable Markdown file, a plain-text document format. It supports exporting the conversation as-is and optionally creating a summary.

In plain words
What is it for?
Use it to save or synchronize chat sessions, export Claude Code logs, choose an output folder or filename, and optionally generate a summary.
Why use it?
It gives you a saved copy of a conversation for backup, sharing, or use in another coding tool. It can also exclude subagent conversations and limit lengthy tool output.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/crossoverjie/skills/session-export
Any agent
npx skills add crossoverJie/skills --skill session-export
Clone the repo
git clone --depth 1 https://github.com/crossoverJie/skills

Made for: Claude Code, Codex.

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

agentmods badge for session-export

README.md
[![agentmods](https://agentmods.dev/badge/skills/crossoverjie/skills/session-export.svg)](https://agentmods.dev/skills/crossoverjie/skills/session-export)
Your own site
<a href="https://agentmods.dev/skills/crossoverjie/skills/session-export"><img src="https://agentmods.dev/badge/skills/crossoverjie/skills/session-export.svg" alt="Measured on agentmods" height="20"></a>
Per session 45 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 827 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5 $0.00045 $0.00827
Opus 5 $0.00023 $0.00413
Sonnet 5 $0.00009 $0.00165
Haiku 4.5 $0.00005 $0.00083

Measured 3d ago against content hash 557a23183caa, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

session-export scanned grade A with 0 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 3d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (session_export.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/session-export/SKILL.md · 99 lines

How it starts

The opening of the file, as written. The whole thing — 99 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Session Export Skill

Exports AI chat session conversations to readable Markdown files. Supports two modes for cross-agent compatibility.

Prerequisites

  • Python 3 (standard library only, no external dependencies)

Usage

Mode 1: Claude Code Log Export (Preferred)

When running inside Claude Code, the script reads the full JSONL session logs for complete, accurate export (including messages that may have been compressed from context).

python3 skills/session-export/session_export.py --output-dir <directory> [options]
Options
  • --output-dir: Directory to save the exported markdown (env: SESSION_EXPORT_OUTPUT_DIR, default: current directory)
  • --cwd: Project working directory to locate session logs (default: current directory)
  • --session-id: Export a specific session ID (default: most recent)
  • --name: Custom filename for the exported markdown (without .md extension). AI should summarize the session topic as the name
  • --summarize: Request a summary to be generated after export
  • --no-subagents: Exclude subagent conversations
  • --max-tool-output: Max characters per tool output in export (default: 5000)
Examples

Export current session:

python3 skills/session-export/session_export.py --output-dir /tmp/sessions

Export a specific session:

python3 skills/session-export/session_export.py --session-id abc12345-... --output-dir ~/exports

Export without subagent conversations:

python3 skills/session-export/session_export.py --output-dir ./exports --no-subagents

Export with summary:

python3 skills/session-export/session_export.py --output-dir ./exports --summarize

Mode 2: AI Fallback Export

When the script exits with code 2 (Claude Code logs not found), the AI should fall back to writing the conversation directly from its current context:

  1. Create a markdown file in the specified output directory using the same format:
    • YAML frontmatter with session_id, project, exported_at, message_count, export_mode: ai-context
    • Each message as ## User / ## Assistant with timestamps if available
    • File named session-fallback-<YYYY-MM-DD-HHMMSS>.md
  2. Write each message from the current conversation context verbatim
  3. Note: messages compressed from context earlier in the conversation may be lost in this mode

Read the full file on GitHub · 99 lines

Files

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.

Changes

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.

  1. 3d ago First seen · 99 lines · 45 tokens per session scan A 557a23183caa

Subscribe to this mod's changes

session-export is a skill published in the GitHub repository crossoverJie/skills (19 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 45 tokens to every session and 827 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

gog-cli

Use this skill whenever the user wants to operate Google Workspace from the command line with gog/gogcli, including Gmail, Calendar, Drive, Docs, Sheets, Slides, Forms, Apps Script, Chat, Classroom, Contacts, Tasks, People, Groups, Admin, Keep, auth, configuration, scripting, or agent-safe Google automation. Prefer…

intellectronica/agent-skills · 124 tokens

chinese-pdf-document-workflows

Class-level workflow for extracting, converting, editing, and producing polished Chinese PDFs and document reports from PDFs, papers, webpages, markdown, and video transcripts. Use when asked to create Chinese PDF reports, fix Chinese font/glyph rendering, summarize academic papers into Chinese insight reports…

davidtoby/agent-skills · 83 tokens

agent-qa-authoring

Create, edit, validate, and run Agent QA tests, suites, and hooks through MCP or CLI while preserving canonical IDs and schema contracts.

ranbot-ai/awesome-skills · 34 tokens

akf-trust-metadata

The AI native file format. EXIF for AI — stamps every file with trust scores, source provenance, and compliance metadata. Embeds into 20+ formats (DOCX, PDF, images, code). EU AI Act, SOX, HIPAA aud.

ranbot-ai/awesome-skills · 59 tokens

docx

Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files). Triggers include: any mention of "Word doc", "word document", ".docx", or requests to produce professional documents with formatting like tables of contents, headings, page numbers, or letterheads. Also use when…

agentscope-ai/QwenPaw · 168 tokens

docx

当用户需要创建、读取、编辑或处理 Word 文档(.docx)时,使用此技能。触发场景包括提到“Word 文档”、“.docx”,或要求生成带目录、标题、页码、信头等格式的专业文档;也包括提取或重组 .docx 内容、插入或替换图片、在 Word 文件中查找替换、处理修订或批注,以及将内容整理为正式 Word 文档。如果用户要求生成“报告”“备忘录”“信函”“模板”等 Word / .docx 交付物,也应使用此技能。不要用于 PDF、电子表格、Google Docs,或与文档生成无关的一般编程任务。.

agentscope-ai/QwenPaw · 161 tokens