Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
By rlancemartinv1.0.0MIT
Turns sessions into diary entries, then reflects across them to update your CLAUDE.md with recurring preferences. An optional PreCompact hook writes diary entries automatically before long sessions compact.
Trending plugins
7-day copy clicks
You run one by typing its /name in Claude Code.
No risk signals detected
Nothing flagged in this plugin's hooks, MCP servers or commands. Other components are not analyzed.
Static checks of hooks, mods, MCP servers and commands. Not a security audit.
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Generated from the plugin's indexed repository (rlancemartin/claude-diary) — no native marketplace selected
npx claudepluginhub p/rlancemartin-claude-memoryA long-term memory plugin for Claude Code that learns from your activity over time and continuously improves Claude's understanding of your preferences, patterns, and workflows.
CLAUDE.md with observed patterns and preferencesRead more: Blog post
git clone https://github.com/rlancemartin/claude-diary claude-diary
cd claude-diary
cp commands/*.md ~/.claude/commands/
mkdir -p ~/.claude/hooks
cp hooks/pre-compact.sh ~/.claude/hooks/pre-compact.sh
chmod +x ~/.claude/hooks/pre-compact.sh
Configure the hook in settings:
Add the following to ~/.claude/settings.json (global) or .claude/settings.local.json (project-specific):
{
"hooks": {
"PreCompact": [
{
"matcher": "auto",
"hooks": [
{
"type": "command",
"command": "bash ~/.claude/hooks/pre-compact.sh"
}
]
}
]
}
}
Alternatively, use the interactive command:
/hooks
Then select PreCompact event, auto matcher, and enter bash ~/.claude/hooks/pre-compact.sh as the command.
Use the system:
/diary after important sessions (or let the PreCompact hook auto-generate)/reflect to analyze patternsCLAUDE.md automatically updated with learningsCLAUDE.md files serve as long-term memory for Claude Code. But, they are typically updated manually (e.g., via the # shortcut or /memory command). This plugin aims to automates the process of updating CLAUDE.md with the learnings from your activity over time. It is inspired by an interview between Dan Shipper and Cat Wu / Boris Cherny from the Claude Code team, which mentions that some Anthropic employees have started generating diary entries for Claude sessions and performing reflection over them. The approach follows that general flow, and also borrows ideas from the Generative Agents paper, which introduces a memory architecture with three key components:
/reflect command)The /diary command creates diary entries from the current session. It uses a context-first approach, reflecting on the conversation already in Claude Code's context, but can also parse JSONL transcripts, which are logged for each session to the project directory. See diary.md for details. The diary command can be run in two ways:
/diary anytime to capture important context in the current sessionThe command instructs Claude to create diary entries by reflecting on the conversation history in context (user messages, tool invocations, files modified, errors, solutions). It then instructs Claude to write the diary entry to a file in the ~/.claude/memory/diary/ directory as a markdown file with sections for task summary, work done, design decisions, user preferences, code review feedback, challenges, solutions, and code patterns. It instructs Claude to be factual and specific, capture the "why" behind decisions, document ALL user preferences (especially commits/PRs/linting/testing), include failures as learning. The output location is ~/.claude/memory/diary/YYYY-MM-DD-session-N.md.
The /reflect command analyzes diary entries to identify patterns and automatically updates CLAUDE.md. See reflect.md for details. The reflect command can be run in manually in any session; run /reflect anytime you have accumulated diary entries and want to update CLAUDE.md with new learnings.
Built from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.
Plugins from other owners that cover similar ground