DEV Community

Cover image for clerk: Auto-Summarize Your Claude Code Sessions
Vulcan Shen
Vulcan Shen

Posted on • Edited on

clerk: Auto-Summarize Your Claude Code Sessions

What is clerk

clerk is a CLI tool that hooks into Claude Code. Every time a session ends, it generates an incremental summary and saves it as a plain markdown file. Over time, your sessions become a searchable, organized knowledge base.

brew install vulcanshen/tap/clerk
clerk install
Enter fullscreen mode Exit fullscreen mode

After that, it runs silently. No commands to remember, no habits to build.

What it solves

Claude Code has no memory across sessions. When you need to look back — recover context, search past work, or generate a report — there's nothing to work with.

You could ask Claude to re-read old transcripts, but each time it re-processes the entire raw conversation, burning tokens. Across multiple sessions and projects, that's expensive and slow.

clerk does one API call per session at the moment it ends. By the time you need a report, everything is already summarized.

What you can do with it

Weekly reports

clerk report --days 7
Enter fullscreen mode Exit fullscreen mode

Reads all summaries from the past 7 days, sends them to Claude, outputs a structured report with summary, by-date, and by-project views. One command, one API call.

Context recovery

Type /clerk-resume in Claude Code. clerk returns your past summaries and transcript paths so Claude can rebuild context without you hunting for session IDs.

Search

Type /clerk-search in Claude Code. Search past work by keyword across all projects using AI semantic matching.

Daily summaries

Automatic. Every session end produces an incremental summary, organized by date and project:

~/.clerk/summary/
├── 20260414/
│   ├── my-api-server.md
│   └── frontend-app.md
└── 20260418/
    └── my-api-server.md
Enter fullscreen mode Exit fullscreen mode

How it works

Session ends → clerk feed (background) → read transcript → call claude -p → save summary + index
Enter fullscreen mode Exit fullscreen mode
  • Hooks into Claude Code via SessionStart/SessionEnd hooks
  • Cursor tracking — only processes new messages since last run
  • MCP server for /clerk-resume and /clerk-search integration
  • Single Go binary, no dependencies beyond Claude Code

Your data, your tools

All output is plain markdown with YAML frontmatter. No proprietary format, no lock-in.

Your files work with any text editor, Obsidian, Notion, grep, or your own scripts. If you uninstall clerk and Claude Code, your summaries remain — organized, searchable, and linked.

Everything runs locally. No remote services, no accounts, no data leaving your machine.

Install

# Homebrew
brew install vulcanshen/tap/clerk

# Or install script
curl -fsSL https://raw.githubusercontent.com/vulcanshen/clerk/main/install.sh | sh

# Or from source
go install github.com/vulcanshen/clerk@latest
Enter fullscreen mode Exit fullscreen mode

Then run clerk install to set up hooks, MCP server, and skills.

Cross-platform: macOS, Linux, Windows.


GitHub: github.com/vulcanshen/clerk

Top comments (0)