Skip skill listing in test environment
Skill ychampion/cskill-agents/skills/skip-skill-listing-in-test-environment
Agent skills for coding CLIs, multi-agent runtimes, context engines, MCP extensions, and terminal tooling. Instead of using claude code's source code, give your agent skills to create your own!
npx -y skills add ychampion/cskill-agents --skill skip-skill-listing-in-test-environmentAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
What its author says it does
Copied from the file, not written here
Suppress skill-listing attachments in test mode so discoverability noise does not interfere with deterministic test behavior.
SKILL.md
2.1 KB, 362 tokens by cl100k_base, as published. Nobody here has run it
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
- Put the test-environment guard at the top of the attachment builder so no listing work or state mutation happens before the early exit.
- Suppress only non-essential discoverability payloads; do not use the pattern to hide behavior that tests are explicitly meant to verify.
- Prefer deterministic environment checks such as
NODE_ENV === 'test'over indirect heuristics. - Keep tests isolated from runtime inventory churn so new skills or registry changes do not force unrelated snapshot or transcript updates.
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)
- Do not generate large listing attachments in tests when those attachments are irrelevant to the assertion; they add noise and make fixtures brittle.
- Do not place the test guard after registry lookups or sent-state mutation; the point is to avoid both the output and the work.
What ships with it: 1 file
922 B alongside SKILL.md
- skill.yaml922 B
Gives 0 of the 12 instructions most test skills give in 362 tokens
Counted across 964 of the 1,571 authors here whose files we hold, read 2026-08-07
- Close the browser when donein 55 of 964, across 12 files
- Wait for network idle statein 51 of 964, across 6 files
- Launch Chromium in headless modein 49 of 964, across 6 files
- Use descriptive selectors for elementsin 49 of 964, across 6 files
- Run provided scripts with help flag firstin 49 of 964, across 6 files
- Add appropriate explicit waitsin 48 of 964, across 5 files
- Use bundled scripts as black boxesin 46 of 964, across 3 files
- Do not read script source codein 46 of 964, across 3 files
- Use sync playwright for scriptsin 46 of 964, across 3 files
- Inspect dom before executing actionsin 46 of 964, across 3 files
- Run the full test suitein 37 of 964
- Write the failing test firstin 29 of 964, across 23 files
Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.