mcpbeat Sign in

Progressive Loading Skill for Claude

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.

33k tokens
context cost
the whole folder, loaded on every use
25
files
instructions only
0
copies elsewhere
how many repositories repackaged it
324
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/athola/claude-night-market --skill progressive-loading

The instruction itself

20 sections, as written by the author

Table of Contents

  • Overview
  • When to Use
  • Quick Start
  • Basic Hub Pattern
  • Progressive Loading
  • Context-Based Selection
  • Hub-and-Spoke Architecture
  • Hub Responsibilities
  • Spoke Characteristics
  • Selection Strategies
  • Loading Patterns
  • Common Use Cases
  • Best Practices
  • Module References
  • Integration with Other Skills
  • Exit Criteria

Progressive Loading Patterns

Overview

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.

When To Use

Use progressive loading when building skills that:

  • Cover multiple distinct workflows or domains
  • Need to manage context window efficiently
  • Have modules that are mutually exclusive based on context
  • Require MECW compliance for long-running sessions
  • Want to optimize for common paths while supporting edge cases

When NOT To Use

  • Project doesn't use the leyline infrastructure patterns
  • Simple scripts without service architecture needs

Quick Start

Basic Hub Pattern

## 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.

Context-Based Selection

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.

Hub-and-Spoke Architecture

Hub Responsibilities

  • Context Detection: Identify user intent, artifacts, workflow type
  • Module Selection: Choose which modules to load based on context
  • Budget Management: Verify MECW compliance before loading
  • Integration Coordination: Provide integration points with other skills
  • Exit Criteria: Define completion criteria across all paths

Spoke Characteristics

  • Single Responsibility: Each module serves one workflow or domain
  • Self-Contained: Modules don't depend on other modules
  • Context-Tagged: Clear indicators of when module applies
  • Token-Budgeted: Known token cost for selection decisions
  • Independently Testable: Can be evaluated in isolation

Selection Strategies

See modules/selection-strategies.md for detailed strategies:

  • Intent-based: Load based on detected user goals
  • Artifact-based: Load based on detected files/systems
  • Budget-aware: Load within available token budget
  • Progressive: Load core first, expand as needed
  • Mutually-exclusive: Load one path from multiple options

Loading Patterns

See modules/loading-patterns.md for implementation patterns:

  • Conditional includes: Dynamic module references
  • Lazy loading: Load on first use
  • Tiered disclosure: Core → common → edge cases
  • Context switching: Change loaded modules mid-session
  • Preemptive unloading: Remove unused modules under pressure

Common Use Cases

  • Multi-Domain Skills: imbue:catchup loads git/docs/logs modules by context
  • Context-Heavy Analysis: Load relevant modules only, defer deep-dives, unload completed
  • Plugin Infrastructure: Mix-and-match infrastructure modules with version checks

Best Practices

  • Design Hub First: Define all possible contexts and module boundaries
  • Tag Modules Clearly: Use YAML frontmatter to indicate context triggers
  • Measure Token Cost: Know the cost of each module for selection
  • Monitor Loading: Track which modules are actually used
  • Validate Paths: Verify all context paths have required modules
  • Document Triggers: Make context detection logic transparent

Module References

Core (always available to the hub)

  • Selection Strategies: See modules/selection-strategies.md for choosing modules
  • Loading Patterns: See modules/loading-patterns.md for implementation techniques
  • Performance Budgeting: See modules/performance-budgeting.md for token budget model and optimization workflow
  • Advanced Patterns: See modules/advanced-patterns.md for nested hubs, multi-tier disclosure, and cross-skill module sharing
  • Troubleshooting: See modules/troubleshooting.md when modules fail to load, context detection misfires, or token budgets are exceeded

Context-Specific Pattern Modules

These 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 patterns
  • modules/macos-patterns.md: macOS-specific tooling and platform quirks
  • modules/windows-patterns.md: Windows shell, path, and PowerShell patterns

Language and runtime patterns (load on detected ecosystem):

  • modules/modern-python.md: Python 3.11+ idioms, typing, async
  • modules/legacy-python.md: Python 2 / pre-3.8 compatibility patterns
  • modules/python-packaging.md: pyproject.toml, uv, pip, hatch, poetry
  • modules/python-patterns.md: General Python authoring patterns
  • modules/python-testing.md: pytest, fixtures, parametrization, mocking
  • modules/cargo-patterns.md: Rust Cargo workspace and dependency patterns
  • modules/rust-review.md: Rust code-review patterns

Workflow patterns (load on detected task):

  • modules/api-patterns.md: API design and endpoint conventions
  • modules/api-review.md: API surface review patterns
  • modules/git-patterns.md: Git workflow and history patterns
  • modules/git-catchup-patterns.md: Catching up on a branch or PR diff
  • modules/document-analysis-patterns.md: Reading and analyzing documents
  • modules/log-analysis-patterns.md: Parsing and reasoning over logs
  • modules/performance.md: Performance investigation patterns

Reference material (load only when explicitly cited):

  • modules/large-reference.md: Large reference tables and lookups (load

last; tokens are non-trivial)

Integration with Other Skills

This skill provides foundational patterns referenced by:

  • abstract:modular-skills - Uses progressive loading for skill design
  • conserve:context-optimization - Uses for MECW-compliant loading
  • imbue:catchup - Uses for context-based module selection
  • Plugin authors building multi-workflow skills

Reference 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.

Exit Criteria

  • Hub clearly defines all module loading contexts
  • Each module is tagged with activation context
  • Module selection respects MECW constraints
  • Token costs measured for all modules
  • Context detection logic documented
  • Loading paths validated for completeness

Other skills for the same job

different authors, same section of the catalogue
Skill Creator
by anthropics
vendor ×10

Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.

56k tokens scripts
Skill Creator
by vercel-labs
vendor ×10

Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Claude's capabilities with specialized knowledge, workflows, or tool integrations.

12k tokens scripts
Skill Creator
by JayZeeDesign
×9

Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Claude's capabilities with specialized knowledge, workflows, or tool integrations.

10k tokens scripts
Template Skill
by JayZeeDesign
×7

Replace with description of the skill and when Claude should use it.

35 tokens
Dispatching Parallel Agents
by ZhanlinCui
×5

Use when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies

2k tokens
Skill Development
by anthropics
vendor ×4

This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill content", or needs guidance on skill structure, progressive disclosure, or skill development best practices for Claude Code plugins.

9k tokens
Find Skills
by sanity-io
vendor ×4

Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.

1k tokens
Writing Skills
by ZhanlinCui
×4

Use when creating new skills, editing existing skills, or verifying skills work before deployment

26k tokens scripts

How to use it

Copy the folder

Take athola/progressive-loading from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.