← ClaudeAtlas

backend-testlisted

Generate backend tests (unit, integration, mocks) for existing code. Auto-invoke when user says "write test for", "add test", "test this", or "create test".
alekspetrov/navigator · ★ 189 · AI & Automation · score 80
Install: claude install-skill alekspetrov/navigator
# Backend Test Generator Generate backend tests for **existing code** — typically code that was written without tests, or where additional coverage is needed beyond what a code-writing skill (`backend-endpoint`) already produced. > **When to use this vs. `backend-endpoint`**: `backend-endpoint` generates tests as part of creating a new endpoint. Use `backend-test` when the code already exists and you need to add or expand its tests. ## When to Invoke Auto-invoke when user says: - "Write test for [file/function]" - "Add test" / "Add tests" - "Test this" - "Create test for [thing]" - "Test the [api/service/function]" ## Execution Steps ### Step 0: Check Existing Patterns (Phase 0) Query the knowledge graph for what we know about testing in this project: ```bash PLUGIN_DIR="${CLAUDE_PLUGIN_ROOT:-$HOME/.claude/plugins/cache/navigator-marketplace/navigator}" [ -d "$PLUGIN_DIR" ] || PLUGIN_DIR="$HOME/.claude/plugins/marketplaces/navigator-marketplace" python3 "$PLUGIN_DIR/skills/nav-graph/functions/graph_manager.py" \ --action query --concept testing \ --graph-path .agent/knowledge/graph.json 2>/dev/null | head -40 ``` Surface patterns (preferred frameworks, mocking conventions) and pitfalls (flaky-test gotchas). If the graph returns nothing, proceed without it. ### Step 1: Locate Code Under Test If the user named a specific file, use it. Otherwise, ask: ``` What should I test? - File path (e.g., src/services/userService.ts) - Function name (e.g., authenticateUse