.pi/agent/skills/context-save/SKILL.md
This skill should be used when the user says "context save", "remember this", "save this", "note this for later", "keep this", or wants to persist any knowledge, pattern, decision, or learning from the current session to persistent memory.
npx skillsauth add popoffvg/dotfiles context-saveInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
/context save <what to remember>
Read insights_root from ~/.claude/memory-keeper.local.md YAML frontmatter. If the file is missing, stop and ask the user to create it.
| Classification | What it is | Saved to |
|---|---|---|
| insight | Completed work — architecture, patterns, gotchas, decisions | <insights_root>/<repo>/insights.md |
| agent_edit | AI behavior changes — hooks, prompts, skills, CLAUDE.md, plugin config | <insights_root>/claude-config/behavior.md |
| task | ONLY unstarted intentions — "I need to refactor X" | <insights_root>/_tasks/pending.md |
| none | Routine work, nothing worth recording — skip silently |
One save invocation may produce multiple entries with different classifications.
## <Keyword-rich title, 3-7 words> — YYYY-MM-DD HH:MM
<Lead: direct statement of what this is and why it matters. 1-3 sentences.
Include concrete identifiers: file paths, function names, config keys, env vars.
No preamble — write for someone with zero memory of this session.>
### Subsection (only when topic has multiple distinct aspects)
<Details>
Heading rules — the heading is the search key:
Pi session_shutdown: handler awaited before process.exitRocksDB WAL mode: disable for unit test performanceClaude Code Stop hook fires per-turn not per-sessionShutdown analysis, Important fix, Database stuffBody rules:
Good entry:
## Pi session_shutdown: handler fully awaited — 2026-03-19 10:00
Pi's `shutdown()` in `interactive-mode.js` calls `await extensionRunner.emit("session_shutdown")`
before `process.exit(0)` — handlers have unlimited time. The current fire-and-forget
`processAllPending().catch()` call is a bug: it escapes the await chain and gets killed.
Fix: either `await processAllPending()` directly, or spawn a detached child process.
Bad entry (skip these):
## Shutdown fix — 2026-03-19
- Fixed the shutdown issue
- Added await
Run git -C <cwd> rev-parse --show-toplevel 2>/dev/null | xargs basename. Fallback: basename <cwd>. User or conversation context may override.
Before saving an insight, check <insights_root>/_tasks/pending.md for an active task (status: active).
<insights_root>/_tasks/<task-slug>/notes.md<insights_root>/<repo>/insights.mdagent_edit and task always go to their fixed locations regardless of active task.
Before appending, read the target file and check:
One precise entry beats two fuzzy ones.
Eval checklist:
Test inputs:
Can change: classification criteria, save format, topic naming, deduplication logic Cannot change: insights_root config requirement, QMD tool usage, file path conventions Min sessions before eval: 5 Runs per experiment: 3
testing
Use when the user asks to create test sets, enumerate scenarios, generate edge cases, or draft a coverage matrix before implementation.
testing
Use when the user asks to review, audit, score, or validate test sets for missed cases before execution or merge.
tools
Test harness plugins in isolation using tmux panes. Runs MCP servers, unit tests, typecheck, and Claude plugin loading. Use when user says "test plugin", "check plugin", "run plugin tests", "validate plugin", or names a specific plugin to test.
development
Guide for designing integration and e2e tests using BDD (Behavior-Driven Development) methodology with Cucumber-style Given/When/Then scenarios. Use when writing or reviewing tests for any service, API, or component. Language-agnostic — covers scenario structure, step notation, assertion principles, async patterns, and common anti-patterns.