Skip to content
Back to skills

Analyze Testability

ASecurity

Analyze source code to find WHAT is still untested (never what a test should expect — expected values come from the plan/AC)." Identifies public API, dependencies to mock, test categories (happy / error / edge), and coverage strategy.

  • 4 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 17, 2026
testinggotestingapifrontendbackend

Works with

  • cli
  • api

Security analysis

A100/100

Scanned November 17, 2026

npx -y skills add CarlosNavarron1990/kuraka --skill analyze-testability --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Analyze Testability?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Analyze Testability
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/carlosnavarron1990-analyze-testability/badge)](https://www.skillsdirectory.com/skills/carlosnavarron1990-analyze-testability)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: analyze-testability
description: "Analyze source code to find WHAT is still untested (never what a test should expect — expected values come from the plan/AC)." Identifies public API, dependencies to mock, test categories (happy / error / edge), and coverage strategy."
agent: "`test-engineer`"
phase: "6 — see `kuraka`"
disable-model-invocation: true
user-invocable: false
---

# Analyze Testability

Analyze a source file to find what is still untested (Phase 6 coverage gaps),
for the project described in `kuraka.config.yaml`.

**The code tells you WHAT to test, never WHAT to expect.** Use it to list
untested functions, branches, error paths and dependencies to mock. The
expected value of each test comes from the test plan's oracle, the AC, the
frozen contract or a business rule — cite it. If the code's behavior
contradicts the plan, report a finding (bug or spec gap); if no spec source
determines the value, report a spec gap. Never freeze current behavior as the
expectation: that test confirms the bugs it should catch.

## Input

A source file path (relative to the project root, typically under
`${architecture.paths.backend_root}` or `${architecture.paths.frontend_root}`).

## Steps

### 1. Read and understand

Read the entire source file. For each public function / method, extract:

- Function signature (name, params, return type).
- Dependencies (what it imports / calls).
- Side effects (DB writes, API calls, file I/O).
- Error conditions (what raises exceptions).
- Business rules (status checks, validations).

### 2. Classify dependencies and pick mock strategy

The mock strategy depends on the stack and the dependency type. Consult
the stack profile for `${stack.backend.framework}` (or frontend) for the
framework-specific mocking idioms. Generic guidance:

| Dependency type | Mock strategy |
|---|---|
| Data-access functions (repositories) | Mock at the import boundary |
| Other services | Mock at the import boundary |
| External clients (HTTP, LLM, queue) | Mock the client wrapper |
| File system | Mock or use temp directories |
| DB session | Use real session for integration tests; mock for unit |

For project-specific available fixtures, consult
`.claude/project/conventions/test-fixtures.md` if maintained.

### 3. Generate test matrix

For each public function, produce:

```markdown
| Function | Test Case | Type | Category | Priority |
|----------|-----------|------|----------|----------|
| create_x | valid data → returns entity | Unit | Happy | P0 |
| create_x | duplicate → raises 409 | Unit | Error | P0 |
| process | wrong status → raises 400 | Unit | Error | P1 |
| get_results | empty results → returns empty list | Unit | Edge | P2 |
```

### 4. Determine test type

- **Unit test** if: function has mockable dependencies, no real DB
  needed.
- **Integration test** if: tests cross-module behavior, needs real DB.
- **Endpoint / route test** if: testing the HTTP / framework layer
  (status codes, response format).

### 5. Output: test plan

```markdown
## Test Plan: {filename}

### Public API (N functions)
1. `function_name(params)` → return_type

### Dependencies to Mock
- {module}.{method}
- {external_service}.{call}

### Test Matrix
| # | Function | Test Name | Category | Mocks |
|---|----------|-----------|----------|-------|

### Files to Create
- `${architecture.paths.tests_root}/unit/{module}/test_{name}.<ext>`

### Estimated Tests: N
```

The file extension and naming come from the stack profile's test
conventions.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in testing →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.