Skip to content
Back to skills

Smart Test

ASecurity

Find test gaps and generate tests for uncovered code. Triggers on: generate tests, write tests, test coverage, find untested code, test gaps, smart test, what needs testing.

  • 10 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 2, 2026
ai-agentsgotesting

Works with

  • mcp

Security analysis

A100/100

Scanned September 2, 2026

npx -y skills add Smart-AI-Memory/attune-ai --skill smart-test --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Smart Test?

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

Security grade badge for Smart Test
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/smart-ai-memory-smart-test/badge)](https://www.skillsdirectory.com/skills/smart-ai-memory-smart-test)

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: smart-test
description: "Find test gaps and generate tests for uncovered code. Triggers on: generate tests, write tests, test coverage, find untested code, test gaps, smart test, what needs testing."
---
# Smart Test

**IMPORTANT: Start your response with a context preamble.**

Call `help_lookup(topic="smart-test", mode="preamble")` and
display the returned `preamble` text as a blockquote. Then
tell the user they can say "tell me more" for a step-by-step
guide, or answer the scoping questions below to proceed.

If the MCP call fails, fall back to:

> **Smart Test** — Finds untested code and generates pytest tests with edge cases and error paths.

## Scoping

Before running, ask:

1. **Target**: "Which file or module needs tests?"
2. **Approach**: "What kind of testing?"
   - Gap analysis — Find untested public functions
   - Generate tests — Write pytest tests for a module
   - Both — Audit gaps then generate tests for them

## MCP Tools

| Tool | What It Does |
| ---- | ------------ |
| `test_audit` | Coverage audit and gap detection |
| `test_generation` | Generate unit tests with edge cases |
| `test_gen_parallel` | Batch test generation (10-50 modules) |

## Execution

### Shared command workspace (preferred)

Open adapter `smart-test` with the validated target and `gap`, `generate`, or
`both` approach. The bound audit action is read-only. Publish the actual audit
as `audit_result`, including exact proposed test paths before any generator is
called. Present the proposal widget or Markdown; only an explicitly confirmed
`generate_tests` action authorizes those paths.

After `test_generation`, publish `generation_result` with the exact files
reported from disk. The adapter independently hashes those files and rejects
writes outside or different from the approved set. Run the returned test
probe and publish its exact command and exit code as `validation_result`.
Generator or test failure must say “did not complete” and retain the written
paths for rollback; it may not claim tests were created successfully. Preserve
the same preview/write/validation gates in compact text when the shared tools
are unavailable.

For gap analysis:

```
test_audit(path="<target>")
```

For targeted test generation:

```
test_generation(module="<target module>")
```

For batch generation across many modules:

```
test_gen_parallel(top=10)
```

## Output Format

**Prefer the rich panel.** If the tool response includes `panel_html`,
pass it to `mcp__visualize__show_widget` — the universal report panel
(title, score, findings/category sections; from
`attune.workflows.report_panel`). It shows an explicit "did not
complete" state on failure, never a false "clean". Fall back to the
markdown below when the widget surface is unavailable.

```markdown
## Test Gap Analysis

**Coverage:** X% | **Untested Functions:** Y

### Gaps by Priority
| File | Function | Risk | Coverage |
|------|----------|------|----------|

### Generated Tests
| File | Tests Created | Edge Cases |
|------|---------------|------------|
```

## Help

After presenting results, call:

```
help_lookup(topic="smart-test", mode="workflow_help")
```

If templates are returned, offer: "I have tips about
test generation — want to see them?"

## Follow-Up

After presenting results, offer:

- "Want me to generate tests for the top gaps?"
- "Should I run the generated tests to verify?"
- "Want to see coverage for a different module?"

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.

Comments

Loading comments…

Newsletter

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