agentleFS
z-waterkingz-waterking/claude-skills/test-generator/SKILL.md

test-generator

Skill0 starsChanged 7 months agoMITView on GitHub

Auto-generate pytest test suites from Python function signatures

25 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use refactor-advisor, security-reviewer and 1 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • aidankaokaoSkill

    refactor-advisor

    分析程式碼的重構機會,給出有優先順序的建議,但不直接改寫程式碼。當使用者說「這段程式碼怎麼改比較好」、「幫我分析重構方向」、「這樣寫有什麼問題」、「refactor」、「技術債」時觸發。

    Also in 3 projects that use this

  • JeffallanSkill

    security-reviewer

    Identifies security vulnerabilities, generates structured audit reports with severity ratings, and provides actionable remediation guidance. Use when conducting security audits, reviewing code for vulnerabilities, or analyzing infrastructure security. Invoke for SAST scans, penetration testing, DevSecOps practices, cloud security reviews, dependency audits, secrets scanning, or compliance checks. Produces vulnerability reports, prioritized recommendations, and compliance checklists.

    Also in 3 projects that use this

  • Microsoft AzureSkill

    git-workflow

    Squad branching model: dev-first workflow with insiders preview channel

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 15 edited versions we read keep these.

  • 9

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Identify target code: Use Glob and Grep to find the functions/classes to test.

    line 18
  2. Distinctive:

    Analyze function signatures: Run the generator:

    line 20
  3. Distinctive:

    Discover edge cases: Run the edge case finder for more thorough coverage:

    line 26
  4. Distinctive:

    Review generated tests: Read the test file and enhance:

    line 32
  5. Distinctive:

    Add meaningful assertions based on function logic

    line 33
  6. Distinctive:

    Add parametrized tests for functions with clear input/output patterns

    line 34
  7. Distinctive:

    Add fixture setup where needed

    line 35
  8. Distinctive:

    Ensure imports are correct

    line 36
  9. Distinctive:

    Add more specific test cases

    line 39

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

You are a QA engineer. When the user asks to generate tests, follow this workflow:

Workflow

  1. Identify target code: Use Glob and Grep to find the functions/classes to test.
  2. Analyze function signatures: Run the generator:
    python3 {skill_path}/scripts/generator.py <source_file> --output <test_file>
    This analyzes function signatures, type hints, and docstrings to generate pytest tests.
  3. Discover edge cases: Run the edge case finder for more thorough coverage:
    python3 {skill_path}/scripts/edge_case_finder.py <source_file>
    This identifies boundary values, None handling, type errors, and empty inputs.
  4. Review generated tests: Read the test file and enhance:
    • Add meaningful assertions based on function logic
    • Add parametrized tests for functions with clear input/output patterns
    • Add fixture setup where needed
    • Ensure imports are correct
  5. Present to user: Show the generated test file and ask if they want to:
    • Add more specific test cases
    • Run the tests
    • Adjust coverage targets

Test Patterns

  • Happy path tests
  • Edge cases (None, empty, boundary values)
  • Error cases (TypeError, ValueError)
  • Parametrized tests for multiple inputs
  • Class method tests with setup/teardown

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.