From project-brain
Use when the user wants a persistent AI brain, project memory, LLM wiki, personal knowledge base, model handoff memory, architecture/codebase brain, source ingestion workflow, Obsidian vault mirror, cross-project brain coordination, or any workflow combining raw sources, wiki synthesis, MemPalace memory, graphify graphs, logs, audits, health metrics, and session handoffs. This skill initializes and maintains a layered brain where `.brain/raw/` stores immutable evidence, `.brain/wiki/` stores compiled markdown knowledge, MemPalace stores verbatim session memory and user preferences, graphify maps relationships across code/docs/sources, Obsidian MCP mirrors selected wiki pages to the user's vault, and `.brain/state/session-brief.md` lets a future model recover context after a reset or model change.
How this skill is triggered — by the user, by Claude, or both
Slash command
/project-brain:brainThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Build and maintain a persistent AI brain for the current project. This skill is not only an LLM Wiki scaffold. The LLM Wiki is the compiled-knowledge layer; after wiki edits, synchronize the graph, memory, log, audit, health, vault, and handoff layers so the next model can understand the project without this chat.
references/agent-playbook.mdreferences/audit-workflow.mdreferences/brain-architecture.mdreferences/brain-health-metrics.mdreferences/brain-lifecycle.mdreferences/cross-brain-workflow.mdreferences/evidence-lifecycle.mdreferences/graphify-workflow.mdreferences/handoff-protocol.mdreferences/install-and-integration.mdreferences/mempalace-workflow.mdreferences/obsidian-workflow.mdreferences/post-wiki-checklist.mdreferences/retrieval-strategy.mdreferences/wiki-schema.mdBuild and maintain a persistent AI brain for the current project. This skill is not only an LLM Wiki scaffold. The LLM Wiki is the compiled-knowledge layer; after wiki edits, synchronize the graph, memory, log, audit, health, vault, and handoff layers so the next model can understand the project without this chat.
The brain has six coordinated layers:
.brain/raw/ and repository files. These are the source of truth..brain/wiki/. These are small, linked markdown pages maintained by the agent.graphify-out/. This captures relationships, communities, paths, god nodes, and structural hints..brain/state/session-brief.md. This is the short briefing a future model should read first.references/obsidian-workflow.md.Never treat one layer as the whole brain. A healthy project brain keeps the layers aligned.
At the start of any serious project-brain session:
.brain/CLAUDE.md exists, read it first..brain/CLAUDE.md does not exist and the user asked to set up a brain, run:project-brain-init <project-root> "<Project Name>"
.brain/state/session-brief.md if present..brain/wiki/index.md if present.graphify-out/GRAPH_REPORT.md before architecture, code navigation, or broad relationship questions if it exists.mempalace_status when the tool is available, then use mempalace_search for relevant memory.Before saying "MemPalace is unavailable", call mempalace_status. If the MCP tool is present, MemPalace is available. The plugin is installed. There is no fallback scenario unless the tool call itself fails.
Do not write Python scripts to parse code structure, extract relationships, or build knowledge graphs. That is graphify's job. If a relationship question requires graph traversal, use /graphify query or graphify query "<question>". If graphify output is missing, rebuild it with /graphify . — do not substitute manual file scanning.
Every wiki edit must be followed by the post-wiki checklist. No exceptions. The checklist is not optional friction — it is what makes the brain durable.
If the session brief exceeds 400 words, trim it. Depth belongs in wiki pages, not the brief. The brief is a map to the wiki, not a replacement for it.
Never push to the Obsidian vault without the user asking. The vault is the user's personal space. The brain writes to .brain/wiki/ first; the vault is a view layer the user controls.
Before answering any question from the brain, identify the question type and consult references/retrieval-strategy.md or the routing table in references/agent-playbook.md. Do not default to reading the wiki index for every question. Code navigation questions go to graphify first. Decision questions go to MemPalace first. Status questions go to the session brief first. Using the wrong layer first wastes turns and risks stale answers.
Use references/brain-lifecycle.md as the primary runbook. The short version:
.brain/raw/ or pointer files..brain/wiki/.If the user asks "what should the AI do after LLM Wiki?", the answer is: run the post-wiki synchronization loop in references/post-wiki-checklist.md.
Use when the project has no brain yet or the user asks to create/install/set up the brain.
Steps:
project-brain-init <project-root> "<Project Name>".project-brain-doctor <project-root>.CLAUDE.md.MemPalace is already installed as a plugin. graphify is already installed as a CLI tool and skill. Do not reinstall either.
Use at the start of a new session, after a model change, or when the user says to continue from memory.
Steps:
.brain/CLAUDE.md..brain/state/session-brief.md..brain/wiki/index.md.graphify-out/GRAPH_REPORT.md if present.mempalace_status and search MemPalace for the project name, current task, recent decisions, and relevant user preferences when available.Use when the user adds a source, explains something important, links docs, uploads notes, asks to process a codebase, or gives new project context.
Steps:
.brain/raw/ or create a pointer file in .brain/raw/refs/ according to references/evidence-lifecycle.md..brain/wiki/sources/..brain/wiki/index.md.Use when answering questions from the brain.
Steps:
references/retrieval-strategy.md or the routing table in references/agent-playbook.md..brain/outputs/queries/ or promote it into .brain/wiki/.Use when the user asks how pieces connect, when code/docs/raw sources changed, or after initial brain setup.
Steps:
.graphifyignore to exclude noisy or sensitive paths./graphify . for the full skill pipeline, or graphify <subcommand> for targeted shell operations.graphify-out/GRAPH_REPORT.md..brain/wiki/open-questions.md until verified.Use after significant project conversations, decisions, preference changes, or handoffs.
Steps:
mempalace_status.mempalace_diary_write after substantial work, decisions, or context changes.mempalace_preferences_set when they should survive model switches..brain/CLAUDE.md preferences.Use when the user asks to view, browse, save, mirror, sync, or open brain content in Obsidian, or asks for the vault to reflect current brain state.
Steps:
references/obsidian-workflow.md..brain/log/ for the last sync timestamp.<vault>/project-brains/<project-name>/..brain/raw/, .brain/log/, .brain/audit/, or .brain/state/ unless explicitly requested.Use periodically, after large updates, or when the user asks whether the brain is healthy.
Steps:
project-brain-lint <project-root> or project-brain-lint <project-root> --json when a tool needs machine-readable output.project-brain-doctor <project-root> for health scores..brain/audit/*.md from highest severity to lowest..brain/audit/resolved/ with a resolution.Use before ending a large session, before compaction, after major work, or when the user asks for continuity.
Steps:
.brain/state/session-brief.md.Use when the user works across multiple projects or asks to connect one project brain to another.
Steps:
references/cross-brain-workflow.md.merge-graphs only when a cross-repo relationship map is needed.Use when project-brain-doctor shows health below 70/100, when the session brief is more than 7 days old, or when the user asks whether the brain is healthy or up to date.
Steps:
project-brain-doctor <project-root> and read all four scores.references/brain-lifecycle.md → Self-correction scan.project-brain-lint <project-root> and clear all error-level issues.Every time wiki pages change, perform this loop unless impossible:
The wiki is not the finish line; it is the compiled layer that must be wired back into the rest of the brain.
When layers disagree, trust evidence in this order:
Do not erase disagreement. Record the conflict and update the stale layer after verification.
Load these only when relevant:
references/agent-playbook.md — decision tree for what the agent should do next.references/audit-workflow.md — how to process human feedback.references/brain-architecture.md — detailed architecture of the six brain layers.references/brain-health-metrics.md — measurable brain health scoring.references/brain-lifecycle.md — full end-to-end workflow and definitions of done.references/cross-brain-workflow.md — linking multiple project brains without duplication.references/evidence-lifecycle.md — raw evidence intake, pointer files, aging, and contradictions.references/graphify-workflow.md — how to use graphify as the relationship graph layer.references/handoff-protocol.md — how to prepare a future model.references/install-and-integration.md — actual dependency state, plugin layout, verification, and CLAUDE.md integration.references/mempalace-workflow.md — how to use MemPalace MCP as the memory layer.references/obsidian-workflow.md — how to mirror wiki pages to Obsidian via MCP.references/post-wiki-checklist.md — exact checklist after wiki edits.references/wiki-schema.md — page formats, frontmatter, index rules.A response or operation is not complete until the agent can answer:
Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub fathriabanoub/ai-brain-marketplace --plugin project-brain