> Night Market Skill — ported from claude-night-market/leyline. For the full experience with agents, hooks, and commands, install the Claude Code plugin.
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.
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()
)
Verification: Run the command with --help flag to verify availability.
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 (loadlast; 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.
共 3 个版本