agentleFS
ElasticKnown publisherelastic/docs-builder/.claude/skills/test/SKILL.md

test

Skill25 starsChanged 19 days agoApache-2.0View on GitHub

Run the relevant tests for what changed — detects whether to run C# unit tests, specific test projects, integration tests, or JS/TS tests based on changed files. Use when the user asks to run tests, verify changes, or check if something is broken.

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 144 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this decision table based on which directories have changed files:

    line 25
  2. Very specific:

    If files span more than two source areas, prefer ./build.sh unit-test to run all unit tests at once.

    line 38
  3. Very specific:

    When in doubt, ./build.sh unit-test is the safe default (completes in under a minute)

    line 49

“Common” is measured: kept by at least 6 in 10 of the 144 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

Test Skill

Runs the right tests for what changed — fast feedback without running everything.

Steps

1. Detect changed files

git diff --name-only HEAD

Or, if checking staged changes:

git diff --name-only --staged

2. Pick the right test command

Use this decision table based on which directories have changed files:

Changed pathTest command
src/Elastic.Documentation.Site/cd src/Elastic.Documentation.Site && npm run test; shared views or layout CSS also npm run visual:seed once, then npm run visual:check
src/Elastic.Markdown/dotnet test tests/Elastic.Markdown.Tests/
src/Elastic.Documentation.Configuration/dotnet test tests/Elastic.Documentation.Configuration.Tests/
src/Elastic.Documentation.Navigation/ or Navigation.Tests/dotnet test tests/Navigation.Tests/
src/Elastic.ApiExplorer/dotnet test tests/Elastic.ApiExplorer.Tests/
tests-integration/./build.sh integrate
src/tooling/docs-builder/./build.sh unit-test
Multiple areas or uncertain./build.sh unit-test

If files span more than two source areas, prefer ./build.sh unit-test to run all unit tests at once.

3. Run and report

  • Show the command being run
  • On pass: summarize pass count, confirm all green
  • On fail: show the specific failing test(s), the error message, and suggest a fix approach based on the failure

Notes

  • Integration tests (./build.sh integrate) require cloned repos and take significantly longer — only run when integration test files changed or the user explicitly asks
  • When in doubt, ./build.sh unit-test is the safe default (completes in under a minute)
  • TypeScript type checking (not tests) is npm run compile:check from src/Elastic.Documentation.Site/

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.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

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.