Budget aware skill listing formatting

From ychampion/cskill-agents · View interactive version

Budget aware skill listing formatting is an AI agent skill from the GitHub repository ychampion/cskill-agents. Derive the active model context budget at runtime and format skill listings to fit it instead of emitting raw command sets.

How to use this skill

Skill file

SKILL: Budget-Aware Skill Listing Formatting

Domain: skill-listing

Trigger: Apply when a skill or command listing must fit the active model's real context budget instead of assuming a fixed token allowance.

Source Pattern: Distilled from reviewed command-surface, skill-discovery, and CLI capability implementations.

Core Method

Compute the formatting budget from the actual runtime model configuration rather than hard-coding a static limit. Ask the model/runtime layer for the current context window, including any beta-specific adjustments, then pass the candidate skill set through a formatter that trims or structures the listing to stay within that budget. This keeps the attachment aligned with whichever model is active and prevents a large registry from overflowing the prompt just because the runtime changed.

Key Rules

Example Application

If a coding agent can run under different model sizes, first resolve that session's context window from the selected model and beta flags, then format the newly available slash commands so the attachment fits inside that window. A smaller model gets a tighter listing automatically without maintaining a second code path.

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.