Skip skill listing in test environment

From ychampion/cskill-agents · View interactive version

Skip skill listing in test environment is an AI agent skill from the GitHub repository ychampion/cskill-agents. Suppress skill-listing attachments in test mode so discoverability noise does not interfere with deterministic test behavior.

How to use this skill

Skill file

SKILL: Skip Skill Listing in Test Environment

Domain: command-surfaces

Trigger: Apply when tests exercise attachment-building code paths but do not need discoverability payloads such as skill listings.

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

Core Method

Treat test runs as a separate operating mode where non-essential discoverability output should be silent by default. Check the environment before computing any listing state, and return an empty result immediately when the process is running under tests. This keeps tests focused on actionable behavior, avoids large incidental payloads in assertions and fixtures, and prevents test outcomes from drifting because of unrelated skill-registry changes.

Key Rules

Example Application

If a chat runtime test exercises the attachment pipeline to validate message ordering, skip the skill-listing attachment entirely when NODE_ENV is test. The test still covers the real behavior under examination without needing to account for a changing skill registry or extra discoverability tokens.

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.