test-architect
Skill0 starsChanged 6 months agoMITView on GitHub
Write unit and integration tests that actually catch bugs — real assertions, real edge cases, real failure modes. Detects the project's framework (Jest, Vitest, Mocha, pytest, Go test) and matches existing conventions. Use when the user says "write tests for", "cover this with tests", "add unit tests", "I need tests for this function", or hands over an untested module. Refuses to write placeholder `expect(true).toBe(true)` tests.
8 other projects use a version of this.
Adopted by
Most recently taken up by
- playbookTV/Ironcladtheir own version, first seen Nov 8, 2026
- ice-lfernandes/claude-spring-architecttheir own version, first seen Nov 7, 2026
- nerviz-ai/nerviztheir own version, first seen Nov 7, 2026
- mejbaurbahar/software-tester-skillstheir own version, first seen Oct 13, 2026
- jaydenluckertjes-ai/Carmack-Counciltheir own version, first seen Oct 13, 2026
- duonget/test-architecttheir own version, first seen Oct 11, 2026
Other versions8 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 8
- SamJHudson01/Carmack-Council★ 52same name
- ice-lfernandes/claude-spring-architect★ 11same name
- nerviz-ai/nerviz★ 11same name
- playbookTV/Ironclad★ 7same name
- jaydenluckertjes-ai/Carmack-Council★ 2same name
- hemapriyan-rk/claude-rigor-skills★ 1same name
- mejbaurbahar/software-tester-skills★ 1same name
- duonget/test-architect★ 0same name
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 repository16 other files it gives its agents.
- for-codex/AGENTS.mdAGENTS.md
- api-architectSkill
- browser-qaSkill
- code-auditorSkill
- doc-craftSkill
- git-flow-proSkill
- mcp-forgeSkill
- perf-hunterSkill
- refactor-masterSkill
- resilience-engineerSkill
- schema-architectSkill
- security-sentinelSkill
- ship-itSkill
- threat-modelerSkill
- type-tightenerSkill
- ui-polishSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
16 rules. 0 are common, 10 are distinctive, and 6 are very specific to this project.
0
Common
Most of the 8 edited versions we read keep these.
10
Distinctive
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 18
Do *not* trigger for: e2e/browser flows (use browser-qa), test infrastructure setup, or when the user only wants you to fix a failing test …
- Distinctive: line 44
Before writing assertions, list the failure modes you can think of:
- Distinctive: line 105
Pure functions: no mocks needed.
- Very specific: line 107
HTTP: use msw (browser/node), nock, or responses (Python).
- Distinctive: line 108
DB: prefer an in-memory or test-container instance over mocking the ORM.
- Very specific: line 109
Time: use the framework's fake timers.
- Distinctive: line 113
Run the file. If green, add coverage for one more failure mode you initially skipped.
- Distinctive: line 119
Use table-driven tests for many similar cases:
- Distinctive: line 127
Test error messages too — they're part of the contract for humans.
- Very specific: line 128
Keep test setup local to the test or the describe block.
- Distinctive: line 131
Don't test private methods directly.
- Distinctive: line 132
Don't share state between tests.
- Very specific: line 133
Don't test the framework. expect(typeof fn).toBe('function') adds nothing.
- Distinctive: line 134
Don't snapshot-test arbitrarily.
- Very specific: line 142
Write __tests__/slugify.test.ts with three describes: happy path (8 cases), boundary (4 cases), invalid (2 cases).
- Distinctive: line 143
Add table-driven test for unicode normalization.
“Common” is measured: kept by at least 6 in 10 of the 8 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-architect — tests that would catch the bug
When to use this skill
Trigger when the user wants tests for specific code. Strong signals:
- "write tests for
<file or function>" - "cover this with tests"
- "add unit tests"
- "I need tests for this"
- A function pasted with no further context
Do not trigger for: e2e/browser flows (use browser-qa), test infrastructure setup, or when the user only wants you to fix a failing test (just fix it).
The output contract
Tests that:
- Run —
npm test,pytest,go test, etc., all green on the new file. - Match the codebase — same framework, same test file location, same naming convention as the existing tests.
- Cover the contract, not the implementation — happy path, failure modes, boundary values, empty/null inputs.
- Fail when behavior breaks — every assertion would detect a real regression, not just confirm the code ran.
- Are independent — no test depends on the order or state of another.
Workflow
1 — Detect the test stack
Inspect the repo first:
- Which framework? Look at
package.json(jest,vitest,mocha),pyproject.toml/pytest.ini,go.mod,Cargo.toml. - Where do tests live?
__tests__/,test/,*.test.tsnext to source,*_test.go? - What conventions?
describe/itvstest(), AAA vs given/when/then, fixture style, mocking library.
Match what's there. Don't introduce a new framework just because you prefer it.
2 — Read the function like an adversary
Before writing assertions, list the failure modes you can think of:
For a function with this signature:
function parseDuration(input: string): number // returns mslist:
"30s"→ 30000"5m"→ 300000"1h"→ 3600000""→ throws? returns NaN? returns 0?"abc"→ throws?"5"→ no unit — throws or assumes ms?"5x"→ unknown unit — throws?"-5s"→ negative — allowed?null,undefined→ TypeScript prevents at compile, but runtime?- Float input:
"1.5s"→ 1500?
That list is the test plan. Now write one test per item.
3 — Structure the test file
For each function under test, group:
describe('parseDuration', () => {
describe('happy path', () => { ... })
describe('boundary values', () => { ... })
describe('invalid input', () => { ... })
})Name tests with the input → output, not the implementation:
✅ 'parses "30s" as 30000'
✅ 'throws on empty string'
❌ 'works' ❌ 'returns the result' ❌ 'test 1'
4 — Write real assertions
Each test asserts a specific observable. Never:
expect(result).toBeTruthy() // ❌ what does truthy mean?
expect(result).toBeDefined() // ❌ a string '' is defined too
expect(true).toBe(true) // ❌ this is not a testAlways:
expect(result).toBe(30000)
expect(result).toEqual({ id: 1, name: 'Ada' })
expect(() => parseDuration('')).toThrow(/empty/)
expect(result.items).toHaveLength(3)For async: await expect(promise).rejects.toThrow(SpecificError).
5 — Stub at the right layer
- Pure functions: no mocks needed.
- Functions that call other modules: stub at the import boundary, not deep inside.
- HTTP: use
msw(browser/node),nock, orresponses(Python). Don't stubfetchglobally — that breaks other tests. - DB: prefer an in-memory or test-container instance over mocking the ORM. Mocks of complex ORMs lie.
- Time: use the framework's fake timers; never
await new Promise(r => setTimeout(r, ...))in tests.
6 — Run, then expand
Run the file. If green, add coverage for one more failure mode you initially skipped. If red, the test caught a real bug — flag it to the user before "fixing" the test.
Patterns and anti-patterns
✅ Do:
- One concept per test. If you need
&&in the name, split it. - Use table-driven tests for many similar cases:
test.each([ ['30s', 30000], ['5m', 300000], ['1h', 3600000], ])('parses %s as %i', (input, expected) => { expect(parseDuration(input)).toBe(expected) }) - Test error messages too — they're part of the contract for humans.
- Keep test setup local to the test or the
describeblock. Avoid module-level mutation.
❌ Don't:
- Don't test private methods directly. Test the public contract.
- Don't share state between tests. Reset before each.
- Don't test the framework.
expect(typeof fn).toBe('function')adds nothing. - Don't snapshot-test arbitrarily. Snapshots are for stable serialized output; otherwise they just rubber-stamp regressions.
Example invocation
User: "Write tests for
src/utils/slugify.ts." (file exportsslugify(s: string, options?: { maxLen?: number }): string)
- Detect: Vitest,
__tests__/adjacent. - List failure modes: empty string, all spaces, unicode (
"café"→"cafe"?), trailing dashes, very long input (maxLenkicks in), already-slugified input (idempotent?), multi-byte emoji. - Write
__tests__/slugify.test.tswith three describes: happy path (8 cases), boundary (4 cases), invalid (2 cases). - Add table-driven test for unicode normalization.
- Run:
npm test slugify— 14/14 green. - Spot during writing:
slugify(" ")returns"-", which the user probably didn't intend. Flag it; ask whether to write the test for current behavior or the expected behavior.
See also
code-auditor— to find the untested edge cases before you start writingbrowser-qa— when the behavior under test is a user flow, not a functionrefactor-master— if you need to refactor to make the code testable
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.

