/memory-kit:setupfrom Multi-Agent Driven Development Kit
Scaffolds the Memory Kit in a repository: creates memory layers, configures coexistence with Claude Code's native auto memory, and installs permission rails. Use when adopting the kit or running setup commands.
Ships in Multi-Agent Driven Development Kit. 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.
The plugin ships behaviour; the repository owns the state. This skill creates that state — always asking before the first write, and never touching files the repo already has.
Running without a user who can answer (a headless or -p run)? Then "offer" means skip and
report: take the documented default where one exists, install nothing that the skill marks as
opt-in, and finish with a list of what was deliberately not installed and what question is still
open. Never invent a preference on the user's behalf and never present a skipped step as done.
Report in two lines what already exists: .claude/memory/MEMORY.md, context/handoffs/,
knowledge/, projects/, an existing documentation home (docs/, doc/, documentation/),
.claude/settings.json, .gitignore, and whether this repo already holds work of its own —
code, or documents other than a bare README (a real project) — or is effectively empty (a fresh
memory workspace). Being a git repo decides nothing; content does. Everything after this is a proposal the user
confirms once, not a sequence of prompts.
These four are shared across every project in the repo. Create only what is missing, copying
from ${CLAUDE_PLUGIN_ROOT}/templates/:
| Path | From | Purpose |
|---|---|---|
.claude/memory/MEMORY.md | templates/MEMORY-TEMPLATE.md | the hot cache the hook injects every session |
context/handoffs/HANDOFF-TEMPLATE.md | templates/HANDOFF-TEMPLATE.md | the per-session note format |
knowledge/index.md | templates/workspace/knowledge-index.md | the catalog of deep memory |
knowledge/concepts/.gitkeep | — | where promoted patterns land |
.claude/state/.gitkeep | — | hook bookkeeping (gitignored) |
projects/<name>/)The four layers above hold MEMORY. The work's own documents — tasks, specs, research, decisions, QA — belong to a PROJECT, and the kit is multi-project by design: one folder per client or product, so that a decision ledger, a findings registry and a QA protocol each count and describe exactly ONE thing. This applies to a single-product code repository too — it simply has one project folder, named after the product. Without it, specs, backlogs and research have no home and scatter into the repo root.
Ask for the name(s), then create per project — nothing more:
| Path | From | Purpose |
|---|---|---|
projects/<name>/README.md | templates/workspace/project/README-TEMPLATE.md | what it is + the map of where its documents live |
projects/<name>/BACKLOG.md | templates/workspace/project/BACKLOG-TEMPLATE.md | tasks and their real status |
The rest of the project layer — plans/, research/, decisions-log.md, review-findings.md,
qa/, materials/ — is created on first use by whoever produces the artifact, never
scaffolded upfront. An empty folder is not a layer; it is a promise nobody kept. plans/ appears
with the first spec, written from templates/workspace/project/SPEC-TEMPLATE.md; an executor
told to build past a missing decision may add one plans/<date>-<slug>-assumed.md from
ASSUMED-SPEC-TEMPLATE.md, and nothing else in that folder is an agent's to create.
If the repository already has a documentation home, do NOT move anything and do NOT propose a
migration. Fill the README's map table with the paths it already uses, written from the repo root
with a leading / so they can't be misread as project-relative. That table is the SSOT for "where
does a plan go" — the defaults are a default, not a law, and a repo's own layout outranks them.
The test for "already has one" is committed content, not a folder: a docs/ (or doc/,
documentation/) holding at least one markdown file that git tracks and that a human wrote. An
empty directory, or one holding only scaffolding you cannot attribute to anyone, does not count —
use the defaults. When the call is genuinely close, ASK; it decides where every future plan gets
looked for, and it is cheap to ask once and expensive to split a repo's documents across two homes.
Brand-new empty workspace, first time with the kit? Also offer the experiments/ sandbox from
templates/workspace/, and — only when there is exactly one project —
templates/workspace/ONBOARDING-BACKLOG.md as its backlog: five guided tasks for day one. With
two or more real projects on day one, skip it (a tutorial mixed into a client's backlog is noise,
and a third fake project to hold it is worse) and offer /memory-kit:tour instead.
Claude Code has its own auto memory (~/.claude/projects/<project>/memory/, loaded every
session, written by Claude without asking). Running it alongside the kit means two writers and
two truths. Put the choice to the user in one question:
"autoMemoryEnabled": false into .claude/settings.json
(for CI or a headless run, CLAUDE_CODE_DISABLE_AUTO_MEMORY=1 does the same). You get dated
entries, human-confirmed promotion, handoffs, and one file the user can read.~/.claude/projects/<project>/memory/ (machine-local, outside the repo); the kit keeps the
repo files and the ritual. Two writers, two truths — say so, and make the kit's MEMORY.md
the one that counts for handoffs and promotion.Do NOT point autoMemoryDirectory at the kit's .claude/memory: the setting only accepts an
absolute path or one starting with ~/ (so it cannot be committed portably), and Claude Code
would rewrite the kit's MEMORY.md in its own index format, overwriting the dated cache
(last verified 2026-09-02).
Whichever is chosen, say plainly which system now owns the file.
/memory-kit:setup rails (the argument rails, e.g. from the SessionStart «Rails:» line) runs
THIS step alone on an already adopted repo: skip Steps 0–2 and 4–6, build the proposal below, show
the diff of .claude/settings.json, merge on a yes and write .claude/state/rails-v2; on a no,
write .claude/state/rails-declined. Either file silences the nudge. A full setup writes the same
marker after this step. Headless: write nothing, report the proposal.
The plugin cannot ship permissions (Claude Code only honours agent and subagentStatusLine
from a plugin's settings.json; last verified 2026-09-26) — the destructive git operations are already guarded by the
kit's git-guard hook (force push, reset --hard, clean -f, branch -D, checkout .,
restore ., push --mirror; opt-out CMK_GIT_GUARD=off). The rails cover the rest. Build the
proposal from what is actually in this repo:
.env, .env.local, .env.*.local,
.env.development, .env.production, .env.test, *.pem. For each one PRESENT, a
Read(./<name>) and an Edit(./<name>) deny. Never .env.example / .env.sample — those
are meant to be read.{
"permissions": {
"deny": ["Read(./.env)", "Edit(./.env)"],
"ask": [
"Bash(gh pr create *)", "Bash(gh pr merge *)", "Bash(gh pr comment *)",
"Bash(gh pr edit *)", "Bash(gh pr close *)", "Bash(gh pr review *)",
"Bash(gh api -X *)", "Bash(gh api * -X *)", "Bash(gh api --method *)", "Bash(gh api * --method *)",
"Bash(docker * down *)", "Bash(docker * down)", "Bash(docker rm *)", "Bash(docker * rm *)",
"Bash(docker stop *)", "Bash(docker * stop *)", "Bash(docker kill *)", "Bash(docker * kill *)",
"Bash(docker * prune*)"
]
}
}
(the deny pair shown is for a repo whose root holds .env; one pair per file found.)
3. Drop the v1 prefix denies Bash(git push --force:*) / Bash(git push -f:*) if present:
a prefix cannot express «this flag anywhere», and the hook covers them. Say so in the diff.
State the rules out loud while you do it:
Bash(git *), Bash(node *), Bash(python3 *), Bash(*)):
in auto mode NARROW allow rules resolve BEFORE the classifier (Claude Code docs,
auto-mode-config; last verified 2026-09-26), so a broad one lets a destructive argument through
unseen — force pushes, hard resets, node -e — while it reads as safety.
A narrow allow names the EXACT script — Bash(node scripts/foo.mjs *), never
Bash(node scripts/*) / Bash(python3 scripts/*): a path wildcard lets the agent write a new
file into that folder and run it before the classifier sees it. The same for a runner whose
subcommand executes arbitrary code: not Bash(npx wp-env run *), only Bash(npx wp-env run cli wp *).
Point out broad allows already there; never remove the user's rules without a yes.scripts/stand.sh:
set -a; . ./.env; set +a; exec node …) plus ONE narrow allow Bash(bash scripts/stand.sh *) —
a narrow allow resolves before the classifier AND before Claude Code's built-in static check,
which blocks an inline set -a whatever the settings say (last verified 2026-09-26). Fallback only: one autoMode.allow
sentence naming the file and the purpose..env.bak at the root is one more file to deny).ask rules, list the scripts that call claude -p with gh or docker:
headless mode turns an ask into a deny, so those scripts would start failing.How to prove the rails afterwards: ${CLAUDE_PLUGIN_ROOT}/reference/harness-measurement.md (M1).
Append only the lines that are missing, each with its reason in one comment:
.claude/state/*
!.claude/state/.gitkeep
.claude/memory/MEMORY.md # personal hot cache — commit deliberately if the team shares it
context/handoffs/*.md # session notes; keep the template
!context/handoffs/HANDOFF-TEMPLATE.md
For a team repository — more than one human committing, or a shared remote anyone on the team can push to — ask instead: shared memory (commit both) is often the point. Solo or private: the defaults above.
The plugin also carries a builder's toolkit. None of it costs context until invoked, so it is already available — the only thing that needs a decision is the always-loaded rule:
${CLAUDE_PLUGIN_ROOT}/templates/rules/orchestration.md
into .claude/rules/. Nine invariants, always loaded — that one file is the entire cost.
The agents (executor, recon, idea-validator) and /memory-kit:session-review +
/memory-kit:second-opinion work without it; the rule is what makes the discipline binding.
Then offer the role templates in ${CLAUDE_PLUGIN_ROOT}/templates/agents/ (code-reviewer, prebuild-reader,
tool-builder, web-recon, labeler): copy into .claude/agents/ only the roles the project will use, each after
a yes, and fill their <placeholders>. Two workspace templates go with them, copied when first needed:
templates/workspace/WINDOW-BRIEF-TEMPLATE.md (a brief for a parallel window) and
templates/workspace/project/ACCEPTANCE-TEMPLATE.md (the record of accepting a built block)./memory-kit:qa-sweep needs a protocol first: copy
${CLAUDE_PLUGIN_ROOT}/reference/qa-PROTOCOL-TEMPLATE.md → projects/<name>/qa/README.md,
fill every <placeholder>, and merge reference/qa-mcp.json.example into the project
.mcp.json. Do this only when the user asks for QA — never as part of a default setup.${CLAUDE_PLUGIN_ROOT}/reference/project-extensions.md
is the decision table for which shape a repeated workflow takes and what it costs when idle.${CLAUDE_PLUGIN_ROOT}/reference/ and is read on demand.setup adopt)/memory-kit:setup adopt (the argument adopt, after an install or an upgrade) runs THIS step alone: skip every
other step. Walk ${CLAUDE_PLUGIN_ROOT}/reference/adoption.md row by row, test each row's condition on this
repository (with the row's command where it gives one) — decide from the repository first and ask only what it
cannot show, once, in one message, each question with your default — and show the user ONE table: practice · take /
adapt / skip · the reason. Apply only what the user approves, by the rule in adoption.md; end with the took /
adapted / skipped report. A full setup offers this step, never runs it unasked. Headless: write nothing, report the
table.
The files you just created were NOT in context when this session started, so nothing you can see right now proves the injection works. Prove it the only honest way — run the hook yourself and read what it would inject next time:
HOOK="${CLAUDE_PLUGIN_ROOT}/hooks/session-start.py"
# the variable expands in this skill's text, not in your shell — fall back to finding the file
[ -f "$HOOK" ] || HOOK=$(find ~/.claude/plugins -path '*memory-kit*' -name session-start.py | head -1)
CLAUDE_PLUGIN_ROOT="$(dirname "$(dirname "$HOOK")")" python3 "$HOOK" <<< '{"source":"startup"}'
MEMORY.md
body. If it still shows the "not set up in this repository" pointer, the scaffold landed in
the wrong place — say so; do not claim the kit is live./context as a second check — it shows THIS session's
opening injection, so a missing hot cache there is expected today and confirmed on the next
start. In a headless run there is no /context; the hook output above is the whole proof./memory-kit:close-session is what they type at the end of the day. Offer /memory-kit:tour.plans/, research/,
qa/, …) upfront — they appear when something is actually written into them.docs/ into projects/. Map it, never migrate it.MEMORY.md, settings.json or .gitignore — merge, and show
the diff before writing.MEMORY.md, context/handoffs/, knowledge/concepts/,
.claude/rules/; the work's documents live in projects/<name>/. That is the whole system.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub awrshift/agent-memory-kit --plugin memory-kit10 skills in this plugin
/close-sessionEnd-of-session ritual — audit today's patterns against accumulated memory, propose promotions, refresh MEMORY.md, and write the session handoff. Use when the user says "/memory-kit:close-session", "закрой сессию", "закрываем", "we're done for today", "wrap up"./code-syncReconcile the project's documents with what the code now shows, after a merge or at the end of a build: spec statuses (building → done only with a named gate, or → stale with the reason), assumed specs owed ratification, the project README map and its Last verified date. Surgical edits only. Use when the user says "/memory-kit:code-sync", "sync the docs", "sync specs with code", "синхронизируй доки с кодом", "что устарело в спеках", or right after merging an executor branch.
/documentWrite the human-facing prose about a change — PR body · changelog entry · release note · postmortem — and put it in the right file. Use when the user says "write the PR", "PR description", "PR body", "changelog", "changelog entry", "release note", "release notes", "postmortem", "write up the incident", "напиши PR", "описание PR", "чейнджлог", "релиз-ноут", "постмортем". Every draft is built ONLY from `git diff` / `git log` output this skill runs itself — never from the session's memory of what it did, never from what it intended. Writes no code, no tests, no specs; it never edits an implementation file and never edits a spec.
/memory-auditAudit MEMORY.md against the memory discipline — oversized sections, settled multi-session patterns that belong in knowledge/concepts/, session-headed chronicle blocks, restated rules, copied numbers, stale entries. Produces a move plan as a table for approval, then executes the approved moves atomically. Use when the SessionStart hook reports a tripped cap or session-headed blocks, when PreCompact blocks on an oversized cache, or when the user says "/memory-kit:memory-audit", "audit memory", "проверь память", "почисти память". Refuses only when no cap is tripped, no session block is flagged AND no settled-pattern candidate exists./qa-sweepRun a multi-lens agent QA sweep of the RUNNING product: spawn `qa` agents (one per lens — user-flow · edge-state · honesty · contract · ux-critique), collect their structured findings, integrator-verify the load-bearing ones, and land verified findings as backlog tickets + a run record in the project's qa/ folder. Use whenever the user asks to QA, test, or probe the product from the user's side — "qa sweep", "test the UI", "walk the flows", "find inconsistencies", "check how this looks to a client" — and proactively after integrating any large UI slice, before a milestone, or when a manual walk found one bug and siblings are likely. Trigger even when the user names only one angle (e.g. "check the API errors") — pick the matching lens subset. NOT for unit testing (your test suite does that) and NOT a replacement for the integrator's own acceptance walk.
/second-opinionCross-check the agent's own answer with independent reviewers before bringing it to the user. Use when the user says 'second opinion', 'sanity check', 'cross-check', 'am I missing something', 'stress-test', 'devil's advocate', 'run a full review', 'this is important', 'high-stakes', 'help me choose between', 'critique this', or similar. Three review styles: Devil's Advocate (single critique), Boardroom Debate (parallel multi-reviewer validation), Round-Table (multi-round brainstorm for choosing between paths). Not for factual lookups — use WebSearch for those. Skip this skill when a user-level review board or second-opinion skill exists — use that one instead.Other plugins' skills for the same job