Index of every page on this site: llms.txt
All skills
Run it yourself

Use ANY TIME running tests (npm test, node --test, pytest, etc.) to capture output and prevent context overflow.

Use this Skill: https://skilld.dev/gh/straub/agent-skills/running-tests

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈32 tokens for metadata: the name and description. ≈230 when used: this file.

Description uses 1.6% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈128 characters, or 1.6%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

Running Tests

Test suites can sometimes take a very long time to run, consume lots of system resources, and generate lots of output. To save time and preserve your context, follow this simple guide.

When to Use This Skill

✅ Use if:

  • Running any test command (npm test, node --test, pytest, etc.)
  • Expecting more than 5 lines of output
  • Want to preserve context tokens for further analysis

❌ Don't use if:

  • Running a single quick test file (< 1 second)
  • Already redirecting output manually

Guidelines

  • Always redirect test output to a file!
npm test > /tmp/test-output.txt 2>&1
  • Analyze that file as needed after the run is finished
tail -n20 /tmp/test-output.txt

wc -l /tmp/test-output.txt

grep 'fail' /tmp/test-output.txt

Default Pattern

Every test run should follow this pattern:

npm test > /tmp/test-output.txt 2>&1
tail -20 /tmp/test-output.txt

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No alerts9mo3 checks · Risk SAFE
  • Gen Agent Trust Hub9mo

    This skill provides best practices for running software tests and managing large output volumes to prevent AI context overflow. It recommends using standard shell redirection to local temporary files and inspecting them with common utilities like tail and grep. No security risks or malicious patterns were detected.

  • Socket9mo

    No alerts

  • Snyk9mo

    Risk: LOW · No issues

Signed by skilld at 28c5395. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub last month.

Activeupdated 10 months ago

README badge

README badge for straub/agent-skills/running-tests