/cf-session
Medium~1K–2.5K tokens injected into promptSave the current Claude Code session to "docs/sessions/" so it can be resumed on another machine.
Context footprint: ⚡⚡ (medium) — what does this mean?
The /cf-session skill saves your current Claude Code conversation to docs/sessions/ so you can resume it on another machine using cf session load + claude --resume.
Usage
/cf-session [label]
The optional label helps you identify the session later. If omitted, it defaults to session-YYYY-MM-DD.
How It Works
- Resolves Sessions Folder — Uses
docs/sessions/in the current project. This folder is created bycf init— if it doesn't exist yet, the skill creates it automatically as a fallback. - Detects Active Session — Finds the most recently modified JSONL session file for the current project.
- Labels the Session — Uses
$ARGUMENTSas the label, or prompts you to provide one. - Builds Preview — Extracts the first user message as a short preview for later identification.
- Saves to Sessions Folder — Copies the JSONL file and writes a
meta.jsonwith session metadata. - Confirms — Reports the saved location and how to resume.
Examples
/cf-session
# Saves with default label: session-2025-03-06
/cf-session refactor auth flow
# Saves with label: refactor auth flow
Resuming on Another Machine
Sync the docs/sessions/ folder to another machine (via git, Dropbox, etc.), then:
cf session load
# Lists saved sessions and copies the selected one to ~/.claude/projects/
claude --resume <session-id>
# Resumes the conversation in Claude Code
Sessions Folder Structure
docs/sessions/
<label-slug>/
session.jsonl # Full conversation history
meta.json # Session ID, label, project path, machine, timestamp, preview
Folder names are derived from the session label (slugified to lowercase alphanumeric + dashes). The Claude session ID is stored in meta.json for claude --resume.
This folder is created by cf init alongside docs/plans/, docs/memory/, docs/research/, and docs/learn/. It is added to .gitignore during cf init if you choose to ignore docs artifacts.
Privacy Warning
Session files contain your full conversation history, including code, file contents, and any sensitive context from the session. Be careful when syncing this folder — ensure it is not publicly accessible.
When to Use
- Switching between machines mid-session
- Saving a long debugging session to continue later
- Preserving context before a machine reset or reinstall