[FEATURE] Per-skill lazy/on-demand loading for skills (slash commands)

Resolved 💬 1 comment Opened May 14, 2026 by V-dev-388 Closed Jun 12, 2026

Preflight Checklist

  • [x] I have searched existing requests and this feature hasn't been requested yet
  • [x] This is a single feature request (not multiple features)

Problem Statement

Problem

Currently, all discovered skills (from ~/.claude/skills/ and .claude/skills/) have their full SKILL.md descriptions loaded into the system prompt at session startup, regardless of whether they are ever invoked. This consumes context window tokens for every skill, even unused ones.

For users with many project-specific skills, the total skill descriptions can exceed the default skillListingBudgetFraction (1%), causing truncation of least-used skills and a warning message every session.

Requested Behavior

Add a setting to enable lazy/on-demand loading for skills, so that only frequently-used skills are pre-loaded at startup, while others load only when explicitly invoked via /skill-name.

Proposed Solution

Proposed Options

  1. Per-skill toggle: Add a lazy: true field in each skill's SKILL.md frontmatter to opt into on-demand loading
  2. Global setting: Add skillLazyLoading: true (or similar) to settings.json that applies lazy loading to all non-pinned skills
  3. Budget-based approach: Respect a configurable skillListingBudgetFraction in settings.json so users can control the token budget for pre-loaded skills

Workarounds

  • The only current way to avoid skill pre-loading is --disable-slash-commands, which disables ALL skills entirely
  • Alternatively, moving rarely-used skills out of auto-discovered paths works but is inconvenient

Alternative Solutions

_No response_

Priority

Medium - Would be very helpful

Feature Category

Configuration and settings

Use Case Example

_No response_

Additional Context

This would be especially valuable for academic/professional projects where multiple specialized skills are defined but only a subset is used per session.

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗