Source profileQuality 84/100

xoai/sage/core/capabilities/context/context-loader/SKILL.md

context-loader

Defines how Sage content is loaded into the agent's context window. This capability guides platform generators — it specifies what to inline, what to reference, and what to skip. Not a runtime skill for agents; a build-time strategy for generators.

Source repository stars
25
Declared platforms
0
Static risk flags
1
Last source update
2026-08-04
Source checked
2026-08-04

Decision brief

What it does—and where it fits

The context window is the most precious resource in AI agent work. Loading everything wastes tokens and overwhelms the agent. Loading nothing means uninformed decisions.

Best for

  • When building or updating a platform generator
  • When deciding what to inline vs reference in platform instruction files
  • When evaluating whether a new skill or capability should be always-on

Not for

  • Tasks that require unconfirmed production actions or broad system permissions.
  • Environments where the pinned source and install steps cannot be inspected.

Compatibility matrix

Platform support, with evidence labels

PlatformStatusEvidenceWhat to check
CodexNot declaredNo explicit evidencePortability before use
Claude CodeNot declaredNo explicit evidencePortability before use
CursorNot declaredNo explicit evidencePortability before use
Gemini CLINot declaredNo explicit evidencePortability before use
Open the compatibility checker

Installation

Inspect first. Install second.

The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.

Source-detected install commandSource
npx skills add https://github.com/xoai/sage --skill "core/capabilities/context/context-loader"
Safe inspection promptEditorial

Inspect the Agent Skill "context-loader" from https://github.com/xoai/sage/blob/f7cc487b393474030cef15d50efdbb195612b756/core/capabilities/context/context-loader/SKILL.md at commit f7cc487b393474030cef15d50efdbb195612b756. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.

Workflow

What the source asks the agent to do

  1. 01

    Layer 1: Always-On (inlined in main instruction file)

    Content that MUST be in context at all times. Small enough to never hurt, critical enough to never skip.

    Content that MUST be in context at all times. Small enough to never hurt, critical enough to never skip.Total Layer 1 budget: 500 words / 700 tokens. This is the floor that every platform must support. If a platform can't hold 700 tokens of always-on instructions, it can't run Sage.
  2. 02

    When to Use

    When building or updating a platform generator

    When building or updating a platform generatorWhen deciding what to inline vs reference in platform instruction filesWhen evaluating whether a new skill or capability should be always-on
  3. 03

    Three Layers

    Content that MUST be in context at all times. Small enough to never hurt, critical enough to never skip.

    Content that MUST be in context at all times. Small enough to never hurt, critical enough to never skip.Total Layer 1 budget: 500 words / 700 tokens. This is the floor that every platform must support. If a platform can't hold 700 tokens of always-on instructions, it can't run Sage.Content loaded when a specific task requires it. The agent reads the file at the moment it's needed, not before.
  4. 04

    Layer 2: On-Demand (referenced, loaded when needed)

    Content loaded when a specific task requires it. The agent reads the file at the moment it's needed, not before.

    Content loaded when a specific task requires it. The agent reads the file at the moment it's needed, not before.Key principle: generators should REFERENCE these by path, not inline them. The agent reads them on demand. This keeps the always-on context lean.
  5. 05

    Layer 3: Strategy (how generators decide)

    Decision framework for generators:

    Decision framework for generators:When in doubt, reference. It's always better to have the agent read a file when needed than to bloat the always-on context.

Permission review

Static risk signals and limitations

Reads files

low · line 69

The documentation asks the agent to read local files, directories, or repositories.

read a file when needed than to bloat the always-on context.

Evidence record

Why each signal appears

EvidenceSourceComputedTestedEditorial
SignalValueEvidence typeMeaning
Quality score84/100ComputedDocumentation, specificity, maintenance, and trust rules
Repository stars25SourceRepository attention, not individual Skill quality
Compatibility0 platformsSourceDeclared in the catalog source record
Usage guideautomated source guideEditorialGenerated or reviewed according to the visible evidence level

Pinned source

Provenance and original SKILL.md

Repository
xoai/sage
Skill path
core/capabilities/context/context-loader/SKILL.md
Commit
f7cc487b393474030cef15d50efdbb195612b756
License
MIT
Collected
2026-08-04
Default branch
main
View the original SKILL.md

Context Loader

The context window is the most precious resource in AI agent work. Loading everything wastes tokens and overwhelms the agent. Loading nothing means uninformed decisions.

Principle: load the minimum context needed for the current action.

This capability defines the loading strategy. Platform generators read this to decide what goes where.

When to Use

  • When building or updating a platform generator
  • When deciding what to inline vs reference in platform instruction files
  • When evaluating whether a new skill or capability should be always-on

Three Layers

Layer 1: Always-On (inlined in main instruction file)

Content that MUST be in context at all times. Small enough to never hurt, critical enough to never skip.

ContentBudgetRationale
Process constitution (5 rules)~200 wordsGovernance must always be active
Commands / workflows table~100 wordsUser needs to know what's available
Interaction patterns~80 wordsConsistent UX across all steps
Project state reference~50 wordsWhere to find .sage/ artifacts

Total Layer 1 budget: ~500 words / ~700 tokens. This is the floor that every platform must support. If a platform can't hold 700 tokens of always-on instructions, it can't run Sage.

Layer 2: On-Demand (referenced, loaded when needed)

Content loaded when a specific task requires it. The agent reads the file at the moment it's needed, not before.

ContentWhen to LoadHow to Reference
sage-navigatorTask start, session start"Read the sage-navigator skill"
Workflow detailsWhen a workflow is triggered"Follow the [X] workflow"
Domain skills (jtbd, ux-audit...)When navigator selects them"Read and follow [skill] SKILL.md"
Skill references (patterns, templates)When the skill needs themSkill's own instructions say when
.sage/work/ frontmatterSession startConstitution rule 1 handles this
.sage/decisions.mdSession start, checkpointsRule 7 handles this
.sage/work/*/brief.md, spec.md...When working on that initiativeNavigator/workflow references them

Key principle: generators should REFERENCE these by path, not inline them. The agent reads them on demand. This keeps the always-on context lean.

Layer 3: Strategy (how generators decide)

Decision framework for generators:

Should this content be inlined?
├── Is it < 100 words AND needed on every response? → INLINE (Layer 1)
├── Is it needed only for specific tasks? → REFERENCE (Layer 2)
├── Is it needed only when a skill requests it? → REFERENCE (Layer 2)
└── Is it platform-specific boilerplate? → GENERATOR handles it

When in doubt, reference. It's always better to have the agent read a file when needed than to bloat the always-on context.

Platform Adaptation Rules

Generators MUST follow these rules when adapting core content:

  1. Constitution: Always inline in the main instruction file. Read from core/constitution/sage-process.constitution.md.

  2. Workflows: Generate as platform-native commands/workflows. Read from core/workflows/*.workflow.md. Substitute skill references with platform-specific paths.

  3. Main instruction file: Use the canonical template at templates/main-instructions.template.md. Fill placeholders with platform-specific content.

  4. Skills: Deploy or reference depending on platform mechanism. Never inline skill content in the main instruction file.

  5. Navigator: Deploy or reference. Never inline — it's 300 lines and only needed at task boundaries.

Failure Modes

Generator inlines too much: Main instruction file exceeds 2,000 words. Agent drowns in instructions, follows none reliably. Fix: audit what's inlined, move to Layer 2.

Generator references non-existent paths: Agent tries to read a file that wasn't deployed. Fix: generators must verify paths exist in the target project structure.

Platform doesn't support on-demand file reading: Some platforms may not allow the agent to read arbitrary files. Fix: generator must inline critical Layer 2 content (navigator, active workflow) at the cost of a larger main instruction file. Document the trade-off.