testing-patterns
Skill2 starsChanged 3 months agoApache-2.0View on GitHub
Test conventions for {{ project_name }} -- pytest patterns, mock strategies, fixture patterns. Auto-activates when writing or modifying test files.
24 other projects use a version of this.
Adopted by
Most recently taken up by
- dafaalz/agent-skillstheir own version, first seen Sep 22, 2026
- Dregxmoon/Kaoru-Agenttheir own version, first seen Sep 15, 2026
- VoDaiLocz/kilo-kit-mcptheir own version, first seen Aug 21, 2026
- TheHiddenDeveloper/jarvis-skillstheir own version, first seen Aug 19, 2026
- svngoku/coding-agents-skillstheir own version, first seen Aug 13, 2026
- bybren-llc/safe-agentic-workflowtheir own version, first seen Jul 20, 2026
Used with
Projects with it also use intelligent-routing, api-patterns 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.
tiendatworkSkillintelligent-routing
Automatic agent selection and intelligent task routing. Analyzes user requests and automatically selects the best specialist agent(s) without requiring explicit user mentions.
Also in 3 projects that use this
xfstudioSkillapi-patterns
API design principles and decision-making. REST vs GraphQL vs tRPC selection, response formats, versioning, pagination.
Also in 5 projects that use this
xfstudioSkillrust-pro
Master Rust 1.75+ with modern async patterns, advanced type system
Also in 3 projects that use this
benshapyroSkilldocumentation-templates
Generates README files, API documentation, and inline code comments following best practices. Use when creating project documentation, writing READMEs, documenting APIs, or explaining complex code.
Also in 3 projects that use this
- +8 more from xfstudio
Other versions24 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 24
- ChrisWiles/claude-code-showcase★ 6.1ksame name
- bybren-llc/safe-agentic-workflow★ 419same name
- langchain-ai/skills-benchmarks★ 118same name
- VoDaiLocz/kilo-kit-mcp★ 27same name
- 4444J99/a-i--skills★ 17same name
- svngoku/coding-agents-skills★ 11same name
- wpank/ai★ 11same name
- DIL8654/claude-code-dotnet-template★ 9same name
- Dregxmoon/Kaoru-Agent★ 9same name
- xfstudio/skills★ 9same name
14 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 repository18 other files it gives its agents.
- AGENTS.mdAGENTS.md
- templates/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- templates/CLAUDE.mdCLAUDE.md
- dashboard-designSkill
- database-patternsSkill
- source-command-extract-knowledgeSkill
- source-command-rearrange-commitsSkill
- testing-patternsSkill
- visual-auditSkill
- dashboard-designSkill
- database-patternsSkill
- design-tasteSkill
- issue-templateSkill
- testing-patternsSkill
- visual-auditSkill
- design-systemSkill
- issue-templateSkill
The file
We split this skill into the rules it gives an agent
10 rules. 0 are common, 8 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 17 edited versions we read keep these.
8
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 9
When writing or modifying test files, follow these conventions.
- Distinctive: line 19
Write tests that verify behavior, not implementation details
- Distinctive: line 20
Use descriptive test names that explain the scenario and expected outcome
- Distinctive: line 22
Prefer real implementations over mocks when practical
- Very specific: line 28
Use autouse=True fixtures sparingly -- only for setup/teardown that every test needs
- Very specific: line 34
Always use patch.object() for methods on instances
- Distinctive: line 35
Verify mock calls when the call itself is the behavior under test
- Distinctive: line 36
Do not assert mock call counts when only the return value matters
- Distinctive: line 41
Use parametrize for testing multiple inputs with the same logic
- Distinctive: line 42
Keep test files focused on one module or feature
“Common” is measured: kept by at least 6 in 10 of the 17 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
Testing Patterns
When writing or modifying test files, follow these conventions.
Running Tests
{{ test_cmd }}Key Principles
- Write tests that verify behavior, not implementation details
- Use descriptive test names that explain the scenario and expected outcome
- Each test should be independent and not rely on execution order
- Prefer real implementations over mocks when practical
- Mock at system boundaries (external APIs, file I/O, databases), not internal interfaces
Fixture Patterns
- Define fixtures per-file, not shared across test files
- Use
autouse=Truefixtures sparingly -- only for setup/teardown that every test needs - Name fixtures descriptively:
mock_api_clientnotclient
Mock Rules
- Patch at the import site, not the definition site
- Always use
patch.object()for methods on instances - Verify mock calls when the call itself is the behavior under test
- Do not assert mock call counts when only the return value matters
Test Organization
- Group related tests with classes
- Use parametrize for testing multiple inputs with the same logic
- Keep test files focused on one module or feature
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.

