Lazy heavy command shims

From ychampion/cskill-agents · View interactive version

Lazy heavy command shims is an AI agent skill from the GitHub repository ychampion/cskill-agents. Stub heavy commands so the CLI stays light, loading the real implementation only when the command is executed.

How to use this skill

Skill file

SKILL: Lazy Heavy Command Shims

Domain: Command Architecture

Trigger: Use when commands are structurally required in the registry but their modules are too heavy to import during startup.

Source Pattern: Distilled from reviewed command-surface and lazy-command delegation implementations.

Core Method

Define a minimal command descriptor that exposes the right name, description, and basic UX hints without importing the heavy implementation. When the user actually runs the command, dynamically import the real module and delegate execution to it. Keep the shim lightweight and transparent so the registry remains fast while the command still feels first-class when invoked.

Key Rules

Example Application

If an analytics or report command depends on a very large implementation file, register a small shim for discovery and help text, then import the full implementation only when the user invokes that command.

Anti-Patterns (What NOT to do)

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.