Selective Context Loading
Route only task-relevant foundational files into each AI skill.
- Difficulty
- Moderate
- Time to result
- ~days to results
- Steps
- 6
- Confidence
- 99%
Selective Context Loading is a routing mechanism that connects a growing foundational library to individual AI skills without injecting every file into every task. Each foundational file contains a header declaring when it should be loaded and when it should not. At startup, a skill scans the foundational folder, compares those declarations with its present objective, and retrieves only the applicable files. A writing skill might load creator style and audience context, while a competitive-analysis skill might load market positioning without unrelated voice instructions. This keeps the model focused, reduces contradictory guidance, and allows the foundation to expand to many files without making every execution heavier. The mechanism turns a static context folder into a task-aware retrieval layer.
Origin
Extracted from Marketing Against The Grain, where the host explains how a skill can automatically scan a foundational folder and load only the Markdown files relevant to its task.
Core principles
- 01More context is not automatically better context.
- 02Each foundational file should declare its intended and excluded uses.
- 03The task determines which files a skill loads.
- 04Selection should happen automatically before substantive skill execution.
- 05Context boundaries reduce confusion and contradictory instructions.
How to run it
- 1
Define file responsibility
Assign one clear purpose to each foundational file and remove information that belongs elsewhere.
Pro tip Use a short purpose statement that distinguishes the file from its neighbors.
Watch out Ambiguous responsibilities make reliable routing impossible.
- 2
Declare inclusion rules
Add a header explaining the tasks, outputs, or decisions for which the file should be loaded.
Pro tip Use concrete task examples such as blog posts, emails, or competitive positioning.
Watch out Broad rules such as load for marketing can cause nearly universal inclusion.
- 3
Declare exclusion rules
State when the file should not be loaded, especially where a neighboring file is sufficient.
Pro tip Name common false-positive tasks to make exclusion testable.
Watch out Inclusion rules alone may not resolve overlapping use cases.
- 4
Scan before execution
Make each skill inspect the foundational directory and evaluate the file headers before performing its main task.
Pro tip Keep this routing block consistent across skills.
Watch out Routing after content generation cannot influence the work already produced.
- 5
Load the minimum sufficient set
Retrieve the files that jointly supply the required context and exclude unrelated material.
Pro tip Test the same task with and without borderline files to identify the smallest useful set.
Watch out Over-pruning can remove essential context just as overloading can create confusion.
- 6
Audit routing behavior
Review which files were selected for representative tasks and refine declarations when selection is wrong.
Pro tip Maintain a small suite of common task-to-file routing examples.
Watch out As files evolve, old declarations can silently become inaccurate.
In the wild
A landing-page skill scans the foundation and loads the audience, creator-style, positioning, and relevant journey files because it must choose resonant language, voice, differentiation, and conversion proof. It excludes unrelated operational context.
→ The skill receives rich but focused guidance without loading the entire library.
A competitive-analysis skill loads the positioning map and any required audience evidence but excludes creator-style instructions because it is producing internal analysis rather than public content.
→ The model avoids irrelevant voice constraints and concentrates on strategic comparison.
Common mistakes
Loading the whole foundation
Injecting every available file can overload the model and expose it to irrelevant or conflicting instructions.
Writing vague routing headers
Unclear inclusion and exclusion rules prevent reliable task-to-file matching.
Skipping the preflight scan
A skill cannot benefit from task-specific context if it begins execution before selecting files.
Is it for you?
Best for
It is best for teams with many reusable context files and many specialized AI skills.
Not ideal for
It is not ideal when a single small foundation is always relevant in full and introduces no context overload.
From the transcript
“They only need to grab the ones that are relevant for the thing that skill does.”
“So every foundational file has a header that declares what the skill should use it for.”
“So in every skill, the first thing it does is going to scan your foundational folder, it's going to look across all of your.md files,…”
From the episode
The Real Reason Your AI Content Is Average (It's Not Your Prompts)