plugins/leyline/skills/progressive-loading/SKILL.md
Implements hub-and-spoke lazy loading to minimize token usage in large skills. Use when building multi-module skills that need conditional on-demand loading.
npx skillsauth add athola/claude-night-market progressive-loadingInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Progressive 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/loading-patterns.md` for scenario A
**Context B**: Load `modules/selection-strategies.md` for scenario B
**Always Available**: Core utilities, exit criteria, integration points
Verification: Run the command with --help flag to verify availability.
Modules are declared in the skill's YAML frontmatter and
loaded on demand with a @modules/ directive. The hub reads
the detected context, then loads only the spokes that match:
---
modules:
- modules/git-catchup-patterns.md
- modules/python-testing.md
---
When the intent is a branch or PR catch-up, load
`@modules/git-catchup-patterns.md`. When the artifacts include
Python tests, also load `@modules/python-testing.md`.
To keep loads within the MECW token budget, check whether a
module fits before pulling it in. The MECWMonitor in
plugins/leyline/src/leyline/mecw.py exposes the methods used
here:
from leyline.mecw import MECWMonitor
monitor = MECWMonitor()
monitor.track_usage(current_context_tokens)
# module_estimated_tokens comes from the module frontmatter
can_load, reasons = monitor.can_handle_additional(module_estimated_tokens)
Load the next module only when can_load is true. Each
module records its cost in its frontmatter estimated_tokens
field.
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 techniquesmodules/performance-budgeting.md for token budget model and optimization workflowmodules/advanced-patterns.md for nested hubs, multi-tier disclosure, and cross-skill module sharingmodules/troubleshooting.md when modules fail to load, context detection misfires, or token budgets are exceededThese modules are loaded on demand by the hub based on detected artifacts and user intent. They are listed in frontmatter so the selector can match them, but the hub should only load the ones whose activation context fires.
Operating-system patterns (load on detected platform):
modules/linux-patterns.md: Linux-specific shell, paths, and process patternsmodules/macos-patterns.md: macOS-specific tooling and platform quirksmodules/windows-patterns.md: Windows shell, path, and PowerShell patternsLanguage and runtime patterns (load on detected ecosystem):
modules/modern-python.md: Python 3.11+ idioms, typing, asyncmodules/legacy-python.md: Python 2 / pre-3.8 compatibility patternsmodules/python-packaging.md: pyproject.toml, uv, pip, hatch, poetrymodules/python-patterns.md: General Python authoring patternsmodules/python-testing.md: pytest, fixtures, parametrization, mockingmodules/cargo-patterns.md: Rust Cargo workspace and dependency patternsmodules/rust-review.md: Rust code-review patternsWorkflow patterns (load on detected task):
modules/api-patterns.md: API design and endpoint conventionsmodules/api-review.md: API surface review patternsmodules/git-patterns.md: Git workflow and history patternsmodules/git-catchup-patterns.md: Catching up on a branch or PR diffmodules/document-analysis-patterns.md: Reading and analyzing documentsmodules/log-analysis-patterns.md: Parsing and reasoning over logsmodules/performance.md: Performance investigation patternsReference material (load only when explicitly cited):
modules/large-reference.md: Large reference tables and lookups (load
last; tokens are non-trivial)This skill provides foundational patterns referenced by:
abstract:modular-skills - Uses progressive loading for skill designconserve: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
Verification: Run the command with --help flag to verify availability.
data-ai
Models a business in its own language. Use when the domain has real business rules to capture.
research
Generate diverse solution candidates with category-spanning ideation methods and rotation. Use when stuck on a design or fighting repetitive LLM output.
development
Generates and self-executes a diff-derived test plan for a PR. Use when validating PR changes before merge. Do not use for code review; use sanctum:pr-review.
development
Ramps implementation ambition a notch only after the prior increment is understood. Use when building a feature you must understand, not just ship.