test-writer
Skill145 starsChanged 6 months agoMITView on GitHub
Write unit tests for any function — happy path, edge cases, and error cases. Use when the user asks for tests, wants to add test coverage, or is practicing TDD.
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 27 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 6
Ask the user to share the function or code they want tests for.
- Distinctive: line 17
Test the expected behavior with valid inputs.
- Distinctive: line 47
Write tests that read like documentation — the test name should be a sentence explaining what the function does in that scenario.
“Common” is measured: kept by at least 6 in 10 of the 27 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
Ask the user to share the function or code they want tests for.
Then write tests covering:
Tests for [functionName]
Testing framework: [detect from package.json — Jest, Vitest, pytest, etc. Ask if unclear]
Happy path
Test the expected behavior with valid inputs. One test per meaningful variation.
test('returns [expected] when given [input]', () => {
// arrange
// act
// assert
})Edge cases
Tests for boundary conditions and unusual but valid inputs:
- Empty input (empty string, empty array, 0)
- Single item
- Maximum size or value
- Special characters (if string input)
Error cases
Tests that verify the function fails correctly:
- Invalid input types
- Null/undefined inputs
- Inputs that should trigger error handling
Mock requirements
List any external dependencies (API calls, database queries, file system) that need mocking, with example mock setup.
Coverage target: Aim for all branches, not just lines. Flag any branch that is difficult to test and explain why.
Write tests that read like documentation — the test name should be a sentence explaining what the function does in that scenario.
Other versions28 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 28
- leonardomso/33-js-concepts★ 67ksame name
- poshan0126/dotclaude★ 871same name
- TheDecipherist/claude-code-mastery-project-starter-kit★ 337same name
- anchildress1/awesome-ai★ 67same name
- anchildress1/awesome-github-copilot★ 67same name
- nimbalyst/skills★ 28same name
- Twigpine/openclaude-skills★ 19same name
- jeremymcs/skills★ 8same name
- xcrrr/claude-skills★ 6same name
- AskExe/exe-build-skills★ 4same name
18 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.
Used alongsideProjects with it also use debug-fix, readme-generator and 9 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.
zebbernSkilldebug-fix
Find and fix a bug or issue — from any source (GitHub issue, error message, user report, or observed behavior)
Also in 4 projects that use this
glinckerSkillreadme-generator
Generates comprehensive README.md files for software projects by analyzing codebase structure
Also in 4 projects that use this
JohnJBorenSkilldebugger
Systematic debugging workflows, root cause analysis, and troubleshooting patterns
Also in 3 projects that use this
get-proofpilotSkillcontext-budget
Audits Claude Code context window consumption across agents, skills, MCP servers, and rules. Identifies bloat, redundant components, and produces prioritized token-savings recommendations.
Also in 3 projects that use this
nimbalystSkillprd-writer
Create structured Product Requirements Documents (PRDs) with prioritized requirements. Use when writing product specs, feature requirements, or project briefs.
Also in 3 projects that use this
GoogleSkillcode-reviewer
Also in 4 projects that use this
In this repository53 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- beautiful-htmlSkill
- boris-planSkill
- brandkitSkill
- industrial-brutalist-uiSkill
- business-caseSkill
- changelog-writerSkill
- claude-code-deckSkill
- competitor-researchSkill
- content-repurposerSkill
- customer-personaSkill
- deploy-checklistSkill
- dockerfile-generatorSkill
- email-writerSkill
- exec-summarySkill
- feature-prioritizerSkill
- frontend-slidesSkill
- gpt-tasteSkill
- imagegen-frontend-mobileSkill
- imagegen-frontend-webSkill
- image-to-codeSkill
- karpathy-reviewSkill
- launch-checklistSkill
- linkedin-postSkill
- market-sizingSkill
- md-to-pdfSkill
- meeting-analyzerSkill
- minimalist-uiSkill
- newsletter-ideatorSkill
- okr-writerSkill
- full-output-enforcementSkill
- prd-generatorSkill
- proposal-writerSkill
- redesign-existing-projectsSkill
- retro-facilitatorSkill
- seo-optimizerSkill
- sharpenSkill
- skill-evaluatorSkill
- skill-to-sdkSkill
- slides-builderSkill
- high-end-visual-designSkill
- sprint-plannerSkill
- stakeholder-updateSkill
- stitch-design-tasteSkill
- design-taste-frontendSkill
- design-taste-frontend-v1Skill
- trend-spotterSkill
- ui-ux-pro-maxSkill
- user-story-writerSkill
- verify-workSkill
- voice-dnaSkill
- youtube-deepdiveSkill
- youtube-researcherSkill
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.

