From neuralscape
Read a JSONL buffer of captured tool observations and extract significant memories using the Neuralscape memory model v2. Use this when a UserPromptSubmit, SessionStart, or `/neuralscape:capture` instruction asks you to compile observations from a buffer file path.
How this skill is triggered — by the user, by Claude, or both
Slash command
/neuralscape:compile-observationsThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Invoked by:
Invoked by:
/neuralscape:capture.The trigger always supplies the path(s) to one or more JSONL files to process.
Guard — no buffer to compile. If you were invoked with no buffer path and can't find any .jsonl in ${CLAUDE_PLUGIN_DATA}/observations/ (fallback ~/.neuralscape/observations/), don't error: compilation runs from a hook-produced buffer that only exists in Claude Code. Point the user at /neuralscape:save-session (the conversation-based path that works everywhere) and stop. Otherwise continue.
Read each provided buffer file. Each line is a JSON row:
{"ts": "...", "session_id": "...", "cwd": "...", "project_id": "...", "user_id": "...", "tool": "Edit|Write|Bash|...", "input": {...}, "output": "..."}
Group consecutive rows that work on the same target (same file, same topic, same command intent). One work unit per group.
For each work unit, decide: is this significant? Apply the quality rubric below. If not, skip.
For each significant work unit, write ONE memory and submit it via mcp__plugin_neuralscape_neuralscape__remember with the v2 fields filled in.
After all calls succeed, truncate every buffer file that was processed by using the Write tool with the buffer's absolute path and content "". (This preserves the file for next session writes; the Write tool accepts only file_path and content.)
A memory is significant if it satisfies AT LEAST ONE:
<private>, an API-key shape (sk-..., gsk_..., ghp_..., etc.), passwords, or env-var values.Wiki entry, not log line. Lead with the substance, not the tooling.
❌ "Edited utils.ts to fix the offset bug"
✓ "The .neuralscape-offset file should be written after flushTurns resolves, not before — otherwise a failed flush leaves the cursor advanced and we drop turns. The fix uses a pendingOffsets Map staged in extract, committed by commitClaudeCodeFlush()."
❌ "Bash output: npm install completed"
✓ "Pin pydantic to >=2.5 — the field_validator decorator behavior we rely on changed in 2.5; older versions silently accept invalid enum values."
❌ "Met with Sarah today"
✓ "Sarah confirmed Q3 OKR for the analytics team is shifted to Q4 because the data-platform team's migration won't land in time. Plan the dashboard work after Aug 15."
mcp__plugin_neuralscape_neuralscape__remember call)content (required) — the wiki sentencecategory (required) — one of:
preference, personal_fact, technical_skill, domain_knowledgetech_stack, convention, architecture, dependencydecision, interactionworkflow, proceduretask_contextscope — global or project (defaults by category, but set explicitly when ambiguous)project_id — derive from each row's project_id (basename of cwd); use the dominant one in the work unitdomain — coding | research | meeting | writing | ops | personal | general. Infer from the buffer contents.observation_type — bugfix | feature | refactor | decision | discovery | gotcha | pattern | trade_off | research_note | meeting_outcome | task_plan | factconcepts — 1–3 from how-it-works | why-it-exists | what-changed | problem-solution | gotcha | pattern | trade-off | open-question | next-step | blockertags — free-form, ≤5 items (keep them short and specific)source_type — always tool_extractionconfidence — your honest 0.0–1.0 self-assessment of memory qualityrelated_memory_ids — leave unset in this skill flow. The rule above is one memory per work unit, so there is no "second memory from the same work unit" to link. (The field exists for higher-level callers that knowingly emit multiple linked memories.)visibility — private (only the writer reads) or shared (any teammate reads). Defaults per-category, so most of the time you can omit this field and the server will pick the right value. Override only when the per-category default is wrong for this specific memory.The category-level defaults are:
preference, personal_fact, technical_skill, domain_knowledge, task_context. Personal taste, personal facts, personal WIP. Don't share with the team.tech_stack, convention, architecture, dependency, decision, interaction, workflow, procedure. Project / team knowledge. Surface to all teammates by default.When to override:
interaction, a personal note in a decision), or it's a draft you want to revisit before sharing. Pass visibility="private".technical_skill is team-wide ("the platform team knows Rust") or a domain_knowledge should be canonical. Pass visibility="shared".If you're unsure, omit the field and let the per-category default decide. The wrong call is silently more harmful for private→shared (leaks personal info) than shared→private (just hides team info from teammates), so when in doubt, default toward private.
expires_at — only for task_context entries that should auto-purge (e.g. set to 30 days from now)A typical session of 50–100 captured rows should yield 3–10 memories, not 50. Err on the side of fewer, denser memories. If you're unsure whether something is significant, it isn't.
After every successful set of remember calls for a buffer file:
Write tool with the buffer's full path and content "" to truncate it (do NOT delete — the next session may write to it)..stale marker file (if present) is removed automatically by the next truncateBuffer write — but if the skill is called outside that path, also remove <buffer_path>.stale if it exists.If a buffer is empty or the rubric finds zero significant memories, that's a normal outcome — truncate the file and move on.
npx claudepluginhub ehfazrezwan/neuralscape --plugin neuralscapeCreates, edits, and verifies skills using a test-driven development approach with pressure scenarios and subagents.