claude-code-plugin-ref…
Explain plugin, skill, command, agent, and hook mechanics used here. Use when authoring or debugging plugins. Do not use for ops; use night-market-operations.
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 -y skills add athola/claude-night-market --skill progressive-loading --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/progressive-loadingContext preview
The summary Claude sees to decide when to auto-load this skill.
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.
name: progressive-loading description: 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. alwaysApply: false category: infrastructure tags: - progressive-disclosure - context-management - modularity - token-optimization - lazy-loading dependencies: - conserve:context-optimization tools: [] provides: infrastructure: - progressive-loading - context-based-selection - load-on-demand patterns: - hub-and-spoke - conditional-loading - context-awareness usage_patterns: - skill-optimization - context-aware-loading - dynamic-module-selection - token-budget-management complexity: intermediate model_hint: standard estimated_tokens: 800 progressive_loading: true modules: - modules/selection-strategies.md - modules/loading-patterns.md - modules/performance-budgeting.md - modules/advanced-patterns.md - modules/api-patterns.md - modules/api-review.md - modules/cargo-patterns.md - modules/document-analysis-patterns.md - modules/git-catchup-patterns.md - modules/git-patterns.md - modules/large-reference.md - modules/legacy-python.md - modules/linux-patterns.md - modules/log-analysis-patterns.md - modules/macos-patterns.md - modules/modern-python.md - modules/performance.md - modules/python-packaging.md - modules/python-patterns.md - modules/python-testing.md - modules/rust-review.md - modules/troubleshooting.md - modules/windows-patterns.md
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.
1. **Context Detection**: Identify user intent, artifacts, workflow type 2. **Module Selection**: Choose which modules to load based on context 3. **Budget Management**: Verify MECW compliance before loading 4. **Integration Coordination**: Provide integration points with other skills 5. **Exit Criteria**: Define completion criteria across all paths
1. **Single Responsibility**: Each module serves one workflow or domain 2. **Self-Contained**: Modules don't depend on other modules 3. **Context-Tagged**: Clear indicators of when module applies 4. **Token-Budgeted**: Known token cost for selection decisions 5. **Independently Testable**: Can be evaluated in isolation
See `modules/selection-strategies.md` for detailed strategies:
See `modules/loading-patterns.md` for implementation patterns:
A plugin marketplace for Claude Code. Install only the plugins you need to run git workflows, code review, spec-driven development, and autonomous agents from inside your Claude Code session.
Explain plugin, skill, command, agent, and hook mechanics used here. Use when authoring or debugging plugins. Do not use for ops; use night-market-operations.
States load-bearing decisions, invariants, and weak points. Use when judging a design change. Do not use for gating; use night-market-change-control.
Rebuild the dev environment: uv, Python tiers, pins, traps. Use when onboarding or toolchain breaks. Do not use for daily commands; use night-market-operations.
Classify, gate, and review changes. Use when landing a PR, releasing, or amending rules. Do not use for failure triage; use night-market-debugging-playbook.
Search and record project memory (Discussions, journal, ADRs). Use before re-investigating anything. Do not use for settled battles; see failure-archaeology.
Bind loop 'done' to unfakeable gates. Use to harden egregore/herald loops or promote completion_integrity. Not for QA gates; use night-market-validation-and-qa.