Official Claude Code plugin layout: manifest, .mcp.json, hooks/hooks.json, scripts/, and a skill (not root CLAUDE.md — per Anthropic guidance).
Client-only: connects to hosted agent-brain over HTTP/SSE. No Postgres or go run in the plugin.
Bundled skills (replay-memory) are local-only — not uploaded to agent-brain via ingest_skill. Memory write/search protocol lives in server-side skills (memory-write, memory-policy, etc.) retrieved via MCP.
plugins/claude-code/
├── .claude-plugin/plugin.json # manifest (required)
├── .mcp.json # hosted MCP (http → /sse)
├── hooks/hooks.json # SessionStart, UserPromptSubmit, Stop
├── scripts/ # hooks + extract_conversations.py (--project, --list-projects)
├── skills/ # replay-memory and other local skills
├── bin/mcp-call # build locally (gitignored)
└── .env.example
curl -fsSL https://raw.githubusercontent.com/realnighthawk/agent-plugins/main/plugins/claude-code/install.sh | bash -s -- \
--url https://agent-memory.nighthawklabs.org/mcp \
--agent-id claude-you \
--api-key YOUR_KEYFrom a cloned repo:
./plugins/claude-code/install.sh --url https://memory.example.com/sse --agent-id claude-you --api-key YOUR_KEYThe script downloads mcp-call, registers the agent-plugins marketplace, runs claude plugin install agent-brain@agent-plugins, and writes ~/.config/agent-brain/claude.env (source it from your shell profile).
./scripts/fetch-mcp-call.sh plugins/claude-code/bin/mcp-call
claude plugin marketplace add . --scope user
claude plugin install agent-brain@agent-plugins --scope userSet environment variables in your shell or Claude Code user config (see .env.example):
| Variable | Purpose |
|---|---|
NIGHTHAWK_MCP_URL |
Hosted SSE URL, e.g. https://memory.example.com/sse |
NIGHTHAWK_API_KEY or NIGHTHAWK_JWT |
Auth |
NIGHTHAWK_AGENT_ID |
claude-<user> or claude-<user>-<project> |
Register the agent id in Memory Explorer → Settings (iam_service_accounts for your user).
After changing hooks or .mcp.json, run /reload-plugins or restart Claude Code.
In Claude Code chat, invoke the bundled replay-memory skill:
replay agent-brain
replay agent-brain limit 3 dry run
The skill runs extract_conversations.py (Phase 1) then dispatches subagents to write
memories under agent_id = claude-code-replay. After plugin updates:
./plugins/claude-code/update.sh --api-key YOUR_KEY| Install style | Example NIGHTHAWK_AGENT_ID |
|---|---|
| User-global | claude-alice |
| Project-scoped | claude-alice-agent-brain |
Session provenance: hooks set NIGHTHAWK_SESSION_ID from Claude's session_id on SessionStart.
Replace .mcp.json headers with templates/mcp-jwt.json if you use Bearer tokens instead of API keys.
plugins/claude-code/tests/run-hook-tests.sh- Runbook: docs/runbooks/claude-code-plugin.md
- Spec: docs/superpowers/specs/2026-06-04-claude-code-plugin-design.md
- Cursor sibling: plugins/cursor/README.md (same repo)