A Claude Code skill that gives your AI persistent memory across sessions using Apple Notes.
macOS only — requires Apple Notes and AppleScript.
Claude Code sessions are stateless. Every time a session ends, all context vanishes. The next session starts from zero — no memory of what was done, what's in progress, or what decisions were made.
This skill writes structured handoff notes to Apple Notes before each session ends, and reads them back at the start of the next session via a SessionStart hook. It's like leaving yourself a sticky note, except the AI does it automatically.
Session ends
↓
┌─────────────────────────────────────────┐
│ [Private] Session Handoff — {AgentID} │ ← per-agent working state
│ [Shared] Session Handoff — Shared │ ← cross-agent sync
└─────────────────────────────────────────┘
↓ old content archived
┌─────────────────────────────────────────┐
│ [Archive] Session Handoff — Archive │ ← rolling history
└─────────────────────────────────────────┘
↓ weekly consolidation
┌─────────────────────────────────────────┐
│ [Long-term] MEMORY.md / memory files │ ← distilled knowledge
└─────────────────────────────────────────┘
| Tier | Storage | Lifecycle |
|---|---|---|
| Active | Private + Shared notes | Overwritten each session |
| Archive | Archive note | Rolling, keeps last 5 entries |
| Long-term | MEMORY.md / memory files | Permanent, distilled patterns |
If you run Claude Code on multiple machines (e.g., a laptop for interactive dev + a server for unattended tasks), each agent gets its own private note while sharing a common note for cross-agent coordination.
Single-agent mode is also supported — just skip the shared note.
npx skills add fredchu/claude-session-handoffYou need an MCP server that can read/write Apple Notes. For example: apple-notes-mcp
claude mcp add --scope user apple-notes -- npx -y apple-notes-mcpCopy the example hook and set your agent name:
cp hooks/session-start.sh ~/.claude/hooks/session-start.sh
chmod +x ~/.claude/hooks/session-start.sh
# Edit AGENT_ID and NOTES_FOLDER in the scriptAdd to .claude/settings.json:
{
"hooks": {
"SessionStart": [
{
"type": "command",
"command": "~/.claude/hooks/session-start.sh"
}
]
}
}Add to your user-level CLAUDE.md (~/.claude/CLAUDE.md):
## Session Handoff Config
- Agent ID: Main
- Notes folder: Claude Workspace
- Other Agents: (leave empty for single-agent mode)
- Private budget: 1500 chars
- Shared budget: 1000 chars
## Session Handoff Rules
- When user says "bye", "done", "handoff", "收工", or "結束" → run `/session-handoff`
- Do NOT skip even if "nothing was done" this sessionJust say "bye" or "handoff" at the end of your session. The skill will:
- Archive the previous handoff content
- Write new private + shared notes
- Consolidate weekly if archive has 5+ entries
- Spot check for lessons worth saving to long-term memory
This session's output
↓
Does another agent need to know?
├── Yes → Shared note
└── No → Private note
- Private: feature branches, environment-specific issues, this machine only
- Shared: cross-agent project state, user decisions, environment sync status
Notes are kept compact to minimize token usage when injected at session start:
| Note | Budget |
|---|---|
| Private | 1500 chars |
| Shared | 1000 chars |
| Total injected | ~2500 chars |
- Native to macOS — no extra infra
- Syncs across devices via iCloud
- Full-text search
- Folders for organization
- MCP servers available
MIT