/marvin:groundfrom marvin
Surveys a repo and grounds externally on relevant internet parts via WebSearch, WebFetch, and gh. Produces a dated, sourced briefing cached for 7 days. Composable as pre-flight for other skills.
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.
Survey the current repo, then ground externally on what's relevant. Dynamic per-repo — no static config, no curated tech list. The repo IS the configuration.
This skill MAY: read manifests, scan git history, fetch from the web (WebSearch/WebFetch/context7/gh), write the briefing file at docs/ground/<fingerprint>.md.
This skill MAY NOT: edit code, modify configuration, install dependencies, run anything other than read-only gh queries. Briefings are advisory artifacts.
Designed to run as a subagent. Web research bloats context fast — keep the heavy fetching in an isolated context and return only the synthesized briefing to the caller.
| Shortcut | Why It Fails | The Cost |
|---|---|---|
| "Skip the local survey — just web search for the topic" | The repo's stack disambiguates the search. Without it, results are generic. | Wallpaper briefings that don't change Claude's behavior |
| "Fetch everything in parallel, ignore timeouts" | One slow source blocks the briefing. Worse: stalls the calling skill. | /work latency balloons; Ondrej learns to skip /ground |
| "Synthesize without citing sources" | Looks confident, can't be verified, indistinguishable from training-data regurgitation | Defeats the entire point — briefings must be fact-checkable |
| "Always refresh — never trust the cache" | Re-fetches every time, makes cross-session reuse impossible | Token/time cost on every invocation; cache pattern wasted |
| "Generate a long briefing — more detail is better" | Past 1500 tokens the briefing gets ignored as wallpaper | Token waste + behavioral degradation |
Entry: Skill invoked standalone (slash command or Task call from another skill).
Resolve:
cwd — current working directory. From the invocation context.topic — what the user (or calling skill) is grounding for. From the invocation arguments. Required; if absent, ask via AskUserQuestion.local_only — boolean flag. Default false. When true, skip Phase 4 (external grounding).force_refresh — boolean flag. Default false. When true, skip cache check in Phase 3.invocation_mode — standalone if a user invoked /ground directly (slash command); embedded if another skill or agent handed you this protocol via a Task/subagent call.Standalone self-dispatch: if invocation_mode = standalone AND local_only = false, do not run Phases 1-6 in this context — the web research would bloat the user's main context, the exact thing this skill exists to prevent. Instead, spawn one subagent to do the work and return only the briefing:
Task grounder("Execute /marvin:ground Phases 1-6 inline as a subagent — survey, fingerprint, cache-check, external grounding, synthesize, write. Topic: <topic>. cwd: <cwd>. local_only=false. force_refresh=<flag>. Return the synthesized briefing.")
Take the returned briefing and skip straight to Phase 7. The explicit "inline as a subagent" instruction tells the spawned agent to run the phases directly and not re-dispatch.
Run Phases 1-6 inline yourself only when invocation_mode = embedded, or when invocation_mode = standalone AND local_only = true (a local-only survey is cheap — nothing to isolate).
Exit: Inputs resolved. Either a subagent has been dispatched (standalone path — proceed to Phase 7 with its briefing), or you run Phases 1-6 inline.
Entry: Inputs known.
Scan, in parallel where possible (use Glob + Read in batches):
cwd and one level into submodules: package.json, Gemfile, pyproject.toml, Cargo.toml, go.mod, composer.json, pubspec.yaml. Extract: detected primary language, top dependencies (max 10), versions.CLAUDE.md, AGENTS.md, README.md (first 100 lines). Extract: project mission, conventions, stack callouts.git log -20 --format="%h %s", git status --short, git branch --show-current. Note: recent themes, in-flight files.gh available and repo has remote): gh pr list --limit 5 --json title,number,labels. Note: in-flight work, themes.If cwd has no manifest files AND no CLAUDE.md/AGENTS.md AND no git history → emit "insufficient local signal for grounding" and exit. Don't fabricate a briefing for a directory with no code.
Exit: Local survey complete. Have: detected stack, conventions, recent themes.
Entry: Local survey complete.
Compute the cache key as <repo-name>__<dominant-tech-or-topic> (double underscore — single chars like : or - cause ambiguity with repo names containing hyphens):
repo-name: basename of cwd, or git remote get-url origin parsed name if more authoritative.dominant-tech-or-topic: priority order — pick the stablest key that's still accurate, so briefings get reused instead of fragmenting:
nextjs, expo, rails, django, etc. This is the default. It stays stable across a repo's normal development, so the 7-day cache actually gets reused.topic names a bounded, durable sub-area of the repo (auth, billing, payments, migrations) — never a one-off feature or task title. "Add CSV export" is a task, not a sub-area: it grounds under the framework key.default.File name on disk uses the fingerprint verbatim with .md suffix. Examples: quellis-cor__expo.md, bobo__default.md, harness-lab__auth.md, aibility__rails.md.
Exit: Fingerprint computed.
Entry: Fingerprint known.
Look for docs/ground/<fingerprint>.md in cwd. If it exists, read its last_grounded frontmatter timestamp.
force_refresh=true → skip cache, go to Phase 4.last_grounded is within 7 days of now → return the cached briefing's summary (everything below the frontmatter, capped at ≤1500 tokens — the same cap Phase 6 applies to fresh briefings) to the caller; skip Phase 4-6.last_grounded is older than 7 days → go to Phase 4 (refresh).Exit: Either cached briefing returned (skill ends here) OR proceed to fetch.
Entry: Cache miss or stale.
If local_only=true → skip this phase; produce a local-only briefing (Phase 5 with no external sources).
Otherwise, route signals from Phase 1 + topic to external tools, in parallel where possible. Keep grounding bounded:
gh/Bash call in timeout 30 ... — a real, enforceable limit.confidence: medium. If a slow fetch is still pending after the others return, synthesize without it.Routing:
| Signal | Tool | What to fetch |
|---|---|---|
| Each detected library/framework | WebSearch (context7 too, if a context7 MCP server is available in this environment) | Version-aware docs / changelog for the relevant API surface — e.g. "<lib> <version> docs", "<lib> migration guide" |
topic mentions "best practice", "current pattern", "recent" | WebSearch | Queries like "<tech> best practices 2026", "<tech> migration <version>", "<topic> current approach" — as many as the topic needs |
topic is an error symptom or "known issue" | gh search + Grep on docs/solutions/ | Recent issues in tech's GitHub repo + local prior-art matches |
Specific URL in topic | WebFetch | The URL directly |
| Manifest shows a tech with known recent release | WebSearch | "<tech> changelog <last-30-days>" or <tech> release notes |
If a gh/Bash call hits its timeout, or a slow fetch is dropped, note it and continue. If ALL external sources fail → produce a local-only briefing and tag confidence: low.
Exit: External research collected. Have: per-source raw output + URLs.
Entry: Local survey + (optionally) external grounding complete.
Produce a terse briefing. Style rules:
Section template (use these exact headings):
## Repo State
- <5-10 bullets: detected stack, dominant framework, key dependencies with versions, CLAUDE.md highlights, recent commit themes, in-flight files>
## Recent Ecosystem Changes
- <Per detected tech, only when there's signal: "<tech> v<X>.<Y> released <date>: <one-line>. [URL]">
- <Skip silently when no signal — don't pad>
## Known Footguns
- <gh issues + docs/solutions/ matches relevant to topic or detected stack, with URLs>
- <Skip if none>
## Recommended Further Reading
- <Max 5 URLs, each with a one-line "why">
Exit: Synthesized briefing ready.
Entry: Briefing synthesized.
---
last_grounded: <ISO timestamp UTC>
fingerprint: <fingerprint from Phase 2>
repo: <repo-name>
sources_consulted:
- <URL or "context7:<lib>" or "gh:<owner>/<repo>" or "local:<file>">
confidence: high | medium | low
---
mkdir -p docs/ground/ if needed.docs/ground/<fingerprint>.md (overwriting any stale version).Exit: Briefing persisted; summary returned.
Entry: invocation_mode = standalone (established in Phase 0). Skip this phase entirely when invocation_mode = embedded — control returns to the caller.
Offer next steps.
/compound — Promote this briefing into a permanent solution doc at docs/solutions//plan — Convert the briefing's insights into an implementation plandocs/ground/<fingerprint>.md for future reuseBefore returning, verify:
last_grounded, fingerprint, sources_consultedlocal_only=true or all external sources failed, confidence: low is setdocs/ground/<fingerprint>.md/compound for permanent solutions, and inspectable as real artifacts.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub ondrej-svec/heart-of-gold-toolkit --plugin marvin13 skills in this plugin
/compoundCapture knowledge — solutions, context docs, learnings, and principles. Use after fixing non-trivial bugs, creating context for AI, or discovering patterns worth preserving. Triggers: compound, document solution, capture fix, save solution, knowledge compound, document this, save this fix, context, create context, update context, build context, learn, save learning, remember this.
/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.
Other plugins' skills for the same job