Skip skill discovery on skill expansion

From ychampion/cskill-agents · View interactive version

Skip skill discovery on skill expansion is an AI agent skill from the GitHub repository ychampion/cskill-agents. Bypass skill discovery when expanded SKILL.md or generated prompt content is being reprocessed for attachments, so non-user text does not trigger recursive discovery work.

How to use this skill

Skill file

SKILL: Skip Skill Discovery on Skill Expansion

Domain: command-surfaces

Trigger: Apply when generated or expanded skill text must pass through the attachment pipeline for parsing, but it is not fresh user intent and must not trigger discovery queries.

Source Pattern: Distilled from reviewed command-surface and listing-control patterns.

Core Method

Separate "text being inspected" from "text expressing user intent." When a pipeline reuses the attachment extractor on expanded SKILL.md content or other generated prompts, pass an explicit skip flag so the discovery subsystem stays off while the rest of the attachment logic still runs. This preserves useful secondary parsing such as @-mentions without paying for recursive or misleading skill-discovery calls on machine-generated text. The guard should live exactly where discovery would otherwise be attached so the expensive path is impossible to trigger accidentally.

Key Rules

Example Application

If a slash command loads a 100 KB skill specification and then reuses the normal attachment extractor to resolve @-mentions inside it, pass skipSkillDiscovery: true. The extractor still parses mentions, but it does not launch another round of skill-discovery queries against the generated document body.

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.