brokkai/brokk-skills/brokk-untested-paths

Claude Code and agent skill by brokkai/brokk-skills

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Use when asked to find untested code, missing test coverage, or pathways with no tests in a codebase - maps source files and functions against test files to surface gaps

Install

npx vskill@latest install brokkai/brokk-skills/brokk-untested-paths

SKILL.md

brokk-untested-paths

Overview

Find code paths with no test coverage by cross-referencing source files against test files, detecting test framework conventions, checking for coverage reports, and identifying critical functions that appear nowhere in the test suite.

Prerequisites

sh
rg --version 2>/dev/null || echo "rg MISSING"

Step 1 — Detect Test Framework & Convention

sh
# Find test files by common naming conventions
rg --files | rg -i "(test|spec)\.(py|js|ts|java|go|rb|cs|php|rs)"
rg --files | rg -i "(test|spec)s?/"
rg --files | rg "_test\.(go|py|rs)$"
LanguageTest file patternFramework markers
Pythontest_*.py, *_test.pyimport pytest, import unittest, def test_
JS/TS*.test.ts, *.spec.tsdescribe(, it(, test(, expect(
Java*Test.java, *Tests.java@Test, import org.junit
Go*_test.gofunc Test, func Benchmark
Ruby*_spec.rb, test_*.rbdescribe, it, expect
C#*Tests.cs, *Test.cs[Test], [Fact], [TestMethod]
Rustsame file, #[cfg(test)]#[test]
PHP*Test.phpextends TestCase

Note the conventions found. This shapes Step 3.

Step 2 — Check for Existing Coverage Reports

Before doing manual analysis, look for pre-generated coverage data:

sh
rg --files | rg -i "(coverage|lcov|\.coverage|htmlcov|coverage\.xml|clover\.xml|jacoco)"
# Common locations
# Python: .coverage, htmlcov/, coverage.xml
# JS: coverage/lcov.info, coverage/lcov-report/
# Java: target/site/jacoco/index.html
# Go: coverage.out
# Ruby: coverage/.resultset.json
# Rust: tarpaulin-report.html

If a coverage report exists, read it and extract:

  • Overall line/branch coverage %
  • Files with 0% coverage
  • Files with <50% coverage

Report these directly — they are the answer. Still do Step 3 to find structurally untested paths the report may miss.

Step 3 — Map Source Files to Test Files

Build two lists:

Source files (exclude test dirs, vendor, node_modules, generated):

sh
rg --files --glob "!*test*" --glob "!*spec*" --glob "!vendor/*" \
--glob "!node_modules/*" --glob "!dist/*" --glob "!build/*" \
| rg "\.(py|js|ts|java|go|rb|cs|php|rs)$"

Test files:

sh
rg --files | rg -i "(test|spec)\.(py|js|ts|java|go|rb|cs|php|rs)|_test\.(go|py|rs)"

For each source file src/foo/bar.py, check whether a matching test file exists:

  • tests/foo/test_bar.py ✓
  • tests/foo/bar_test.py ✓
  • No match ✗ → untested file

List all source files with no corresponding test file. These are candidates — confirm below.

Step 4 — Find Untested Functions

For each file flagged in Step 3, list its public functions/methods:

sh
# Python — public functions (not starting with _)
rg -n "^def [^_]|^ def [^_]" src/foo/bar.py
# JS/TS — exported functions
rg -n "^export (async )?function|^export (const|let) \w+ = " src/foo/bar.ts
# Java — public methods
rg -n "public \w+ \w+\(" src/Foo.java
# Go — exported functions (capital first letter)
rg -n "^func [A-Z]" foo.go
# Ruby — public methods (not private/protected)
rg -n "^\s*def [^_]" foo.rb

Then check whether each function name appears anywhere in the test suite:

sh
rg -l "function_name" tests/

If the function name does not appear in any test file → untested function.

Step 5 — Identify High-Risk Untested Paths

Not all untested code is equal. Flag as critical if the untested code:

  • Is in files touched by recent commits: git log --oneline -30 -- <file>
  • Handles auth, payments, data mutation, file I/O, external APIs
  • Contains error handling (except, catch, rescue) — edge cases are rarely tested
  • Is in a file with no test at all (not just low coverage)
sh
# Find recently changed untested files
git log --since="90 days ago" --name-only --format="" | sort -u \
| rg "\.(py|js|ts|java|go)$" > recently_changed.txt
# Cross-reference with untested file list

Output Format

markdown
## Untested Paths Report
### Coverage Summary (if report found)
-Overall: 34% line coverage
-Files with 0% coverage: 12
-Files with <50% coverage: 28
### Source Files With No Test File
| File | Public Functions | Recently Changed |
|------|-----------------|-----------------|
| src/auth/token.py | 6 | yes (14 days ago) |
| src/billing/invoice.py | 4 | no |
### Untested Functions (in partially-tested files)
| Function | File | Risk |
|----------|------|------|
| validate_payment() | src/billing/payment.py:88 | HIGH — handles money |
| refresh_token() | src/auth/token.py:42 | HIGH — auth path |
### Test Framework Detected
-pytest (Python)
-jest (JS)
### Coverage Tool Detected
-.coverage found — run `coverage html` to view report

Windows Notes

  • rg --files and rg -l work natively
  • Replace shell pipeline sort -u | rg with: collect rg output, deduplicate manually
  • git log works natively on Windows with Git for Windows

Common Mistakes

MistakeFix
Reporting private/internal functions as untestedFocus on public API surface first
Missing test files in non-standard locationsSearch broadly with `rg --files \rg -i test`
Assuming no test file = no testsSome projects co-locate tests; check for #[test] or describe( blocks in source
Ignoring coverage reports that already existAlways check for existing reports first (Step 2)

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/brokkai/brokk-skills/brokk-untested-paths/badge)](https://verified-skill.com/skills/brokkai/brokk-skills/brokk-untested-paths)

Something wrong with this skill or its page? Tell us.