test-generator
Skill2 starsChanged 9 months agoMITView on GitHub
Analyzes existing code and auto-generates unit and integration tests. Covers happy paths, edge cases, and error scenarios for Jest, Vitest, pytest, and Kotest frameworks.
21 other projects use a version of this.
Adopted by
Most recently taken up by
- jablonkai/skillstheir own version, first seen Oct 1, 2026
- u9401066/pubmed-search-mcptheir own version, first seen Oct 1, 2026
- trebaud/skillstheir own version, first seen Aug 18, 2026
- codebygarv/Ai-skillstheir own version, first seen Aug 16, 2026
- liuxiao20051106-prog/claude-skillstheir own version, first seen Aug 10, 2026
- bestdeejay-design/agent-skillstheir own version, first seen Aug 9, 2026
Used with
Projects with it also use git-doc-updater, git-precommit and 10 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.
u9401066Skillgit-doc-updater
Auto-check and update key documentation before Git commits to keep docs in sync with code. Triggers: docs, 文檔, 更新文檔, sync docs, release, 發布.
Also in 3 projects that use this
u9401066Skillgit-precommit
Orchestrate pre-commit workflow including Memory Bank sync, README/CHANGELOG/ROADMAP updates. Triggers: GIT, gc, push, commit, 提交, 準備 commit, 要提交了, git commit, pre-commit, 推送.
Also in 3 projects that use this
nilecuiSkillcode-refactor
Perform bulk code refactoring operations like renaming variables/functions across files, replacing patterns, and updating API calls. Use when users request renaming identifiers, replacing deprecated code patterns, updating method calls, or making consistent changes across multiple locations.
Also in 3 projects that use this
AutumnsGroveSkillapi-designer
Design and document RESTful and GraphQL APIs with OpenAPI/Swagger specifications, authentication patterns, versioning strategies, and best practices. Use for: (1) Creating API specifications, (2) Designing REST endpoints, (3) GraphQL schema design, (4) API authentication and authorization, (5) API versioning strategies, (6) Documentation generation
Also in 3 projects that use this
ArogyaReddySkillchangelog-generator
Automatically creates user-facing changelogs from git commits by analyzing commit history, categorizing changes, and transforming technical commits into clear, customer-friendly release notes. Turns hours of manual changelog writing into minutes of automated generation.
Also in 4 projects that use this
- +7 more from u9401066
Other versions21 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 21
- laolaoshiren/claude-code-skills-zh★ 876same name
- alirezarezvani/claude-code-tresor★ 777same name
- rshankras/claude-code-apple-skills★ 777same name
- u9401066/pubmed-search-mcp★ 28same name
- codebygarv/Ai-skills★ 26same name
- benshapyro/cadre-devkit-claude★ 9same name
- bestdeejay-design/agent-skills★ 5same name
- Data-Wise/craft★ 4same name
- u9401066/nsforge-mcp★ 4same name
- agentsdance/agentskills★ 3same name
11 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository28 other files it gives its agents.
- brand-voiceSkill
- community-builderSkill
- email-sequenceSkill
- growth-experimentSkill
- landing-page-genSkill
- pitch-deckSkill
- referral-programSkill
- budget-plannerSkill
- fundraising-prepSkill
- legal-checklistSkill
- meeting-notesSkill
- okr-builderSkill
- postmortem-writerSkill
- retrospective-guideSkill
- risk-registerSkill
- sop-writerSkill
- experiment-designerSkill
- metrics-trackerSkill
- prd-writerSkill
- scope-cutterSkill
- user-interview-guideSkill
- ai-integrationSkill
- api-first-designSkill
- db-schema-designerSkill
- deploy-pipelineSkill
- infra-as-codeSkill
- monitoring-setupSkill
- mvp-scaffoldSkill
The file
We split this skill into the rules it gives an agent
3 rules. 0 are common, 3 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 13 edited versions we read keep these.
3
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
- Distinctive: line 148
Follow existing test conventions in the project
- Distinctive: line 151
Write E2E tests (use e2e-runner agent)
- Distinctive: line 154
Test private/internal implementation details
“Common” is measured: kept by at least 6 in 10 of the 13 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.
Files
Test Generator - Automated Test Generation
Overview
Reads existing code and generates comprehensive test suites. Covers the boring-but-critical test writing so developers can focus on business logic.
1. When to Apply
| Trigger | Behavior |
| "generate tests for [file]" | Analyze file, generate test suite |
| "add tests" | Scan for untested code, generate tests |
| "test coverage" | Identify coverage gaps, generate missing tests |
2. Test Generation Workflow
Step 1: Code Analysis
1. Read target file(s)
2. Identify exported functions/classes/methods
3. Analyze parameter types and return types
4. Detect dependencies (imports, injections)
5. Identify side effects (API calls, DB, file system)Step 2: Test Case Planning
For each function, generate test cases:
| Category | Examples |
| Happy path | Valid inputs → expected output |
| Boundary values | 0, 1, MAX, empty string, empty array |
| Invalid inputs | null, undefined, wrong type, negative |
| Error handling | Network failure, timeout, invalid response |
| Edge cases | Concurrent calls, unicode, special chars |
Step 3: Test Generation
TypeScript (Jest/Vitest):
import { describe, it, expect, vi } from 'vitest'
import { calculatePrice } from './pricing'
describe('calculatePrice', () => {
it('calculates base price correctly', () => {
expect(calculatePrice({ quantity: 1, unitPrice: 100 })).toBe(100)
})
it('applies discount for bulk orders', () => {
expect(calculatePrice({ quantity: 100, unitPrice: 10 })).toBe(900)
})
it('throws for negative quantity', () => {
expect(() => calculatePrice({ quantity: -1, unitPrice: 10 }))
.toThrow('Quantity must be positive')
})
it('returns 0 for zero quantity', () => {
expect(calculatePrice({ quantity: 0, unitPrice: 100 })).toBe(0)
})
})Python (pytest):
import pytest
from pricing import calculate_price
def test_base_price():
assert calculate_price(quantity=1, unit_price=100) == 100
def test_bulk_discount():
assert calculate_price(quantity=100, unit_price=10) == 900
def test_negative_quantity_raises():
with pytest.raises(ValueError, match="positive"):
calculate_price(quantity=-1, unit_price=10)
def test_zero_quantity():
assert calculate_price(quantity=0, unit_price=100) == 0Step 4: Mock Generation
Auto-generate mocks for external dependencies:
// Auto-detected: function calls supabase
vi.mock('@/lib/supabase', () => ({
supabase: {
from: vi.fn(() => ({
select: vi.fn().mockResolvedValue({ data: mockData, error: null })
}))
}
}))3. Framework Detection
| File Pattern | Framework |
vitest.config.* | Vitest |
jest.config.* | Jest |
pytest.ini, pyproject.toml with pytest | pytest |
build.gradle* with kotest | Kotest |
4. Tool Coordination
| Tool | Purpose |
| Read | Analyze source code |
| Write | Generate test files |
| Glob | Find test config, existing tests |
| Grep | Detect imports, dependencies |
| Bash | Run tests, check coverage |
5. Boundaries
Will:
- Generate test suites for functions/classes/endpoints
- Cover happy paths, edge cases, and error scenarios
- Auto-generate mocks for external dependencies
- Follow existing test conventions in the project
Will Not:
- Write E2E tests (use e2e-runner agent)
- Replace TDD workflow (use tdd-guide agent for that)
- Guarantee 100% coverage (focuses on meaningful tests)
- Test private/internal implementation details
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
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.

