Standardized patterns for context-aware, progressive module loading that optimizes token usage. Implements hub-and-spoke with dynamic module selection. Triggers: progressive loading, lazy loading, hub-and-spoke, module selection, context-aware loading, token optimization, on-demand loading Use when: optimizing skill loading, implementing hub-and-spoke patterns, reducing upfront context usage, dynamic module selection needed DO NOT use when: simple skills without modular structure. Consult this skill when implementing progressive loading for modular skills.
/plugin marketplace add athola/claude-night-market/plugin install leyline@claude-night-marketThis skill inherits all available tools. When active, it can use any tool Claude has access to.
README.mdmodules/loading-patterns.mdmodules/selection-strategies.mdProgressive loading provides standardized patterns for building skills that load modules dynamically based on context, user intent, and available token budget. This prevents loading unnecessary content while ensuring required functionality is available when needed.
The core principle: Start minimal, expand intelligently, monitor continuously.
Use progressive loading when building skills that:
## Progressive Loading
**Context A**: Load `modules/context-a-workflow.md` for scenario A
**Context B**: Load `modules/context-b-workflow.md` for scenario B
**Always Available**: Core utilities, exit criteria, integration points
from leyline import ModuleSelector, MECWMonitor
selector = ModuleSelector(skill_path="my-skill/")
modules = selector.select_modules(
context={"intent": "git-catchup", "artifacts": ["git", "python"]},
max_tokens=MECWMonitor().get_safe_budget()
)
See modules/selection-strategies.md for detailed strategies:
See modules/loading-patterns.md for implementation patterns:
imbue:catchup loads git/docs/logs modules by contextmodules/selection-strategies.md for choosing modulesmodules/loading-patterns.md for implementation techniquesThis skill provides foundational patterns referenced by:
abstract:modular-skills - Uses progressive loading for skill designconservation:context-optimization - Uses for MECW-compliant loadingimbue:catchup - Uses for context-based module selectionReference in your skill's frontmatter:
dependencies: [leyline:progressive-loading, leyline:mecw-patterns]
progressive_loading: true