Save current session transcript to markdown with per-turn token counts, cost breakdown, and context usage.
Scanned 9/9/2026
Install to Claude Code
npx -y skills add AI-native-Systems-Research/ai-native-storage-certus --skill save --agent claude-codeInstalls into .claude/skills of the current project.
Are you the author of Save?
Add the live security badge to your README — it updates automatically with every re-scan.
[](https://www.skillsdirectory.com/skills/ai-native-systems-research-save)More formats (shields.io, HTML) on the badges page.
---
name: save
description: Save current session transcript to markdown with per-turn token counts, cost breakdown, and context usage.
allowed-tools: Bash(*)
argument-hint: "[output_path]"
---
Save the current Claude Code session transcript as a markdown file with token usage, cost stats (/cost), and context window utilization (/context). Never overwrites existing files — appends -1, -2, etc. suffixes.
The user may pass an optional output path as an argument. If provided, use it as OUT. Otherwise default to the current directory.
## Steps
1. Find the most recent session JSONL. Try exact project key first, then fall back to the most recently modified JSONL across all projects (which is almost certainly this session):
```bash
PROJECT_KEY=$(pwd | sed 's|/|-|g')
JSONL=$(ls -t ~/.claude/projects/${PROJECT_KEY}/*.jsonl 2>/dev/null | head -1)
if [[ -z "$JSONL" ]]; then
JSONL=$(find ~/.claude/projects/ -maxdepth 2 -name '*.jsonl' -printf '%T@ %p\n' 2>/dev/null | sort -rn | head -1 | cut -d' ' -f2-)
fi
if [[ -z "$JSONL" ]]; then
echo "No session JSONL found" >&2
exit 1
fi
echo "JSONL: $JSONL"
```
2. Determine output path — use the argument if provided, otherwise save to current directory. If the argument is a directory, create the transcript file inside it:
```bash
SESSION_ID=$(basename "$JSONL" .jsonl)
DATE=$(date +%Y-%m-%d)
DEFAULT_NAME="transcript_${SESSION_ID}_${DATE}.md"
if [[ -n "$ARGUMENTS" ]]; then
if [[ -d "$ARGUMENTS" ]]; then
OUT="${ARGUMENTS%/}/${DEFAULT_NAME}"
else
OUT="$ARGUMENTS"
fi
else
OUT="$(pwd)/${DEFAULT_NAME}"
fi
```
3. Find and run the save script relative to the repo root:
```bash
SAVE_SCRIPT="$(git rev-parse --show-toplevel 2>/dev/null)/.claude/skills/save/save.sh"
if [[ ! -f "$SAVE_SCRIPT" ]]; then
echo "save.sh not found at: $SAVE_SCRIPT" >&2
exit 1
fi
bash "$SAVE_SCRIPT" "$JSONL" "$OUT"
```
4. Report the output path and total estimated cost.
Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.
No comments yet. Be the first to comment!