/marvin:compoundfrom marvin
Captures knowledge (solutions, context docs, learnings, principles) by structuring it for future use. Automatically invoked after bug fixes or pattern discoveries via triggers like 'compound', 'document solution', 'learn'.
Ships in marvin. 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.
Capture knowledge while context is fresh. Solutions, context docs, learnings — whatever you just discovered, structure it so it's findable and useful next time.
This skill MAY: read code/docs for context, write knowledge documents (solutions, context docs, learnings), update CLAUDE.md. This skill MAY NOT: edit application code, run tests, deploy, fix bugs. Knowledge capture only.
| Shortcut | Why It Fails | The Cost |
|---|---|---|
| "Skip duplicate check — I'll write a new doc" | Parallel docs drift and eventually contradict | Knowledge drift → wrong fix applied next time |
| "Skip frontmatter — it's just metadata" | Frontmatter IS the search index. Without it, the solution is unfindable. | Captured but never surfaced → wasted effort |
| "Good enough — I'll refine later" | You won't. Context is freshest NOW. | Incomplete doc → next person can't reproduce the fix |
| "Too trivial to document" | The "trivial" fix that took 30 minutes will take someone else 30 minutes too | Repeated debugging of known problems |
Entry: User invoked /compound — possibly after a fix, with a topic, or with no context.
Auto-detect capture type:
| Context | Capture Type | Output Location |
|---|---|---|
| Just fixed a bug, resolved an error | Solution | docs/solutions/{domain}/{topic}.md |
| Need to create/update AI context | Context doc | CLAUDE.md, ${CLAUDE_PLUGIN_ROOT}/knowledge/{topic}.md, or docs/ |
| Discovered a pattern or principle | Learning | CLAUDE.md or memory files |
If invoked after a fix: Scan conversation for what broke, what was investigated, what fixed it.
If invoked with a topic (e.g., /compound auth token refresh): Use as hint.
If unclear: Use AskUserQuestion with:
Repeated workflow friction counts as captureable knowledge. If the same clarification keeps happening during brainstorm, plan, work, or review, capture whether it belongs in repo doctrine or in reusable toolkit workflow guidance.
Exit: Capture type determined.
Entry: Capture type known.
WAIT — search before writing:
Search docs/solutions/, CLAUDE.md, ${CLAUDE_PLUGIN_ROOT}/knowledge/ for:
- Similar symptoms or component names
- Same error messages or topic
- Same root cause or pattern
If related content exists: Use AskUserQuestion (header: "Duplicate?", question: "Found related: {path}. Update existing or create new?") with options: "Update existing (Recommended)" (description: "Extend the existing doc — avoids parallel docs that drift") and "Create new" (description: "This is different enough to warrant a separate document").
Principle: update > create. Don't create parallel docs that drift.
After the duplicate check, apply capture heuristics:
related: frontmatter.In autonomous mode: make the capture decision using these heuristics, document the reasoning in the output. Skip AskUserQuestion for clear-cut cases (obvious duplicate → update, obvious novel → create).
Exit: Confirmed new or updating existing.
Entry: Duplicate check done.
Extract from conversation or user input:
Determine the right location:
| Type | When | Where |
|---|---|---|
| Project CLAUDE.md | Core conventions, rules for every session | Root CLAUDE.md |
| Knowledge file | Domain reference loaded on demand | ${CLAUDE_PLUGIN_ROOT}/knowledge/{topic}.md |
| Onboarding doc | Setup, architecture overview | docs/developers/ |
| Decision record | Why a specific decision was made | architecture/decisions/ |
${CLAUDE_PLUGIN_ROOT}/knowledge/ directory or skill docsExit: Knowledge extracted and structured.
Entry: Knowledge extracted, location determined.
Check the project's CLAUDE.md for a "Toolkit Output Paths" table. Use those paths if present, otherwise use defaults.
Output path: {solutions_path}/{domain}/{kebab-topic}.md
(Default solutions_path: docs/solutions/)
Domains: auth, database, scoring, frontend, backend, infrastructure, deployment, testing, integration, or create a new one.
---
title: "{Brief description of problem and fix}"
type: solution
date: YYYY-MM-DD
domain: {domain}
component: {specific component or service}
symptoms:
- "symptom 1"
- "symptom 2"
root_cause: "{one-line root cause}"
severity: low | medium | high | critical
related: []
---
# {Title}
## Problem
{What happened. Symptoms. How it manifested.}
## Root Cause
{Why it happened. The actual underlying issue.}
## Fix
{What resolved it. Specific code changes, config changes, or commands.}
## Prevention
{How to avoid this in the future. Tests, patterns, checks.}
## Related
- {Links to related solutions, ADRs, or documentation}
For CLAUDE.md: Keep concise. Tables for quick reference. Link to details. For knowledge files: 800-1200 words. What and why → how → pitfalls.
Exit: Document written.
Entry: Document written.
Verify:
Present:
Knowledge captured at {path}
Searchable by: {frontmatter keywords}
Use AskUserQuestion with:
If user selects "Capture more": Return to Phase 0.
Before delivering, verify:
/deep-thought:plan checks docs/solutions/ before planning. /marvin:review suggests /marvin:compound when it finds insights.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
knowledge-capture, documentation, solutions, learnings, context-docs, principles
npx claudepluginhub ondrej-svec/heart-of-gold-toolkit --plugin marvin13 skills in this plugin
/copy-editorTwo-layer copy editor. Layer 1 is a deterministic typography audit (regex-level, auto-closeable). Layer 2 is LLM judgment — reject-list hits, nominal-style detection, clarity/ambiguity pass for participant-facing content, voice/register check, and spoken- readability read. Loads repo-local .copy-editor.yaml to compose the baked-in language profile with the repo's style guide, reject list, examples, and voice doctrine. Czech is a full profile; English is a stub. **Activate automatically when the conversation edits or creates any file matching a repo's .copy-editor.yaml include scope, when the user asks about Czech or participant-facing copy, when reviewing content PRs, or when a work slice would otherwise close without a Layer 2 pass on edited visible-surface content.** Do not wait to be invoked by name. Explicit trigger phrases: copy edit, editorial pass, czech review, czech copy review, audit copy, check typography, review prose, tighten copy.
/groundSurvey a repo and ground externally on the relevant parts of the internet. Local manifest scan + CLAUDE.md/AGENTS.md + recent git activity, then external grounding via WebSearch, WebFetch, and gh — synthesized into a terse, dated, sourced briefing cached at docs/ground/<fingerprint>.md with a 7-day freshness window. Composable: invoked standalone or embedded as a pre-flight phase in other skills. Triggers: ground, ground yourself, ground myself, survey and ground, pre-flight grounding, research the stack, what's new in.
/harness-syncReplicate a known-good Claude Code harness onto another machine or into another repo. Clones or updates the user's config repo, verifies it against the shipped conventions, reinstalls plugin marketplaces, and reports drift between two machines. Use when setting up a second machine, onboarding a new laptop, recovering a harness, or checking whether two machines have diverged. Triggers - harness sync, replicate harness, set up my config on this machine, sync claude config, new laptop setup, harness drift, are my machines in sync./harness-upInstall harness-engineering doctrine into a repository — short root AGENTS.md, docs/ taxonomy (plans, ADRs, solutions), verification rules, and project-scoped Claude Code plugins. Works on empty repos (greenfield scaffold), existing repos (survey + upgrade), and ports of existing systems. Distinct from `marvin:scaffold` (which installs deps and configs); distinct Triggers: harness up, harness this repo, set up AGENTS.md, agent doctrine, make this repo agent-ready, init harness, scaffold agent context.
/quick-reviewFast opinionated quality pass — simplicity, test integrity, and correctness. Not a deep review. One pass, one voice. For depth, use /review (deep-thought). Triggers: quick review, quality check, sanity check, check my code, is this good.
/redteamAdversarial review — find weaknesses and expose them with failing tests. Checks architecture conformance, stub detection, security, and story completeness. Never modifies implementation. Standalone or pipeline-aware via env vars. Triggers: redteam, adversarial review, attack, probe, find weaknesses.
Other plugins' skills for the same job