agentleFS
allanninalallanninal/claude-code-skills/skills/test/SKILL.md

test

Skill1 starsChanged 9 months agoMITView on GitHub

Auto-detect project type and run appropriate test suite. Use when running tests, checking test coverage, or validating code changes.

We split this skill into the rules it gives an agent

5 rules. 0 are common, 2 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 140 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Run tests for any project by auto-detecting the project type and test framework.

    line 10
  2. Very specific:

    Look for pytest.ini, pyproject.toml with pytest config, or conftest.py

    line 19
  3. Very specific:

    Check for uv.lock (use uv run pytest) or requirements.txt (use pytest)

    line 20
  4. Very specific:

    Look for package.json with test scripts

    line 23
  5. Distinctive:

    After running tests, check for coverage:

    line 75

“Common” is measured: kept by at least 6 in 10 of the 140 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Universal Test Runner

Run tests for any project by auto-detecting the project type and test framework.

Arguments

  • $0 (optional): Test type - unit, integration, e2e, all (default: all)
  • $1 (optional): Specific path or pattern to test

Detection Logic

  1. Check for Python project (pytest):
    • Look for pytest.ini, pyproject.toml with pytest config, or conftest.py
    • Check for uv.lock (use uv run pytest) or requirements.txt (use pytest)
  2. Check for JavaScript/TypeScript project:
    • Look for package.json with test scripts
    • Detect test runner: Jest, Vitest, Playwright, Cypress

Execution Steps

For Python Projects (FastAPI, automation suites)

# Check if uv is used
if [ -f "uv.lock" ]; then
    uv run pytest $PATH -v --tb=short
else
    pytest $PATH -v --tb=short
fi

Test type flags:

  • unit: -m "unit or not (integration or e2e)"
  • integration: -m "integration"
  • e2e: -m "e2e"
  • all: No marker filter

Parallel execution (if pytest-xdist installed):

pytest -n auto $PATH

For JavaScript/TypeScript Projects

Jest/Vitest:

npm test -- $PATH
# or for coverage
npm test -- --coverage

Playwright E2E:

npx playwright test $PATH
# or with UI
npx playwright test --ui

Cypress:

npx cypress run
# or interactive
npx cypress open

Coverage Reports

After running tests, check for coverage:

  • Python: Look for htmlcov/index.html or .coverage file
  • JavaScript: Look for coverage/lcov-report/index.html

Report coverage percentage to the user.

Common Patterns in User's Projects

ProjectFrameworkCommand
eruditiontx-services-mvppytest + asynciouv run pytest -n auto
mathmatterstx-servicespytestuv run pytest
eruditiontx-client-mvpJest + Vitestnpm test
erudition-math-v2Jest + Playwrightnpm test / npm run test:e2e
notaryo.phJest + Playwrightpnpm test
bocs-turboJest + Cypresspnpm test

Output Format

Running tests for: [project-name]
Framework detected: [pytest/jest/playwright]
Test type: [unit/integration/e2e/all]

[Test output]

Summary:
- Passed: X
- Failed: Y
- Skipped: Z
- Coverage: XX%

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

Reviews can't be read right now.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.