coverage

Run tests with coverage analysis and identify untested code paths. Use to find gaps before releases.

12 stars

Best use case

coverage is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Run tests with coverage analysis and identify untested code paths. Use to find gaps before releases.

Teams using coverage should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/coverage/SKILL.md --create-dirs "https://raw.githubusercontent.com/PeterBooker/veloria/main/.claude/skills/coverage/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/coverage/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How coverage Compares

Feature / AgentcoverageStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Run tests with coverage analysis and identify untested code paths. Use to find gaps before releases.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Test Coverage Analysis

Run Go tests with coverage profiling to identify untested code paths.

## Usage

- `/coverage` - Coverage for all packages
- `/coverage ./internal/repo/...` - Coverage for specific package

## Steps

1. **Run tests with coverage**

   If `$ARGUMENTS` specifies a package:
   ```bash
   go test -coverprofile=coverage.out -covermode=atomic -timeout 5m $ARGUMENTS 2>&1
   ```

   Otherwise, run all packages:
   ```bash
   go test -coverprofile=coverage.out -covermode=atomic -timeout 5m ./... 2>&1
   ```

2. **Generate coverage summary**
   ```bash
   go tool cover -func=coverage.out 2>&1
   ```

3. **Identify low-coverage packages**

   Parse the output and flag packages below 50% coverage.

4. **Report findings**
   ```
   ## Coverage Results

   ### Package Summary
   | Package | Coverage | Status |
   |---------|----------|--------|

   ### Overall
   - Total coverage: N%

   ### Low Coverage (< 50%)
   - [packages needing attention]

   ### Uncovered Functions
   - [key uncovered functions in critical packages]
   ```

5. **Cleanup**
   ```bash
   rm -f coverage.out
   ```

## Critical Packages

Pay special attention to coverage in:
- `internal/repo/` - Data access layer
- `internal/manager/` - Orchestration logic
- `internal/index/` - Search indexing
- `internal/search/` - Search API handlers

## Tips

- For HTML coverage visualization: `go tool cover -html=coverage.out -o coverage.html`
- Integration test coverage requires `-tags integration` and Docker
- Test files (`_test.go`) are excluded from coverage automatically

Related Skills

We are still matching the closest adjacent skills for this page. In the meantime, continue through the full directory.