with one click
testing-patterns
// Use when writing tests, analyzing test results, or improving test coverage. Provides conventions for workflow testing, comment syntax, and improvement patterns.
// Use when writing tests, analyzing test results, or improving test coverage. Provides conventions for workflow testing, comment syntax, and improvement patterns.
[HINT] Download the complete skill directory including SKILL.md and all related files
| name | testing-patterns |
| description | Use when writing tests, analyzing test results, or improving test coverage. Provides conventions for workflow testing, comment syntax, and improvement patterns. |
| title | Testing Patterns |
| stratum | 2 |
| branches | ["agentic"] |
Domain expertise for testing AI agent workflows. Use this when writing tests, analyzing results, or planning test improvements.
| Concept | Pattern |
|---|---|
| Test categories | Adoption, Modularity, Portability, Intuitiveness, Docs, Deterministic |
| Comment syntax | %%PASS%%, %%FAIL%%, %%NOTE%%, %%TODO%%, %%QUESTION%% |
| Results format | RESULTS.md with category tables |
| Improvement loop | Test → Comment → Report → Improve → Repeat |
Core question: Can someone new get productive quickly?
Good adoption tests measure:
Core question: Can you use pieces independently?
Good modularity tests validate:
Core question: Does it work across tools and projects?
Good portability tests verify:
Core question: Do things work as expected?
Good intuitiveness tests check:
Core question: Are docs accurate and helpful?
Good documentation tests verify:
Core question: Can we validate programmatically?
Good deterministic tests are:
Every test should have:
### [ID]: [Test Name]
**Goal:** [One sentence - what success looks like]
**Setup:**
1. [Prerequisite step]
2. [Prerequisite step]
**Steps:**
1. [Action to take]
2. [Action to take]
3. [Action to take]
**Pass Criteria:**
- [ ] [Checkable criterion]
- [ ] [Checkable criterion]
- [ ] [Checkable criterion]
**Results:**
| Tool | Pass? | Notes |
|------|-------|-------|
| Claude Code | | |
| OpenCode | | |
**Comments:** %%Add observations here%%
Use Obsidian-compatible comments for inline test feedback:
| Comment | When to Use | Example |
|---|---|---|
%%PASS: message%% | Test passed as expected | %%PASS: Skill loaded on first try%% |
%%FAIL: message%% | Test failed | %%FAIL: Agent didn't trigger, manual invoke needed%% |
%%NOTE: message%% | Interesting observation | %%NOTE: OpenCode behaves differently here%% |
%%TODO: message%% | Action needed | %%TODO: Add edge case for empty input%% |
%%QUESTION: message%% | Needs clarification | %%QUESTION: Is this expected behavior?%% |
Collecting comments:
grep -r "%%" test-workspace/ --include="*.md"
Comment best practices:
Track results in a structured table by category:
## Category A: Adoption
| ID | Test | Claude Code | OpenCode | Last Run |
|----|------|-------------|----------|----------|
| A01 | Fresh Start | PASS | PASS | 2025-12-24 |
| A02 | Minimal Setup | PASS | FAIL | 2025-12-24 |
### A02 Notes
- OpenCode: [specific issue observed]
- Action: [what needs to change]
Status values:
PASS - All criteria metFAIL - One or more criteria failedPARTIAL - Some criteria met, some unclearSKIP - Not applicable or blockedTODO - Not yet tested1. Run tests
└── Add %%comments%% as you go
2. Generate report
└── Run /test-report to aggregate findings
3. Analyze patterns
└── What's failing? What's unclear?
4. Prioritize fixes
└── Critical failures > Edge cases > Polish
5. Implement changes
└── Fix the actual issue, not just the symptom
6. Re-run affected tests
└── Verify the fix works
7. Repeat
└── Until all priority tests pass
Bad criteria (vague):
Good criteria (specific, checkable):
Criteria guidelines:
Problem: Tests verify internal mechanics, not user value Fix: Start with user goal, work backward to what to test
Problem: Only testing happy path Fix: Include error cases, edge cases, recovery scenarios
Problem: "It should work" is not testable Fix: Specify exact expected behavior
Problem: Components work alone but fail together Fix: Include integration tests across components
Problem: Run tests, forget results Fix: Always update RESULTS.md and add %%comments%%
# Skills in correct format
find .claude/skills -name "SKILL.md" -type f | wc -l
# No loose skill files
find .claude/skills -maxdepth 1 -name "*.md" -type f
# Check for required fields in agent
grep -l "^name:" .claude/agents/**/*.md
grep -l "^description:" .claude/agents/**/*.md
grep -l "^tools:" .claude/agents/**/*.md
# Find all wikilinks
grep -oh '\[\[[^]]*\]\]' *.md | sort | uniq
# Check if targets exist (manual or scripted)
# Directory name should match YAML name field
for dir in .claude/skills/*/; do
name=$(basename "$dir")
grep "^name: $name" "$dir/SKILL.md" || echo "Mismatch: $dir"
done
TESTING.md - Active test scenariosRESULTS.md - Test result tracking/validate command - Run deterministic checks/test command - Interactive test runner/test-report command - Aggregate findingstest-improver agent - Proactive improvement suggestions