session-sync
Skill4 starsChanged 9 months agoMITView on GitHub
Export Claude Code JSONL sessions to searchable markdown with lifecycle management and optional QMD indexing. Use when users ask to sync, export, browse, resume, search, back up, or annotate Claude Code session history.
2 other projects use a version of this.
Adopted by
Most recently taken up by
- UnicodeDigital/claude-skillstheir own version, first seen Nov 8, 2026
- syugoji/agent-skills-packtheir own version, first seen Jul 22, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- UnicodeDigital/claude-skills★ 1same name
- syugoji/agent-skills-pack★ 0same name
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.
In this repository3 other files it gives its agents.
- gitlab-self-hostedSkill
- handoffSkill
- recallSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 16
Do not assume the agent's cwd is the skill directory.
- Very specific: line 73
Use procedures/setup.md for first-time setup, procedures/setup-hook.md for Stop hook setup, and procedures/install-qmd.md for QMD …
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Session Sync
Export Claude Code sessions to project-organized markdown under {target_folder}/Claude-Sessions/{project}/. The script supports full conversation export, QMD keyword/semantic search, lifecycle annotations, resume helpers, skills detection, artifacts, and re-sync preservation.
Script Path
Do not assume the agent's cwd is the skill directory. Resolve the script path from the installed skill location:
SCRIPT="/path/to/session-sync/scripts/session-sync.py"
python3 "$SCRIPT" statusCommon installed paths:
- Global Claude Code skill:
~/.claude/skills/session-sync/scripts/session-sync.py - Project skill:
.claude/skills/session-sync/scripts/session-sync.py - This repository:
skills/session-sync/scripts/session-sync.py
Commands
| Command | Description |
setup | Print setup steps for the current script path |
status | Show target folder, Claude projects dir, QMD status, exports, hook status |
sync | Sync current session from Stop hook stdin or CK_SESSION_ID / CLAUDE_SESSION_ID |
export | Export sessions. Filters: --all, --days N, --project NAME, --since YYYY-MM-DD |
config | Set --target-folder, --claude-home, --projects-dir, --settings-file, --auto-sync, --collection-name |
list-projects | List available Claude Code project directories and session counts |
list | Browse exported sessions. --active default, --all, --json |
resume | Resume in Claude Code. Use --pick, --active, --fork, --all, or pass a markdown file path |
note TEXT | Append timestamped note to a session. Supports --session-id |
close [TEXT] | Mark a session done with optional closing note. Supports --session-id |
log [TEXT] | Update lifecycle fields. Supports --status, --tags, --rating, --session-id |
index | Re-index exported sessions in QMD |
search QUERY | BM25 keyword search via QMD. Use -n for result count |
vsearch QUERY | Semantic vector search via QMD. Use -n for result count |
Generic Configuration
Config lives beside the skill at config.json.
| Key | Default | Description |
target_folder | ~/Documents when empty | Parent folder for Claude-Sessions/ |
claude_home | ~/.claude when empty | Claude Code home directory |
projects_dir | {claude_home}/projects when empty | JSONL transcript directory |
settings_file | {claude_home}/settings.json when empty | Settings file used to detect hook status |
qmd_path | qmd when empty | QMD executable name/path |
collection_name | claude-sessions | QMD collection name |
auto_sync | false | Declarative flag updated after hook setup |
Examples:
python3 "$SCRIPT" config --target-folder "$HOME/Documents"
python3 "$SCRIPT" config --claude-home "$HOME/.claude"
python3 "$SCRIPT" config --projects-dir "/custom/claude/projects"
python3 "$SCRIPT" config --settings-file "/custom/claude/settings.json"Core Procedures
Use procedures/setup.md for first-time setup, procedures/setup-hook.md for Stop hook setup, and procedures/install-qmd.md for QMD installation.
Export
python3 "$SCRIPT" export --all
python3 "$SCRIPT" export --days 30
python3 "$SCRIPT" list-projects
python3 "$SCRIPT" export --project my-project
python3 "$SCRIPT" export --since 2026-04-01Browse, Resume, Annotate
python3 "$SCRIPT" list --active
python3 "$SCRIPT" list --all
python3 "$SCRIPT" resume --pick
python3 "$SCRIPT" resume --active
python3 "$SCRIPT" note "Follow-up context"
python3 "$SCRIPT" log --status blocked --tags "handoff,debugging" "Waiting for access"
python3 "$SCRIPT" close "Done"Status values: active, done, blocked, handoff.
Search
python3 "$SCRIPT" index
python3 "$SCRIPT" search "authentication" -n 10
python3 "$SCRIPT" vsearch "how did we fix the database issue" -n 5Output
Markdown files are written to:
{target_folder}/Claude-Sessions/{project-name}/YYYY-MM-DD-HHMM-{session_id_prefix}.mdRe-export preserves title, status, tags, rating, comments, and ## My Notes. Fresh extraction updates messages, timestamps, conversation, summary, skills, and artifacts. Conversation content is not truncated.
References
procedures/setup.md- First-time setupprocedures/setup-hook.md- Stop hook configurationprocedures/install-qmd.md- QMD installationreferences/schema.md- Exported markdown schemaschema/tags.yaml- Suggested lifecycle tags
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.

