agentleFS
hidai25hidai25/eval-view/skills/generate-tests/SKILL.md

generate-tests

Skill140 starsChanged 11 months agoApache-2.0View on GitHub

Generate EvalView test cases — either from a SKILL.md file using LLM-powered generation, or by capturing real agent interactions through a proxy.

7 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

10 rules. 0 are common, 1 is distinctive, and 9 are very specific to this project.

  • 0

    Common

    Most of the 7 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 9

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this skill when the user wants to create test cases for their AI agent or skill without writing YAML by hand.

    line 8
  2. Very specific:

    Use the generate_skill_tests MCP tool to auto-generate a test suite from a skill definition.

    line 14
  3. Very specific:

    Ask the user which SKILL.md to generate tests for (or detect it from context).

    line 17
  4. Very specific:

    After generation, offer to run the tests with run_skill_test.

    line 22
  5. Very specific:

    Use the create_test MCP tool to create a single test YAML file from a description.

    line 32
  6. Very specific:

    Call create_test with the parameters.

    line 36
  7. Very specific:

    After creating the test, call run_snapshot to establish the golden baseline.

    line 37
  8. Very specific:

    Use the CLI evalview capture command to proxy real agent traffic and save interactions as test YAMLs automatically.

    line 41
  9. Very specific:

    Use validate_skill to check a SKILL.md for correct structure and completeness before generating tests from it.

    line 51
  10. Very specific:

    After generating tests, execute them with run_skill_test:

    line 55

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

Generate Tests

Use this skill when the user wants to create test cases for their AI agent or skill without writing YAML by hand.

Four approaches

1. Generate tests from a SKILL.md file

Use the generate_skill_tests MCP tool to auto-generate a test suite from a skill definition. This reads the SKILL.md and produces YAML test cases covering explicit triggers, implicit triggers, contextual triggers, and negative cases.

Steps:

  1. Ask the user which SKILL.md to generate tests for (or detect it from context).
  2. Call generate_skill_tests with:
    • skill_path: path to the SKILL.md file
    • output_path (optional): where to save the generated YAML
    • count (optional): number of test cases (default: 10)
  3. After generation, offer to run the tests with run_skill_test.

CLI equivalent:

evalview skill generate-tests .claude/skills/my-skill/SKILL.md --auto
evalview skill generate-tests .claude/skills/my-skill/SKILL.md -c 20 -o tests/my-skill-tests.yaml

2. Create individual test cases manually

Use the create_test MCP tool to create a single test YAML file from a description.

Steps:

  1. Gather from the user: test name, query, expected tools, forbidden tools, expected output keywords, and minimum score.
  2. Call create_test with the parameters.
  3. After creating the test, call run_snapshot to establish the golden baseline.

3. Capture real interactions

Use the CLI evalview capture command to proxy real agent traffic and save interactions as test YAMLs automatically. This records the query, output, and tool calls from live usage.

CLI equivalent:

evalview capture --agent http://localhost:8080/execute --output-dir tests/test-cases
evalview capture --multi-turn  # saves all turns as one multi-turn conversation test

4. Validate a skill before testing

Use validate_skill to check a SKILL.md for correct structure and completeness before generating tests from it.

Running generated tests

After generating tests, execute them with run_skill_test:

  • test_file: path to the generated YAML
  • no_rubric: true for fast deterministic-only checks (no LLM cost)
  • verbose: true for detailed output on all tests

CLI equivalent:

evalview skill test tests/my-skill-tests.yaml
evalview skill test tests/my-skill-tests.yaml --no-rubric  # fast, $0
evalview skill test tests/my-skill-tests.yaml --verbose --model claude-sonnet-4-20250514

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.