agentleFS
techieharrytechieharry/ToolMaster/skills/test-generator/SKILL.md

test-generator

Skill0 starsChanged 7 months agoMITView on GitHub

Generate tests for existing code — unit, integration, edge cases. Use when adding test coverage, verifying fixes, or testing new features.

25 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use refactor-advisor, log-analyzer and 2 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

  • nek1987Skill

    log-analyzer

    Parse and analyze application logs to identify errors, patterns, and insights.

    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

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

  • 0

    Common

    Most of the 15 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Test names describe the behavior: test_returns_empty_list_when_no_results

    line 27
  2. Distinctive:

    If you need more than 5 lines of setup, the code is too coupled

    line 31

“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

What to test

  1. Happy path — normal input produces expected output
  2. Edge cases — empty, null, zero, max values, unicode, special chars
  3. Error paths — invalid input, missing dependencies, network failures
  4. Boundary conditions — off-by-one, pagination limits, timeout thresholds

What NOT to test

  • Implementation details (private methods, internal state)
  • Framework code (don't test that React renders a div)
  • Trivial getters/setters with no logic

Structure per test

# Arrange — set up the inputs and dependencies
# Act — call the function/endpoint
# Assert — check the result matches expectations

Rules

  • Test names describe the behavior: test_returns_empty_list_when_no_results
  • One assertion per test (or one logical assertion group)
  • Tests must be independent — no shared mutable state between tests
  • Mock external services, not internal code
  • If you need more than 5 lines of setup, the code is too coupled

Output

For each function/endpoint:

  • 2-3 happy path tests
  • 2-3 edge case tests
  • 1-2 error path tests
  • Each test with clear name, arrange/act/assert, and brief comment on what it verifies

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.