From davidshaevel-claude-toolkit
Use at the start and end of every coding session, or when switching between Claude Code and Cursor, to maintain cross-agent memory persistence via SESSION_LOG.md
How this skill is triggered — by the user, by Claude, or both
Slash command
/davidshaevel-claude-toolkit:session-handoffThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Read and write SESSION_LOG.md for cross-agent memory persistence. Enables seamless switching between Claude Code and Cursor sessions.
Read and write SESSION_LOG.md for cross-agent memory persistence. Enables seamless switching between Claude Code and Cursor sessions.
This skill is used automatically:
SESSION_LOG.md exists in the project root.bare/ directory exists at cwd — if so, this is a bare+worktree repogit worktree list to discover all worktreesGrep pattern="Active work:" glob="**/SESSION_LOG.md" output_mode="content"
Do NOT use bash for loops, shell grep, find, or piped commands to scan worktrees — these complex commands can't be pattern-matched by the command allowlist and cause repeated approval prompts every session. Always prefer built-in tools (Grep, Glob, Read) over bash equivalents for file scanning."${CLAUDE_PLUGIN_ROOT}/scripts/backup-local-config.sh" /path/to/repo
Replace /path/to/repo with the project root. If the backup fails, log the error but do not block the session handoff.git worktree list)"${CLAUDE_PLUGIN_ROOT}/scripts/backup-local-config.sh" /path/to/repo-root
Replace /path/to/repo-root with the bare repo root (the directory containing .bare/). This backs up files from all worktrees in a single call. If the backup fails, log the error but do not block the session handoff.When a feature worktree is being removed after a PR merge, the worktree's session history must be merged into main's SESSION_LOG.md — never copied with cp.
Merge process:
main/SESSION_LOG.md Session History entries<worktree>/SESSION_LOG.md Session History entriesmain/SESSION_LOG.mdImportant: Do NOT use cp <worktree>/SESSION_LOG.md main/SESSION_LOG.md — this destroys session history from other worktrees that was previously merged into main.
When a feature worktree is being removed after a PR merge, the worktree's .envrc must be merged into main's .envrc — never copied with cp.
.envrc is a flat key=value shell file. Compare line by line.
Merge process:
main/.envrc<worktree>/.envrc# MERGE CONFLICT: worktree had "<worktree value>"main/.envrcImportant: Do NOT use cp <worktree>/.envrc main/.envrc — main's copy may contain updates made independently while the feature worktree was active.
When a feature worktree is being removed after a PR merge, the worktree's CLAUDE.local.md must be merged into main's CLAUDE.local.md — never copied with cp.
CLAUDE.local.md is a structured markdown document with tables and sections. Unlike SESSION_LOG.md, it is not chronological — it requires section-by-section comparison.
Merge process:
main/CLAUDE.local.md<worktree>/CLAUDE.local.md[account ID or name] or ...), keep the version with real content<!-- MERGE CONFLICT: worktree had "value" -->main/CLAUDE.local.mdImportant: Do NOT use cp <worktree>/CLAUDE.local.md main/CLAUDE.local.md — main's copy may contain updates made independently while the feature worktree was active.
# Session Log
## Current State
- Agent: [Claude Code | Cursor]
- Branch: [current branch]
- Last session: [YYYY-MM-DD HH:MM]
- Active work: [issue ID and description]
- Blockers: [list or "None"]
- Next steps: [bullet list]
## Session History
### YYYY-MM-DD HH:MM — [Agent Name]
**What was done:**
- [bullet list]
**Decisions made:**
- [bullet list]
**Open questions:**
- [list or "None"]
Last session: in Current State and every session history heading MUST include HH:MM (24-hour local time), not just the date. Run date +"%Y-%m-%d %H:%M" to get the current timestamp. This is critical for accurate ordering when multiple agents work in parallel.main/SESSION_LOG.md, tt-154.../SESSION_LOG.md), never at the bare repo root..envrc (line-by-line), CLAUDE.local.md (section-by-section), and SESSION_LOG.md (interleave by timestamp). Never use cp to overwrite.npx claudepluginhub davidshaevel-dot-com/davidshaevel-marketplace --plugin davidshaevel-claude-toolkitProvides behavioral guidelines to reduce common LLM coding mistakes, focusing on simplicity, surgical changes, assumption surfacing, and verifiable success criteria.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.