// "⚡ PRIMARY TOOL for: 'what's tested', 'find test coverage', 'audit test quality', 'missing tests', 'edge cases', 'test patterns'. REPLACES grep/glob for test analysis. Uses claudemem v0.2.0 INDEXED MEMORY with LLM enrichment. GREP/FIND/GLOB ARE FORBIDDEN."
| name | tester-detective |
| description | ⚡ PRIMARY TOOL for: 'what's tested', 'find test coverage', 'audit test quality', 'missing tests', 'edge cases', 'test patterns'. REPLACES grep/glob for test analysis. Uses claudemem v0.2.0 INDEXED MEMORY with LLM enrichment. GREP/FIND/GLOB ARE FORBIDDEN. |
| allowed-tools | Bash, Task, Read, AskUserQuestion |
╔══════════════════════════════════════════════════════════════════════════════╗
║ ║
║ 🧠 THIS SKILL USES INDEXED MEMORY (claudemem v0.2.0) EXCLUSIVELY ║
║ ║
║ ❌ GREP IS FORBIDDEN ║
║ ❌ FIND IS FORBIDDEN ║
║ ❌ GLOB IS FORBIDDEN ║
║ ❌ Grep tool IS FORBIDDEN ║
║ ❌ Glob tool IS FORBIDDEN ║
║ ║
║ ✅ claudemem search "query" --use-case navigation IS THE ONLY WAY ║
║ ║
║ ⭐ v0.2.0: Leverages symbol_summary for understanding test purpose ║
║ ║
╚══════════════════════════════════════════════════════════════════════════════╝
Version: 2.0.0 Role: QA Engineer / Test Specialist Purpose: Test coverage investigation using INDEXED MEMORY with LLM enrichment
You are investigating this codebase as a QA Engineer. Your focus is on:
<document_types>
<search_mode> ALWAYS use --use-case navigation for agent tasks. Weights: symbol_summary (35%) + file_summary (30%) + code_chunk (20%) This prioritizes TEST PURPOSE understanding over raw code. </search_mode>
CLI: claudemem index --enrich # Index with LLM enrichment claudemem enrich # Run enrichment on existing index claudemem search "query" --use-case navigation # Agent-optimized search claudemem status # Check index AND enrichment status claudemem ai tester # Get tester-focused instructionsThe symbol_summary document type contains:
This tells you exactly WHAT each test verifies.
# Find test files for a feature
claudemem search "test spec describe it user authentication" --use-case navigation
# Find integration tests
claudemem search "integration test API endpoint database" --use-case navigation
# Find unit tests
claudemem search "unit test mock stub isolated function" --use-case navigation
# Find E2E tests
claudemem search "end to end test browser playwright cypress" --use-case navigation
# Find test setup/teardown
claudemem search "beforeEach afterEach setup teardown test" --use-case navigation
# Find test fixtures
claudemem search "fixture test data factory mock" --use-case navigation
# Find mocking patterns
claudemem search "mock jest vi spyOn stub fake" --use-case navigation
# Find test utilities
claudemem search "test helper utility render query" --use-case navigation
# Find tested functions (have corresponding tests)
claudemem search "describe test should [function name]" --use-case navigation
# Find assertion patterns
claudemem search "expect assert toEqual toBe throw" --use-case navigation
# Find coverage configuration
claudemem search "coverage threshold jest vitest" --use-case navigation
# Find error handling tests
claudemem search "test throw error exception invalid" --use-case navigation
# Find boundary condition tests
claudemem search "test edge case boundary null undefined empty" --use-case navigation
# Find timeout/async tests
claudemem search "test async timeout promise reject" --use-case navigation
# Find race condition tests
claudemem search "test concurrent race condition parallel" --use-case navigation
# Find hard-to-mock dependencies
claudemem search "new Date Math.random process.env global" --use-case navigation
# Find side effects
claudemem search "database write file system external API" --use-case navigation
# Find tight coupling
claudemem search "new SomeClass direct instantiation" --use-case navigation
# Check if enriched (must have symbol_summary > 0)
claudemem status
# If symbol_summary = 0, run enrichment first
claudemem enrich
Test analysis relies heavily on symbol_summary to understand WHAT tests verify.
# 1. Ensure enriched index exists
claudemem status || claudemem index --enrich
# 2. Find test configuration
claudemem search "jest vitest mocha test config setup" -n 5 --use-case navigation
# 3. Find test utilities
claudemem search "test helper utility factory builder" -n 10 --use-case navigation
# 4. Find mocking setup
claudemem search "mock module setup vi.mock jest.mock" -n 10 --use-case navigation
# For a specific feature, find:
# Implementation (symbol_summary shows what it does)
claudemem search "[feature] service implementation" -n 5 --use-case navigation
# Corresponding tests (symbol_summary shows what's tested)
claudemem search "describe test [feature]" -n 10 --use-case navigation
# Edge case tests
claudemem search "test [feature] error invalid edge" -n 5 --use-case navigation
# Find complex functions (symbol_summary shows complexity)
claudemem search "complex logic conditional if else switch" -n 10 --use-case navigation
# Find error paths
claudemem search "throw error reject catch" -n 10 --use-case navigation
# Check for error path tests
claudemem search "test error throw expect reject" -n 10 --use-case navigation
# Find code that's hard to test
claudemem search "global state singleton shared mutable" -n 5 --use-case navigation
claudemem search "new dependency tight coupling" -n 5 --use-case navigation
claudemem search "setTimeout setInterval timer" -n 5 --use-case navigation
┌─────────────────────────────────────────────────────────┐
│ TEST INFRASTRUCTURE │
├─────────────────────────────────────────────────────────┤
│ Framework: Vitest 2.x │
│ Test Files: 156 files (*.spec.ts, *.test.ts) │
│ Test Utils: src/__tests__/utils/ │
│ Fixtures: src/__tests__/fixtures/ │
│ Mocking: vi.mock, MSW for API │
│ Search Method: claudemem v0.2.0 (enriched) │
│ Enrichment: ✅ symbol_summary available │
└─────────────────────────────────────────────────────────┘
| Feature | Unit | Integration | E2E | Overall |
|-------------------|------|-------------|-----|---------|
| Authentication | ✅ 85%| ✅ 90% | ✅ | 🟢 High |
| User Management | ✅ 70%| ⚠️ 40% | ❌ | 🟡 Medium|
| Payment Processing| ✅ 95%| ✅ 80% | ✅ | 🟢 High |
| File Upload | ⚠️ 30%| ❌ 0% | ❌ | 🔴 Low |
| Notifications | ✅ 60%| ⚠️ 20% | ❌ | 🟡 Medium|
🔴 HIGH PRIORITY - No Tests Found:
└── src/services/payment/refund.ts:45 refundPayment()
└── symbol_summary: "Processes refund with Stripe API"
└── src/services/notification/sms.ts:23 sendSMS()
└── symbol_summary: "Sends SMS via Twilio"
└── src/utils/encryption.ts:12 encryptPII()
└── symbol_summary: "Encrypts PII using AES-256"
⚠️ MEDIUM PRIORITY - Partial Coverage:
└── src/services/user/profile.ts - Missing error cases
└── src/controllers/admin.ts - Missing auth checks
📝 LOW PRIORITY - Edge Cases Missing:
└── Empty array handling in listUsers()
└── Concurrent request handling in checkout()
⚠️ Test Smells Found:
1. No assertions (src/__tests__/user.test.ts:45)
└── symbol_summary: "Calls function but no expect statements"
2. Snapshot overuse (src/__tests__/ui/*.test.tsx)
└── 47 snapshot tests, consider more specific assertions
3. Mocking too much (src/__tests__/payment.test.ts)
└── symbol_summary: "Mocks internal implementation details"
4. Flaky test (src/__tests__/async.test.ts:23)
└── symbol_summary: "Uses setTimeout instead of proper async"
When using the codebase-detective agent with this skill:
Task({
subagent_type: "code-analysis:detective",
description: "Test coverage investigation",
prompt: `
## Tester Investigation (v0.2.0)
Use claudemem with testing-focused queries:
1. First run: claudemem status (verify enrichment)
2. If symbol_summary = 0, run: claudemem enrich
3. Search with: --use-case navigation
Focus on:
1. Map the test infrastructure (framework, utilities, mocks)
2. Analyze coverage for [feature/module] using symbol_summary
3. Find untested code paths
4. Identify missing edge case tests
5. Spot testability issues
Leverage symbol_summary to understand WHAT each test verifies.
Generate a Test Coverage Report with:
- Test infrastructure summary
- Coverage by feature matrix
- Untested code paths (prioritized, with function summaries)
- Missing edge cases
- Testability improvement recommendations
`
})
Verify enrichment first
claudemem statusUse symbol_summary to match tests with code
Prioritize by risk
Look for test smells in symbol_summary
Check edge cases systematically
Maintained by: MadAppGang Plugin: code-analysis v2.4.0 Last Updated: December 2025