godmode:context-map
Skill1 starsChanged 56 days agoMITView on GitHub
Generate a map of all files relevant to a task before making any changes. Use this skill at the start of any implementation task — before writing a plan, before opening a file to edit, before dispatching subagents. Identifies files to modify, affected crates, dependency edges, test coverage, and reference patterns. Output feeds directly into the Architecture section of a godmode plan.
In this repository76 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- godmode:agent-governanceSkill
- godmode:agent-improvement-loopSkill
- agents-skill-saveSkill
- baml-add-typesSkill
- godmode:brainstormSkill
- godmode:capSkill
- godmode:changelogSkill
- godmode:ci-fixSkill
- godmode:code-reviewSkill
- godmode:cross-issueSkill
- godmode:crs-discoverSkill
- godmode:crs-hook-testingSkill
- godmode:crs-installSkill
- godmode:crs-propose-rulesSkill
- godmode:crs-validateSkill
- godmode:dead-codeSkill
- godmode:decomposeSkill
- godmode:dep-auditSkill
- godmode:dep-bumpSkill
- godmode:designSkill
- devloop-session-primerSkill
- godmode:dialecticSkill
- godmode:doc-maintainerSkill
- godmode:doc-reviewSkill
- godmode:doc-syncSkill
- godmode:doc-writerSkill
- doob-db-inspectorSkill
- doob-release-managerSkill
- godmode:doublecheckSkill
- dual-forge-pr-mergeSkill
- gh-bulk-issuesSkill
- godmode:health-scoreSkill
- godmode:ingestSkill
- godmode:introspectionSkill
- godmode:issue-triageSkill
- godmode:memory-bankingSkill
- godmode:mergeSkill
- godmode:mini-context-graphSkill
- godmode:mistake-trackerSkill
- godmode:moaSkill
- notfiles-release-workflowSkill
- godmode:observability-as-infrastructureSkill
- godmode:parallel-agentsSkill
- godmode:pattern-learnerSkill
- planning-with-cruxSkill
- godmode:pr-authorSkill
- godmode:receiving-reviewSkill
- godmode:refactoringSkill
- godmode:release-notesSkill
- release-readiness-checkSkill
- remote-upstream-triageSkill
- repo-gap-backlogSkill
- godmode:rust-conventionsSkill
- rustqualSkill
- rustqual-workspaceSkill
- rust-release-workflow-authorSkill
- godmode:self-reflectSkill
- session-wrap-commit-pushSkill
- godmode:systematic-debuggingSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
10 rules. About 0 are common, 7 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 15
Before implementing any changes, map the codebase.
- Very specific: line 22
Before writing a godmode:writing-plans plan
- Distinctive: line 23
Before dispatching parallel agents — slot assignments depend on crate boundaries
- Distinctive: line 24
When picking up a task in an unfamiliar part of the codebase
- Distinctive: line 30
Search for the types, functions, modules, and traits named in the task:
- Distinctive: line 91
Look for similar implementations already in the codebase to follow:
- Distinctive: line 114
If yes, all consumers (Step 2) must be updated in the same plan.
- Very specific: line 118
Check godmode context --json consumers in hook scripts and agents.
- Very specific: line 126
Write the context map as a ## Context Map section at the top of the plan, before Architecture:
- Distinctive: line 169
Before handing the map to the plan author:
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Context Map
Before implementing any changes, map the codebase. A context map answers: what exists, what needs to change, what depends on it, and what tests cover it. Writing a plan without this produces incomplete task lists and missed dependencies.
When to Run
- At the start of any multi-file or multi-crate task
- Before writing a
godmode:writing-plansplan - Before dispatching parallel agents — slot assignments depend on crate boundaries
- When picking up a task in an unfamiliar part of the codebase
Step 1: Locate Directly Relevant Files
Search for the types, functions, modules, and traits named in the task:
# Search for a type or function name across all Rust files
rg "TypeName|fn_name|mod_name" --type rust -l
# Search for a trait implementation
rg "impl TraitName" --type rust -l
# Find where a module is declared vs used
rg "^mod context|use .*context" --type rust -l
# Search across all file types if needed (configs, YAML, SQL)
rg "keyword" -lList every file that declares, implements, or directly references the thing you are changing. These are candidates for Files to Modify.
Step 2: Trace Dependency Edges
For each file identified in Step 1, find what imports from it and what it imports:
# Who imports this module?
rg "use godmode_core::context" --type rust -l
# What does this file depend on? (scan its use declarations)
rg "^use " crates/godmode-core/src/context.rs
# Find re-exports that might hide consumers
rg "pub use.*context" --type rust -lThese are Dependencies — files that may need updates when the modified file changes its public API. Mark any that re-export or wrap the changed type.
Step 3: Find Test Coverage
# Find tests that exercise the relevant module
rg "use.*context|context::" --type rust crates/ | rg "#\[test\]|#\[tokio::test\]" -l
# Broader: find test files/modules touching the keyword
rg "context" --type rust crates/ -l | rg "tests?|spec"
# In a workspace, check godmode-conformance too
rg "context" tests/ -l 2>/dev/nullFor each test file found, note what behaviour it exercises. Flag any gap: functionality you intend to change that has no corresponding test.
Step 4: Find Reference Patterns
Look for similar implementations already in the codebase to follow:
# Find other modules with the same shape (e.g. all modules that impl a Serialize struct)
rg "#\[derive.*Serialize" --type rust -l | head -10
# Find existing CLI subcommands as reference for a new one
rg "pub fn run" crates/godmode-cli/src/ -l
# Find similar integration patterns
rg "std::process::Command" --type rust -lThese are Reference Patterns — existing code that shows the project's conventions. Prefer matching the nearest similar module over inventing new patterns.
Step 5: Assess Risk
Answer each of these before declaring the map complete:
- Public API change? — does the modification change a
pubfunction/struct/trait signature? If yes, all consumers (Step 2) must be updated in the same plan. - Serialization format change? — any
#[derive(Serialize, Deserialize)]struct that changes shape may invalidate persisted state files (.ctx/godmode/tasks.yaml, trace JSONL). - CLI output change? — any subcommand output change may break callers using
--json. Checkgodmode context --jsonconsumers in hook scripts and agents. - Cross-crate boundary? — changes that cross from
godmode-coretogodmode-clior intogodmode-conformanceneed tasks in multiple crates with explicit ordering.
Output Format
Write the context map as a ## Context Map section at the top of the plan, before Architecture:
## Context Map
### Files to Modify
| File | Purpose | Changes Needed |
| -------------------------------------------- | --------------------- | ------------------------------- |
| `crates/godmode-core/src/context.rs` | SessionContext struct | add `blocked_count` field |
| `crates/godmode-cli/src/commands/context.rs` | CLI handler | emit new field in --json output |
### Dependencies (may need updates)
| File | Relationship |
| -------------------------------- | --------------------------------------------- |
| `crates/godmode-core/src/lib.rs` | re-exports `SessionContext` |
| `hooks/session-start.nu` | calls `godmode context --json`, parses output |
### Test Coverage
| Test | Covers |
| --------------------------------------------- | ----------------------- |
| `crates/godmode-core/src/context.rs` (inline) | `SessionContext::build` |
| `tests/conformance/src/context.rs` | `--json` output shape |
### Reference Patterns
| File | Pattern to Follow |
| ---------------------------------- | ------------------------------------------ |
| `crates/godmode-core/src/cache.rs` | struct serialised to JSON file, same shape |
### Risk
- [ ] `SessionContext` is `pub` — all consumers listed above must be updated
- [ ] `--json` output changes: update conformance test fixture
- [ ] No migration needed — field is additive with `#[serde(default)]`Checklist
Before handing the map to the plan author:
- Every file in Files to Modify was found by search, not assumed
- All
pubAPI consumers are listed in Dependencies - Test coverage gaps are flagged explicitly (not silently omitted)
- Risk items are concrete — no "may need changes" without naming the file
- Map was produced from the current HEAD, not from memory or stale context
Related
skills/writing-plans/SKILL.md— context map feeds into Plan Architecture sectionskills/parallel-agents/SKILL.md— crate boundaries from the map drive slot assignmentsskills/systematic-debugging/SKILL.md— same search techniques applied to bug tracing
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

