/claude-code-expert:cc-second-brainfrom claude-code-expert
Manages a three-tier memory system (engram, Obsidian vault, plugin rules) for Claude Code setups. Saves findings, consolidates engram into durable knowledge, writes repo docs to Obsidian, and runs /cc-memory subcommands.
Ships in claude-code-expert. 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.
Read when SKILL.md points to them.
Three-tier memory: engram (working) + Obsidian vault (durable) + plugin rules (baseline). Full separation-of-concerns in conventions.md and topic-key-taxonomy.md.
Did work just conclude?
│
├─ Is it a one-off observation, decision, or discovery?
│ └─ YES → engram (tier 1) — mem_save with CC topic_key (see taxonomy)
│
├─ Is it a reusable pattern (used or useful in ≥ 2 repos)?
│ └─ YES → Obsidian (tier 2) — Research/Claude-Code/Patterns/{slug}.md
│ with frontmatter auto_generated: false if user-curated
│
├─ Is it repo-specific durable knowledge?
│ └─ YES → Obsidian (tier 2) — Repositories/{org}/{repo}.md
│ or Decisions/NNNN-title.md for ADRs
│
└─ Is it a rule every consumer-repo Claude should follow?
└─ YES → plugin rules (tier 3) — memory/rules/cc-always.md
(only the plugin maintainer edits this)
Call mem_save with CC topic_key. See topic-key-taxonomy.md for full prefix table.
Required: title, content (What/Why/Where/Learned format).
Recommended: topic_key starting with cc/*, type (decision/bugfix/architecture/discovery/pattern/config/preference), scope (project or personal).
Examples:
mem_save({
title: "Chose protect-sensitive-files hook for all new setups",
type: "decision",
topic_key: "cc/hooks/protect-sensitive-files",
content: "**What**: Default install on every /cc-setup run\n**Why**: Prevents writes to .env / credentials / keys\n**Where**: memory/rules/cc-always.md\n**Learned**: Hook matcher Write|Edit is correct — don't also match MultiEdit, it inherits"
})
Preferred: use Obsidian MCP tools (mcp__obsidian__*) if loaded — they append/update via the Local REST API.
Fallback: direct Write tool at vault paths.
Auto-generated note frontmatter (consolidator only):
---
auto_generated: true
source: engram
topic_key: cc/patterns/{slug}
reinforcement_count: 7
first_seen: 2026-04-09
last_updated: 2026-04-16
tags: [claude-code, pattern, auto]
---
User-curated note frontmatter:
---
title: {short title}
created: {YYYY-MM-DD}
tags: [claude-code, type/pattern]
---
Durability invariant: notes WITHOUT auto_generated: true are user-curated. Consolidator never overwrites them. If you're writing a note on behalf of the user, use auto_generated: false explicitly.
memory/rules/cc-always.md — user-only (edit via /cc-memory edit-always).
memory/rules/cc-patterns.md — consolidator-only.
memory/rules/DRAFT.md — consolidator-only (conflicts).
Do NOT hand-edit cc-patterns.md or DRAFT.md — the consolidator owns them.
| Need | Tool |
|---|---|
| "Have we solved this before?" | mem_search with cc/ prefix hint → mem_context for recent history |
| "What's the current rule for X?" | Read memory/rules/cc-always.md and memory/rules/cc-patterns.md |
| "What patterns exist for Y?" | Obsidian MCP search or Grep on Research/Claude-Code/Patterns/ |
| "What does this repo know?" | Read Repositories/{org}/{repo}.md first |
| Subcommand | Action |
|---|---|
search <query> | engram mem_search scoped to cc/* keys |
export [--domain ...] | write human digest to memory/digests/{date}.md |
consolidate | run consolidator: engram → Obsidian + cc-patterns.md |
edit-always | open memory/rules/cc-always.md |
review | open memory/rules/DRAFT.md (conflicts) |
status | show: last consolidation, pattern count, draft count, cc/* observation count |
| Tool | Used for |
|---|---|
mem_search | Find cc/* observations |
mem_get_observation | Fetch full content of a match |
mem_context | Recent session context for timing |
NEVER used by the consolidator: mem_save, mem_update, mem_delete. Those are Claude-in-session or user-manual operations only.
Repositories/{org}/{repo}.md with auto_generated: true when it's actually hand-curated → consolidator will overwrite it later.memory/rules/cc-patterns.md by hand → consolidator will clobber your edits on next run. Put hand-curation in cc-always.md.mem_session_summary at end of session → next session starts blind; consolidator has less to work with.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
21 skills in this plugin
/cc-agentic-patternsSelect and wire an agentic design pattern (reflection, prompt chaining, routing, parallelization, orchestrator-workers, evaluator-optimizer, ReAct, blackboard) into the 5-layer Claude Code stack. Use this skill whenever deciding how to structure a multi-step task, whether to spawn subagents, how to run parallel review, or when to use which pattern. Triggers on: "which pattern", "orchestrate", "parallel review", "self-review", "chain of thought", "eval-optimizer loop", "blackboard", "ReAct", "how to decompose this task"./cc-agent-teamsSelect and coordinate multi-agent teams (topology kits, role-based squads, lifecycle, worktree isolation). Use this skill whenever launching parallel agents, designing a review board, running a debug council, scheduling an orchestrator-workers team, configuring agent tool restrictions, or deciding between solo and team execution. Triggers on: "launch a team", "parallel agents", "review board", "debug council", "architect-implementer-reviewer", "swarm", "multi-agent", "subagents for X", "team topology", "agent lifecycle"./cc-auto-modeAuto mode permission handling — classifier-based approvals, PermissionDenied hook, defer permissionDecision, and autonomy profiles for hands-off Claude Code usage/cc-autonomy-modeConfigure Claude Code's autonomous operating mode — profile selection (conservative, balanced, aggressive, unattended-review), permission blocks, and the three gate agents (planner, verifier, reviewer). Use this skill whenever enabling autonomous mode, switching profiles, tightening permissions for production branches, or setting up unattended execution. Triggers on: "autonomy", "unattended mode", "auto-approve", "permission mode", "autonomy profile", "gates", "/cc-autonomy", "planner verifier reviewer", "let claude run on its own"./cc-context-budgetingManage Claude Code's context window — token arithmetic, /compact strategy, anchor preservation, progressive loading, session analytics. Use this skill whenever a session gets long, context approaches limits, after /compact, when deciding what to load into CLAUDE.md vs leave in references, or when analyzing session cost/token usage. Triggers on: "context full", "compact", "too many tokens", "budget", "session analytics", "save tokens", "context window", "/compact strategy"./cc-deep-code-intelligenceEvidence-driven deep analysis for hard coding problems — architecture decisions, root-cause investigation, high-stakes refactor planning, performance bottleneck isolation. Use this skill whenever the user asks for "the best approach", a "deep analysis", "root cause", "principal engineer review", or runs /cc-intel. Also triggers on hard debugging questions, major architectural choices, tricky performance problems, or any task where a hypothesis tree and evidence table matter more than a fast answer.npx claudepluginhub thelobbi/claude --plugin claude-code-expertOther plugins' skills for the same job