agentsclimarketplace

Skip skill listing in test environment

Skill ychampion/cskill-agents/agents/codex/skills/skip-skill-listing-in-test-environment

Suppress skill-listing attachments in test mode so discoverability noise does not interfere with deterministic test behavior.From its SKILL.md

Install
npx -y skills add ychampion/cskill-agents --skill skip-skill-listing-in-test-environment

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

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

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.