Module-aware Context Loading

VerifiedSafe

Build context.md by reading module README, feature records, and workflow links, with fallback to git grep.

Sby Skills Guide Bot
DevelopmentIntermediate
7/25/2026
Claude Code
#context-loading#workflow-automation#documentation-parsing#code-context

Recommended for

Automated summary

Builds a context.md for a task by reading structured module docs and relevant code files.

Strengths

  • Automates context gathering from multiple sources (README, features, code).
  • Handles cross-module dependencies and existing feature constraints.
  • Reduces cognitive load by surfacing only relevant information.

Limitations

  • Requires a well-defined project structure (workflow.yaml) to work.
  • May miss context if module docs are missing or incomplete.
  • Not designed for very large or monolithic codebases.
When to use it

Use this skill when starting a new task and you need a quick summary of the module's context.

When not to use it

Do not use it for very simple tasks where context is obvious, or when module documentation is absent.

Security analysis

Safe
Quality score88/100

The skill uses Bash only for read-only commands like ls, git ls-files, and git grep to gather project context. No destructive operations, external data exfiltration, or execution of arbitrary payloads. Minimal risk.

No concerns found

How this analysis is made

Examples

Load context for sign-up API task
Run w-context-load CISTREAMIN-11-sign-up-api
Load context with explicit module name
w-context-load TASK-42-refactor-payment payment-module
Load context for current working task
w-context-load $(cat .claude/current-task.txt)

description: Phase 0b helper for w-task — load module-aware context by reading module README + features/*.md + workflow-links, then write context.md. Generic version of dev-task's streaming-docs-aware context load. argument-hint: <task-slug> [<module-name>] allowed-tools: Bash, Read, Write, Edit

w-context-load

Build context.md for the current task by reading structured module docs (README, features/*.md, workflow-links.md) when they exist, falling back to git-grep file inventory when they don't.

Reads .claude/workflow.yaml to find:

  • workflow.module_docs_root
  • workflow.feature_records_subdir
  • workflow.workflow_links_filename
  • project.module_glob
  • project.src_dirs

Inputs

  • $1 — task slug (e.g. CISTREAMIN-11-sign-up-api)
  • $2 (optional) — module name override; otherwise inferred from intake.md

Reads <state_root>/<task-slug>/intake.md for title + description.


Step 1 — Resolve module

If $2 is provided, use it. Otherwise, infer from intake.md:

  1. Extract 3-5 keywords from title + description (nouns).
  2. If module_docs_root set: ls <module_docs_root>/ and match keywords against folder names.
  3. Fallback: read first 30 lines of intake.md, look for explicit "Module: X" line.
  4. If still ambiguous: pause, ask developer to pick from listed modules.

Write state.yaml.module: <name> once resolved.


Step 2 — Read module README (if exists)

If <module_docs_root>/<NN>-<module>/README.md exists:

  • Parse "Implementation Status" section — extract ✅ Complete and ⏳ Deferred lists.
  • Parse "Depends on" / "Blocks" — cross-module deps.
  • Note last update date and any "Last modified by task: <slug>" markers.

If absent: note "Module README not found — context will be code-only."


Step 3 — Read feature records

If <module_docs_root>/<NN>-<module>/<feature_records_subdir>/ exists:

  • ls the subfolder, list all *.md files.
  • For each file, read the "Constraints for future features" section.
  • Cross-reference constraints against the current task keywords.
  • Collect any "Conflict candidates" — features that touch overlapping concerns.

Step 4 — Read code (filtered by README)

Use the Implementation Status ✅ Complete list to scope file reads:

  • For each ✅ item, find the matching file under project.module_glob / project.src_dirs and read it.
  • Skip ⏳ Deferred items — they don't exist yet.

If no README available, fall back to generic Phase 0b behaviour:

git ls-files | head -300
git grep -l "<keyword>" 2>/dev/null | head -20

Read top 3-5 matched files.


Step 5 — Reuse check

Scan for cross-cutting utilities under project.src_dirs (e.g. src/common/, src/shared/):

  • Common guards, decorators, exceptions
  • Shared services
  • Already-installed libs from package.json / equivalent

Step 6 — OQ surfacing

If workflow.oq_docs_path is set: invoke w-oq-check <module-or-task-slug> and append its output under § Known Constraints in context.md.


Step 7 — Write context.md

# Context — <title>

## Task Summary
<intake title, ticket ID, module, developer notes>

## Module Snapshot
**Implementation Status (from README):**
- ✅ <list>
- ⏳ <list>

**Depends on:** <list>
**Blocks:** <list>

## Relevant Files
| File | Why relevant |
|------|-------------|
| ... | ... |

## Patterns Observed
<naming conventions, existing similar features>

## Available Utilities
<reusable guards/decorators/libs found in Step 5>

## Previous Feature Decisions
<constraints from features/*.md — omit section if none>

## Known Constraints
<OQs from w-oq-check + flags from README>

## Suggested Approach
<1-2 sentences>

Step 8 — Update workflow-links

If workflow.module_docs_root + workflow_links_filename set:

  • Path: <module_docs_root>/<NN>-<module>/<workflow_links_filename>
  • Create from template if absent:
    # Workflow Links: <module>
    
    | Task | Folder | Started | Status |
    |------|--------|---------|--------|
    
  • Append row: | <task-slug> | [<state_root>/<task-slug>/](...) | <date> | in-progress |

Output

Print to chat: "Context loaded for module <name>. Found N relevant files, M previous feature decisions, K known constraints. Run /w-task to start planning."

From the file to a first result

The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.

View the source and supporting files

This download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.

1. Download the file

Download SKILL.md

From the root of a test project, save the file as .skill-downloads/module-aware-context-loading-mrzxuq21/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.

Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.

mkdir -p '.skill-downloads/module-aware-context-loading-mrzxuq21' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/module-aware-context-loading-mrzxuq21/download' --output '.skill-downloads/module-aware-context-loading-mrzxuq21/SKILL.md.part' && mv '.skill-downloads/module-aware-context-loading-mrzxuq21/SKILL.md.part' '.skill-downloads/module-aware-context-loading-mrzxuq21/SKILL.md'

2. Check prerequisites

Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.

Tools declared by the author (check availability in your agent): Bash, Read, Write, Edit

No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.

The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.

3. Load the skill

This file does not provide a usable name/description header for this native procedure. It remains available to download and inspect; use the manual method below.

Manual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.

4. Try a first task

Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:

Read .skill-downloads/module-aware-context-loading-mrzxuq21/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.

Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.

Related skills