test-hygiene
Guidelines for writing effective tests that actually catch bugs.
Skill by ejacklab
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/ejacklab-test-hygiene
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: testing, devops, writing
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/test-hygiene
What's inside
- Skill name
test-hygiene- Description
- Guidelines for writing effective tests that actually catch bugs. Use when: (1) writing tests for new code, (2) deciding whether to mock or use real services, (3) reviewing test quality, (4) setting up test infrastructure. NOT for: running tests (that's just exec).
- License
- MIT
- Instructions
- 72 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# Test Hygiene
## Core Principle
**Real tests over mocks.** Mocks give false confidence. Real-service tests catch real bugs.
## Mock vs Real Decision
| Dependency | Mock? | Why |
|------------|-------|-----|
| External API (OpenAI, GitHub) | ✅ Mock | Unreliable, rate-limited, costs money |
| Internal service (TicketService) | ❌ Real | Must verify actual behavior |
| Database (Zvec, Postgres) | ❌ Real | Different DBs behave differently |
| File system | ❌ Real | Use tmp_path, not mocks |
| HTTP client (internal) | ❌ Real | Use TestClient, not mocks |
| Time/timeouts | ✅ Mock | Can't wait for real time in tests |
## vtic Lessons
### Mocks Hide Real Bugs
- Mock-based API route tests: all passed ✅
- Integration tests with real TicketService: **async/await bug caught** ❌
- The mock didn't enforce the actual async contract
### Test Types by Confidence
| Type | Confidence | Use For |
|------|-----------|---------|
| Unit test with real services | High | Core logic, data transformations |
| Integration test (FastAPI TestClient) | Highest | Full request→response flow |
| Unit test with mocks | Medium | External API calls only |
| Performance test | High | Verify targets (<10ms BM25, <5ms CRUD) |
## Test Infrastructure
```python
# Good pattern: tmp_path + real services
def test_create_ticket(client, tmp_path):
"""client = FastAPI TestClient with real TicketService + Zvec"""
response = client.post("/tickets", json={"title": "Bug in login"})
assert response.status_code == 201
assert response.json()["title"] == "Bug in login"
```
```python
# Bad pattern: mocked everything
def test_create_ticket(mocker):
mock_service = mocker.MagicMock()
mock_service.create.return_value = Ticket(id="C1", ...)
# This test proves nothing — it tests the mock, not the code
```
## Test Naming
Use descriptive names that explain what's being tested:
```
✅ test_search_with_filters_returns_only_matching_tickets
✅ test_create_ticket_with_missing_title_returns_400
❌ test_search
❌ test_create
```
## Edge Cases to Always Test
- Empty input / empty results
- Invalid input (wrong types, missing fields)
- Not found (404)
- Duplicate operations
- Boundary values (limit=0, limit=10000)
- Concurrent-like patterns (sequential rapid ops)From ejacklab/vtic, MIT.
More from ejacklab/vtic
- 0.414score
self-harness
ejacklab
Design and use a workspace-local self-harness for multi-step work, planning, tracking, verification, and continuity.
SkillDFreshness: DClaude Code +9 - 0.409score
acp-management
ejacklab
Manage ACP (Agent Communication Protocol) sessions for Claude Code, Codex, and other coding harnesses.
SkillDFreshness: DClaude Code +9 - 0.409score
verify-before-trust
ejacklab
Verification protocol for agent outputs.
SkillDFreshness: DClaude Code +9 - 0.409score
design-doc-reconciliation
ejacklab
Workflow for generating, reviewing, and reconciling design documents across multiple agents.
SkillDFreshness: DClaude Code +9 - 0.409score
multi-agent-orchestration
ejacklab
Orchestrate multiple coding agents (subagents and ACP harnesses) for parallel development.
SkillDFreshness: DClaude Code +9 - 0.408score
task-manager
ejacklab
Lightweight task tracking for cclow.
SkillDFreshness: DClaude Code +9 - 0.406score
planning
ejacklab
Workspace-local planning guide for cclow.
SkillDFreshness: DClaude Code +9 - 0.385score
find-skills
ejacklab
Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express…
SkillDFreshness: DClaude Code +9 - 0.211score
scrum-master-lite
ejacklab
No description from the publisher yet.
SkillDFreshness: DClaude Code +9
Signals
- Stars
- 0
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Mar 21, 2026 (7 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/ejacklab/vtic
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from ejacklab
- 0.414score
self-harness
ejacklab
Design and use a workspace-local self-harness for multi-step work, planning, tracking, verification, and continuity.
SkillDFreshness: DClaude Code +9 - 0.409score
multi-agent-orchestration
ejacklab
Orchestrate multiple coding agents (subagents and ACP harnesses) for parallel development.
SkillDFreshness: DClaude Code +9 - 0.409score
verify-before-trust
ejacklab
Verification protocol for agent outputs.
SkillDFreshness: DClaude Code +9 - 0.409score
design-doc-reconciliation
ejacklab
Workflow for generating, reviewing, and reconciling design documents across multiple agents.
SkillDFreshness: DClaude Code +9 - 0.409score
acp-management
ejacklab
Manage ACP (Agent Communication Protocol) sessions for Claude Code, Codex, and other coding harnesses.
SkillDFreshness: DClaude Code +9 - 0.408score
task-manager
ejacklab
Lightweight task tracking for cclow.
SkillDFreshness: DClaude Code +9
Cite this page
test-hygiene skill. Agent Mart. https://agentmart.dev/skills/ejacklab-test-hygiene (last updated 2026-10-24)