Context Gather
Collect multi-source context before planning or implementation. Searches Serena, Context7, DeepWiki, and web sources, then returns a focused summary that downstream commands can detect and skip redundant fetches.
Model choice (behavior change from prior /context-gather slash command): this skill declares model: claude-sonnet-4-6, downgraded from the slash command's opus. Context retrieval is search-and-synthesis work, not deep reasoning; the cost-appropriate tier per ADR-002 model selection is sonnet. Skill behavior is otherwise unchanged.
Triggers
| Phrase |
Context |
gather context for |
User requests pre-work context collection |
context-gather |
Direct skill invocation or programmatic call from build, plan, research commands (SPEC-005) |
what do we know about |
Exploratory context retrieval |
Quick Reference
| Field |
Value |
| Input |
Task description or technology topic (free text) |
| Output |
Focused summary with code snippets, architectural insights, and CONTEXT_LOADED: <topic> marker |
| Quality Gate |
Summary addresses the stated topic; at least one queried tier reconciled (short-circuit and early-stop exempt); marker line present |
When to Use
Use this skill when:
- Starting a complex task that needs multi-source context before planning or implementation.
- A lifecycle command (
/build, /plan, /research) triggers preflight context loading.
- You need to pull framework-specific guidance from Context7 alongside project memory.
- Exploring what the memory tiers already record about a topic before committing to an approach.
When to Skip
Skip this skill when:
- A
CONTEXT_LOADED: <topic> marker for the same topic already exists in the current conversation. Do not re-fetch.
- The task is trivial and single-step (no external context needed).
- You already have sufficient context from a prior skill invocation or manual research.
- The topic is purely internal to the current file (no cross-cutting concerns).
Process
Phase 1: Check for Prior Invocation
- Scan the current conversation for an existing
CONTEXT_LOADED: marker line.
- If a marker exists whose topic matches the current request, report "Context already loaded for " and stop. Do not re-fetch.
Phase 2: Search Across Knowledge Tiers
Follow references/context-retrieval.md for
the source-priority strategy, the untrusted-content guard, and the synthesis and
citation discipline.
- Search the following tiers, in parallel where possible:
- Serena Memory: Always first. Read this project's memories for prior decisions, patterns, and ADRs on the topic.
- Context7: Query framework-specific documentation if the topic involves a known library or SDK.
- DeepWiki: Read repository-level documentation for relevant GitHub repos.
- Web Search: Fall back to web sources only when memory and docs are insufficient.
- Stop early once the queried tiers give sufficient coverage for the request.
- For each tier actually queried, emit a marker line:
TIER_QUERIED: <tier>
Where <tier> is one of: serena, context7, deepwiki, web. Emit one TIER_QUERIED: line per tier actually queried.
Phase 3: Synthesize, Emit Marker, and Return
- Combine findings into a focused summary. Include:
- Relevant code snippets and file paths.
- Architectural insights and ADR references.
- Framework-specific guidance (if applicable).
- Gaps or unknowns that remain.
- Emit the marker line at the end of the summary output:
CONTEXT_LOADED: <topic>
Where <topic> is a short, normalized label for the subject (e.g., pytest-fixtures, session-protocol, react-server-components).
- Return the summary and marker to the calling command or user. Downstream callers (
/build, /plan, /research per SPEC-005) detect the marker and skip redundant context fetches.
Extension Points
- Additional knowledge tiers: new MCP servers (e.g., a future code-search server) slot into Phase 2 without changing the skill structure.
- Marker protocol: the
CONTEXT_LOADED: format can be extended with metadata (e.g., CONTEXT_LOADED: <topic> [tier=serena,context7]) to convey which sources were queried.
Tools
This skill searches the knowledge tiers using:
mcp__serena__read_memory, mcp__serena__list_memories
mcp__context7__resolve-library-id, mcp__context7__get-library-docs
mcp__deepwiki__read_wiki_structure, mcp__deepwiki__read_wiki_contents, mcp__deepwiki__ask_question
WebSearch, WebFetch
Anti-Patterns
| Avoid |
Why |
Instead |
| Re-fetching when marker exists |
Wastes tokens and time; duplicates context |
Check for CONTEXT_LOADED: marker first |
| Querying all sources sequentially |
Slow; unnecessary when early sources suffice |
Query in parallel; stop early if coverage is sufficient |
| Returning raw tool output |
Floods context window; not actionable |
Synthesize into a focused summary with citations |
| Skipping the marker emission |
Downstream commands cannot detect prior invocation |
Always emit CONTEXT_LOADED: <topic> at the end |
| Using opus model for retrieval |
Context gathering is search and synthesis, not deep reasoning |
Use sonnet (cost-appropriate) |
Verification
After execution, confirm:
References
| Artifact |
Relationship |
| SPEC-005 REQ-005 |
Acceptance criteria AC-12 defines runtime-conditional skip via CONTEXT_LOADED: marker |
| SPEC-005 DESIGN-005 |
Per-command edit specs reference context-gather as preflight dependency |
.claude/skills/reflect/SKILL.md |
Downstream consumer that may benefit from context loaded in this skill |
.claude/skills/steering-matcher/SKILL.md |
Sibling preflight skill in the /build chain |
.claude/skills/chestertons-fence/SKILL.md |
Sibling preflight skill in the /build chain |
1---2name: context-gather3version: 1.1.04description: Gather comprehensive context from Serena memory, Context7 docs, DeepWiki, and web sources before planning or implementation. Searches across all knowledge tiers and returns a focused summary with a parseable CONTEXT_LOADED marker for downstream skip detection. Use when you say "gather context before planning", "what do we know before I start". Do NOT use for compressing or placing skill text (use context-optimizer).5license: MIT6metadata:7 source: https://skillmd.com/skills/rjmurillo/context-gather8---910# Context Gather1112Collect multi-source context before planning or implementation. Searches Serena, Context7, DeepWiki, and web sources, then returns a focused summary that downstream commands can detect and skip redundant fetches.1314> **Model choice (behavior change from prior `/context-gather` slash command)**: this skill declares `model: claude-sonnet-4-6`, downgraded from the slash command's `opus`. Context retrieval is search-and-synthesis work, not deep reasoning; the cost-appropriate tier per ADR-002 model selection is sonnet. Skill behavior is otherwise unchanged.1516## Triggers1718| Phrase | Context |19|--------|---------|20| `gather context for` | User requests pre-work context collection |21| `context-gather` | Direct skill invocation or programmatic call from build, plan, research commands (SPEC-005) |22| `what do we know about` | Exploratory context retrieval |2324## Quick Reference2526| Field | Value |27|-------|-------|28| Input | Task description or technology topic (free text) |29| Output | Focused summary with code snippets, architectural insights, and `CONTEXT_LOADED: <topic>` marker |30| Quality Gate | Summary addresses the stated topic; at least one queried tier reconciled (short-circuit and early-stop exempt); marker line present |3132## When to Use3334Use this skill when:3536- Starting a complex task that needs multi-source context before planning or implementation.37- A lifecycle command (`/build`, `/plan`, `/research`) triggers preflight context loading.38- You need to pull framework-specific guidance from Context7 alongside project memory.39- Exploring what the memory tiers already record about a topic before committing to an approach.4041## When to Skip4243Skip this skill when:4445- A `CONTEXT_LOADED: <topic>` marker for the same topic already exists in the current conversation. Do not re-fetch.46- The task is trivial and single-step (no external context needed).47- You already have sufficient context from a prior skill invocation or manual research.48- The topic is purely internal to the current file (no cross-cutting concerns).4950## Process5152### Phase 1: Check for Prior Invocation53541. Scan the current conversation for an existing `CONTEXT_LOADED:` marker line.552. If a marker exists whose topic matches the current request, report "Context already loaded for <topic>" and stop. Do not re-fetch.5657### Phase 2: Search Across Knowledge Tiers5859Follow [references/context-retrieval.md](references/context-retrieval.md) for60the source-priority strategy, the untrusted-content guard, and the synthesis and61citation discipline.62631. Search the following tiers, in parallel where possible:64 - **Serena Memory**: Always first. Read this project's memories for prior decisions, patterns, and ADRs on the topic.65 - **Context7**: Query framework-specific documentation if the topic involves a known library or SDK.66 - **DeepWiki**: Read repository-level documentation for relevant GitHub repos.67 - **Web Search**: Fall back to web sources only when memory and docs are insufficient.682. Stop early once the queried tiers give sufficient coverage for the request.693. For each tier actually queried, emit a marker line:7071```text72TIER_QUERIED: <tier>73```7475Where `<tier>` is one of: `serena`, `context7`, `deepwiki`, `web`. Emit one `TIER_QUERIED:` line per tier actually queried.7677### Phase 3: Synthesize, Emit Marker, and Return78791. Combine findings into a focused summary. Include:80 - Relevant code snippets and file paths.81 - Architectural insights and ADR references.82 - Framework-specific guidance (if applicable).83 - Gaps or unknowns that remain.842. Emit the marker line at the end of the summary output:8586```text87CONTEXT_LOADED: <topic>88```8990Where `<topic>` is a short, normalized label for the subject (e.g., `pytest-fixtures`, `session-protocol`, `react-server-components`).91923. Return the summary and marker to the calling command or user. Downstream callers (`/build`, `/plan`, `/research` per SPEC-005) detect the marker and skip redundant context fetches.9394## Extension Points95961. **Additional knowledge tiers**: new MCP servers (e.g., a future code-search server) slot into Phase 2 without changing the skill structure.972. **Marker protocol**: the `CONTEXT_LOADED:` format can be extended with metadata (e.g., `CONTEXT_LOADED: <topic> [tier=serena,context7]`) to convey which sources were queried.9899## Tools100101This skill searches the knowledge tiers using:102103- `mcp__serena__read_memory`, `mcp__serena__list_memories`104- `mcp__context7__resolve-library-id`, `mcp__context7__get-library-docs`105- `mcp__deepwiki__read_wiki_structure`, `mcp__deepwiki__read_wiki_contents`, `mcp__deepwiki__ask_question`106- `WebSearch`, `WebFetch`107108## Anti-Patterns109110| Avoid | Why | Instead |111|-------|-----|---------|112| Re-fetching when marker exists | Wastes tokens and time; duplicates context | Check for `CONTEXT_LOADED:` marker first |113| Querying all sources sequentially | Slow; unnecessary when early sources suffice | Query in parallel; stop early if coverage is sufficient |114| Returning raw tool output | Floods context window; not actionable | Synthesize into a focused summary with citations |115| Skipping the marker emission | Downstream commands cannot detect prior invocation | Always emit `CONTEXT_LOADED: <topic>` at the end |116| Using opus model for retrieval | Context gathering is search and synthesis, not deep reasoning | Use sonnet (cost-appropriate) |117118## Verification119120After execution, confirm:121122- [ ] Reconciliation (fetch path only): `grep -c '^TIER_QUERIED:' <output>` >= 1, with one `TIER_QUERIED: <tier>` line per source actually queried. Exempt when the skill short-circuited on a prior `CONTEXT_LOADED:` marker (no tiers queried) or early-stopped after one source gave sufficient coverage.123- [ ] Summary addresses the stated topic with specific findings, not generic advice.124- [ ] `CONTEXT_LOADED: <topic>` marker line is present at the end of output.125- [ ] No raw tool output was returned; findings are synthesized.126- [ ] If a prior marker existed for the same topic, the skill short-circuited without re-fetching.127128## References129130| Artifact | Relationship |131|----------|-------------|132| SPEC-005 REQ-005 | Acceptance criteria AC-12 defines runtime-conditional skip via `CONTEXT_LOADED:` marker |133| SPEC-005 DESIGN-005 | Per-command edit specs reference context-gather as preflight dependency |134| `.claude/skills/reflect/SKILL.md` | Downstream consumer that may benefit from context loaded in this skill |135| `.claude/skills/steering-matcher/SKILL.md` | Sibling preflight skill in the `/build` chain |136| `.claude/skills/chestertons-fence/SKILL.md` | Sibling preflight skill in the `/build` chain |