Skill registry composition and feature gating

From ychampion/cskill-agents · View interactive version

Skill registry composition and feature gating is an AI agent skill from the GitHub repository ychampion/cskill-agents. Compose skill registries in fixed phases with explicit feature gates so merged command surfaces stay deterministic and cheap to refresh.

How to use this skill

Skill file

SKILL: Skill Registry Composition and Feature Gating

Domain: command-surfaces

Trigger: Use when a coding agent assembles skills or prompt commands from multiple sources and optional features can enable, disable, or delay some of them.

Source Pattern: Distilled from reviewed command-surface, registry-bootstrap, and dynamic-skill loading implementations.

Core Method

Assemble the registry in explicit phases instead of letting sources merge opportunistically. Start from the always-on local surface, then layer bundled skills, project-local skills, plugin-provided entries, and remote or MCP-discovered skills in a stable order. Apply feature gates before importing or materializing each optional phase so disabled sources do not cost startup time or leak partial entries into the merged view. After composition, dedupe by canonical command identity and memoize the final snapshot so listing, search, and execution all see the same result.

Key Rules

Example Application

If a terminal coding agent loads built-in skills, project-local skills, and MCP-discovered prompt tools, first collect the always-on built-ins, then project-local skills, then gated remote sources. Dedupe the combined list, cache that snapshot, and feed the same snapshot to help menus, slash-command discovery, and command execution.

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.