graft-init

graft-init is a skill for Claude Code, Codex from AEndrix03/Graft. It costs 119 tokens per session (1,533 once invoked), scanned A, original, Apache-2.0.

A one-time setup assistant that configures graft, a persistent-memory tool, in a global or project-specific CLAUDE.md file. It asks about where to apply the settings and how memory should be cached, retrieved, and saved.

In plain words
What is it for?
Use it to set up graft for all projects or just the current repository, choose cache and retrieval behavior, and define how memories are saved. The setup can be cancelled before anything is changed.
Why use it?
It removes the need to repeat memory-use preferences in every coding-agent session and keeps those preferences in the agent's instruction file.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: reads .claude/ paths; mentions CLAUDE.md; names the AskUserQuestion tool.

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/aendrix03/graft/graft-init
Any agent
npx skills add AEndrix03/Graft --skill graft-init
Clone the repo
git clone --depth 1 https://github.com/AEndrix03/Graft

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for graft-init

README.md
[![agentmods](https://agentmods.dev/badge/skills/aendrix03/graft/graft-init.svg)](https://agentmods.dev/skills/aendrix03/graft/graft-init)
Your own site
<a href="https://agentmods.dev/skills/aendrix03/graft/graft-init"><img src="https://agentmods.dev/badge/skills/aendrix03/graft/graft-init.svg" alt="Measured on agentmods" height="20"></a>
Per session 119 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,533 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00119 $0.01533
Opus 5 $0.00060 $0.00766
Sonnet 5 $0.00024 $0.00307
Haiku 4.5 $0.00012 $0.00153

Measured 6d ago against content hash 271160d2878c, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

graft-init scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

integrations/claude-code/skills/graft-init/SKILL.md · 127 lines

How it starts

The opening of the file, as written. The whole thing — 127 lines — stays where its author put it; the contents beside it link to each section on GitHub.

graft-init — Configure graft behavior in CLAUDE.md

This skill writes a short, opinionated instruction block into a CLAUDE.md so future sessions automatically use the graft skills (recall, memoryze, learn, memory-audit) according to the user's preferences. The block is fenced with HTML markers so re-running the skill cleanly replaces it.

Flow

Run the four AskUserQuestion calls in order. Stop immediately if the user picks exit on Q1. Pass multiSelect: false for all four. Defaults are marked (recommended) in the option labels — do not auto-pick, the user must choose.

Q1 — Scope

question: "Where should the graft configuration live?"
header:   "Scope"
options:
  - { label: "Global (recommended)", description: "Write to ~/.claude/CLAUDE.md — applies to every project on this machine." }
  - { label: "Local",                description: "Write to ./CLAUDE.md in the current repo — applies only here, takes precedence over global." }
  - { label: "Exit",                 description: "Cancel without changing anything." }

If the user picks Exit, reply with one short line ("Cancelled, nothing changed.") and stop.

Q2 — Caching

question: "Enable cache-first lookups?"
header:   "Caching"
options:
  - { label: "Enable (recommended)", description: "Use `graft query` first (fast, exact-match cache) before escalating to retrieve. Cuts latency on repeat questions." }
  - { label: "Disable",              description: "Always go straight to retrieve. Slower but always semantic." }

Q3 — Retrieve strategy

question: "When should the agent search the graph during a conversation?"
header:   "Retrieve"
options:
  - { label: "Every interaction on cache miss (recommended)", description: "Run `/recall` on any non-trivial turn whenever the cache lookup misses. Maximum coverage." }
  - { label: "Only at conversation start",                    description: "One opening recall to load context, then rely on conversation memory." }
  - { label: "Never",                                         description: "Do not retrieve automatically — only when the user explicitly asks." }

Read the full file on GitHub · 127 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 127 lines · 119 tokens per session scan A 271160d2878c

Subscribe to this mod's changes

graft-init is a skill published in the GitHub repository AEndrix03/Graft (11 stars, last pushed 13d ago), licensed Apache-2.0. It adds 119 tokens to every session and 1,533 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.