/graft:memoryzefrom graft
Distills conversation knowledge into structured memory nodes for persistent storage. Triggered by /memoryze or 'save this to memory'. Supports granularity hints, focus areas, and target profiles.
Ships in graft. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
You are about to commit something the user solved/decided to long-term memory. This skill is the shape of that act: pick the right granularity, write titles that future-you will actually find, and avoid garbage-in.
The user invokes you with a free-form prompt that may include:
| Hint | Example | What it means |
|---|---|---|
| count / granularity | "3 nodi", "atomic", "one big node", "split per business rule" | How many nodes to produce. Default: heuristic (see below). |
| focus | "the WHY, not the diff", "include the workaround", "skip syntax" | What aspect of the solution to emphasize in body. |
| scope | "this conversation", "from the bug fix onwards", "only the SQL part" | Which slice of context to distill. |
| target profile | "in the work profile", "in test" | Switch via GRAFT_PROFILE for the inserts. |
| enrichment | "expand with the official docs link", "add the error message" | Inject extra data the agent should look up before saving. |
Examples:
/memoryze the spring boot @Valid cascade fix, 1 node, focus on WHY/memoryze split this debugging session into atomic nodes per hypothesis tested/memoryze le ultime 10 messaggi su Angular signal reactivity, 3 nodiIf hints are absent, ask at most one clarifying question, then proceed with the default heuristic.
Count the independent decisions in the slice the user pointed at:
/memoryze invocation — beyond that, the user should narrow scope or run multiple invocations.Atomicity test: each node should be retrievable on its own when future-you searches for it. If two prospective nodes would always co-occur in the answer, merge them.
Every saved node has three required fields plus 2-5 keywords. Quality of these fields is the skill — bad shape means future search misses.
title (one line, ~80-120 chars)Write the line future-you will type into search, not a heading.
"fixed the bug" — useless."FIX-2024-12 spring boot cascade" — search-by-ticket only."Spring Boot DTO nested validation needs @Valid on field plus @Validated on controller""Angular signal-based form: canConfirm reattivo via computed(), non property"The title IS your retrieval anchor. Phrase it the way the problem appears, not the way the solution looks.
body (Markdown, 1-20 lines, prose + code if relevant)Include:
Skip:
keywords (2-5)Run graft classify --title "<your title>" first. The system suggests keywords from existing graph keywords when possible, infers when novel. Use the suggestions verbatim unless they miss a critical axis (e.g., classify gave you [spring-boot, validation] but the node is also a gotcha worth flagging — add it).
Conventional axis keywords to consider adding:
gotcha — non-obvious traps the docs don't mention.standard — "from now on we always do X" decisions worth reusing across projects.incident — links to a real production breakage.workaround — temporary fix while the real issue is open elsewhere.For each node to be created (1 to N):
# 1. Suggest keywords
graft classify --title "<the title you drafted>"
# 2. Insert. Idempotent — duplicate hashes return the existing id_hex.
graft insert \
--title "<final title>" \
--body "<final body, Markdown is fine>" \
--keyword <kw1> --keyword <kw2> --keyword <kw3> \
[--source file:<path>] # when the node is derived from a file
When a node is derived from a file (code, docs, config), pass --source file:<path> (repeatable, path relative to the cwd or absolute): graft records the file and its fingerprint, and graft sources diff later flags the node when that file changes. Use --source conversation for knowledge that only exists in the chat. Re-inserting identical content with a new --source just attaches it to the existing node.
Each new node's result carries similar: existing notes close to it (id_hex, title, state, similarity). Check them right after the insert, while the conversation is still in front of you:
graft maintain resolve --node <old> --action supersede --by <new> --note "<why>";graft maintain resolve --node <new> --action contradicts --by <old> --note "<why>" (records the conflict, changes no state);After all inserts, report back to the user:
id_hex) created and which were duplicates of existing nodes.similar: the old notes superseded, the conflicts recorded with contradicts (the user may know which side is right)./recall to verify the saved nodes are findable with the user's likely future queries.Do NOT save:
If asked to save something refused, explain why in one line and propose a redacted version the user can confirm.
If the user said "in the X profile" / "nel profilo X":
GRAFT_PROFILE=X graft insert ...
Don't permanently switch the user's shell — pass the env var on the line. Tell the user which profile the inserts went into.
End with a compact, scannable recap:
Saved to profile=<name>:
✓ <id_hex_short> — <title>
✓ <id_hex_short> — <title>
• <id_hex_short> — <title> (duplicate, not re-saved)
↳ supersedes <id_hex_short> — <old title>
⚠ conflicts with <id_hex_short> — <old title> (recorded as contradicts)
Try: graft query "<one of the titles>"
Keep this terse. The user already knows what they asked you to save — they want confirmation, not an essay.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub aendrix03/graft --plugin graft6 skills in this plugin
/graftPersistent graph memory shared across conversations and agents. Graft is a prompter, not a cache: it hands you notes that may be close to the problem in front of you, and a close note is already a win - it gives you a starting point and reminds you what was decided before. Search it before non-trivial work, and write to it whenever the answer you just produced was not already there. Companion skills: `/recall` (search), `/memoryze` (save), `/learn` (bulk ingest; `/learn docs` for a repository's documentation; `/learn bootstrap` for the unattended cold start of a project), `/memory-audit` (maintenance pass + health check). After `/graft-init` the agent runs the whole lifecycle itself (bootstrap, recall, repair, writeback, bounded maintenance) from one cheap `graft status` call, without asking the user. The daemon auto-starts on the first command./graft-initOne-shot wiring of graft into this agent. Installs the graft CLI first if it is missing (after asking), then asks a single question - global or project - then writes the graft usage rule into the right instruction file (CLAUDE.md or AGENTS.md) and, on Claude Code, a rule file under .claude/rules/graft.md that the instruction file imports. Triggered by `/graft-init`, "configura graft", "set up graft here", "enable graft globally". Idempotent: re-running replaces the previous block in place, it never duplicates or strips anything else./learnBatch knowledge ingestion from external sources (a folder, a codebase, a docs tree). Plans well-shaped nodes with reconciled keywords, shows the plan for approval, then executes idempotently. Triggered by `/learn`, "ingest this folder into memory", "porta questo codice nella memoria", "memorize this codebase". Docs mode (`/learn docs [path]`): all of a repository's documentation and nothing else, incremental on re-runs; "ingest the docs of this repo", "impara la documentazione del repo". Bootstrap mode (`/learn bootstrap [path]`): unattended, progressive cold start of a whole project's memory (topic map, bounded runs by importance, task area first, resumed via `graft project status`); "bootstrap graft for this project", "this project was never bootstrapped", "inizializza la memoria del progetto". Differs from `/memoryze` (1-5 nodes from conversation): `/learn` produces 10-200 nodes from external corpora./memory-auditMaintenance pass + health check of the graft graph. Runs the `graft maintain` loop: checks what is due, applies the mechanical cleanup, then adjudicates every maintenance candidate (near duplicates, supersessions, contradictions, memories whose source file changed or disappeared, keyword variants, stale low-value notes) against the current code and docs and resolves it with one audited, reversible action, without asking the user in the normal path. Ends with a short report (what was resolved, hit rate, reuse). Triggered by `/memory-audit`, "is the graph healthy", "audit memory", "clean up the memory", "check graft quality", or when `graft maintain status` recommends work./recallSmart graft search that picks the right tool (query → retrieve → explore) based on the question's shape, escalates when results are weak, and presents findings ranked by confidence with the originating evidence. Triggered by `/recall`, "do we have something about X", "have we seen this before", "ricordi se", "search the graph". Prefer this over a raw `graft query` whenever the user is exploring rather than confirming a known answer.Other plugins' skills for the same job