Listen to today's AI briefing

Daily podcast — 5 min, AI-narrated summary of top stories

Clerk: Auto-Summarize Every Claude Code Session into Searchable Markdown
Open SourceScore: 87

Clerk: Auto-Summarize Every Claude Code Session into Searchable Markdown

Install Clerk to automatically generate Markdown summaries of every Claude Code session, making your debugging, research, and architecture decisions searchable across projects.

GAla Smith & AI Research Desk·3h ago·3 min read·3 views·AI-Generated
Share:
Source: github.comvia hn_claude_code, reddit_claudeCorroborated
Clerk: Auto-Summarize Every Claude Code Session into Searchable Markdown

What Clerk Does

Laravel’s Claude Code Plugin Arrives: What It Does and How to Use It ...

Clerk is a local-first tool that automatically summarizes your Claude Code sessions into plain Markdown files with YAML frontmatter. When you close a Claude Code session, Clerk makes one API call to generate an incremental summary that's stored locally on your machine. No remote services, no accounts, no data leaves your laptop.

The tool creates three types of files:

  • sessions/ - Raw session tracking
  • summary/ - Markdown summaries of each session
  • index/ - Searchable indexes

Setup - One Command

clerk install

That's it. Clerk hooks into Claude Code and works silently in the background. Once installed, every session is automatically summarized, indexed, and searchable without any additional commands or habit changes.

How To Use It

Daily Workflow (Automatic)

Nothing changes in your daily workflow. You work in Claude Code as usual. When you close a session, Clerk automatically:

  1. Captures the session end
  2. Generates a summary via Claude API
  3. Stores it as Markdown with YAML frontmatter
  4. Updates the search index

Weekly Reporting

Instead of trying to reconstruct your week from memory or git logs, run:

clerk report --days 7

This reads all the summaries from the past week and generates a structured report in one shot. No need to manually resume old sessions or burn tokens re-reading entire transcripts.

Session Search and Resume

Clerk includes MCP servers that integrate directly with Claude Code:

  • /clerk-resume - Resume any past session from your summaries
  • /clerk-search - Search across all your session summaries

These commands work within Claude Code itself, letting you reference past work without leaving your current session.

Why Plain Markdown Matters

Getting Started with Claude Code

Clerk's summaries use plain Markdown with YAML frontmatter, which means:

  • No lock-in: If you uninstall Clerk tomorrow, your summaries are still readable
  • Universal compatibility: Works with any text editor (vim, VS Code, Sublime)
  • Tool integration: Obsidian's graph view and tag pane work out of the box
  • Easy import: Import directly into Notion or other tools
  • CLI friendly: Search with grep, ripgrep, or your own scripts

The Token Economics

Without Clerk, looking back at past work requires:

  1. Finding the right session ID
  2. Loading it with claude code --resume <session-id>
  3. Asking Claude to summarize the entire transcript
  4. Repeating for every session across every project

Each time, Claude re-reads the entire raw transcript, burning tokens to reconstruct what could have been saved in a single markdown file. Clerk's approach uses one API call per session at the moment it ends, producing incremental summaries that are far more token-efficient.

When Clerk Shines

  1. Weekly reporting - Generate comprehensive reports without manual effort
  2. Cross-session debugging - Search for when you solved similar problems before
  3. Architecture decisions - Track trade-off discussions you've already forgotten
  4. Project handoffs - Share summarized context with team members
  5. Personal knowledge base - Build a searchable record of your development learning

Installation and Requirements

Clerk is available on GitHub and requires:

  • Claude Code installed and configured
  • Claude API access (for summary generation)
  • Local storage for your session summaries

Since it runs entirely locally, you maintain complete control over your data while getting the benefits of automated session summarization.

Following this story?

Get a weekly digest with AI predictions, trends, and analysis — free.

AI Analysis

Claude Code users should install Clerk immediately if they work across multiple sessions or projects. The tool addresses a fundamental limitation of Claude Code: session isolation. Instead of losing context when you close the terminal, Clerk preserves the most valuable parts of each session in a format you can actually use. Change your workflow: Stop trying to remember what you did last week. Run `clerk report --days 7` every Friday afternoon. Use `/clerk-search` within Claude Code when you're debugging something that feels familiar—chances are you've already discussed it with Claude in a previous session. Most importantly, Clerk's plain Markdown output means you're not creating yet another proprietary knowledge base. Your summaries will remain usable even if you stop using Clerk or Claude Code. This aligns with the local-first, developer-controlled philosophy that makes Claude Code appealing in the first place.

Mentioned in this article

Enjoyed this article?
Share:

Related Articles

More in Open Source

View all