goccy/tobari/tobari-coverage-improver
Claude Code and agent skill by goccy/tobari
- community
Checking that the SKILL.md file is still in the repository.
Analyze test coverage data from tobari.toon and help improve test coverage incrementally. Use when the user has run go test with tobari enabled (e.g., `GOFLAGS="$(tobari flags)" go test ./...`) and wants to improve test coverage or increase code coverage percentage. Triggers on phrases like "improve coverage", "increase coverage", "coverage improvement", or "add more tests".
Install
npx vskill@latest install goccy/tobari/tobari-coverage-improverSKILL.md
Improve Test Coverage
This skill analyzes test coverage data from tobari and helps improve test coverage incrementally.
Prerequisites
Ensure you have run tests with tobari enabled:
How to Read Coverage Data
- Check if
TOBARI_COVERDIRenvironment variable is set:
``bash echo $TOBARI_COVERDIR ``
- If set, read
$TOBARI_COVERDIR/tobari/tobari.toon - If not set or empty, read
./tobari/tobari.toonfrom current directory
TOON Format Parsing
The tobari.toon file uses Token-Oriented Object Notation format:
- Top-level key is the test name (e.g.,
Addcorresponds toTestAddfunction) [N]indicates the number of entries- Each indented line (starting with tab) is a coverage entry with comma-separated values:
- FileName: source file path
- StartLine, StartCol: start position
- EndLine, EndCol: end position
- StatementCount: number of statements in this block
- Count: execution count (0 = not covered)
Reports with passedBlocksOnly
If tobari.toon ends with a passedBlocksOnly[N]: section, the tests listed there come from a binary built with --passed-blocks-only: their per-test lists hold only blocks that were actually passed, so none of their entries has Count = 0. Do not conclude that everything is covered. Derive the full set of blocks from the all[N]: list in the metadata: section instead (each line is FileName,StartLine,StartCol,EndLine,EndCol,StatementCount), and treat a block of all that appears in no test as not covered. If the metadata: section also has a sources[N]{Source,Files}: list and the file ends with a source[N]{Name,Source}: section, the report merges several programs: restrict all to the files of the test's own source.
Calculate Current Coverage
- Collect all unique coverage entries across all tests:
- Key =
FileName:StartLine:StartCol:EndLine:EndCol - Track: StatementCount, MaxCount (highest Count across all tests)
- Calculate coverage rate:
`` TotalStatements = sum of all StatementCount values CoveredStatements = sum of StatementCount where MaxCount > 0 CoverageRate = CoveredStatements / TotalStatements * 100 ``
- Report to user:
`` Current coverage: XX.X% (Y of Z statements covered) ``
Improve Coverage Incrementally
Set Target and Improve
- Set target: CurrentCoverage + 5% (capped at 100%)
- Find uncovered code blocks (where Count = 0 for all tests):
- Read the source file at those locations
- Understand what code path leads to that block
- Determine what test input would exercise that code
- Implement improvements:
- Add new test cases or modify existing ones
- Follow existing test patterns in the codebase
- Use table-driven tests when appropriate for Go
- Run tests with tobari to verify coverage improved:
``bash GOFLAGS="$(tobari flags)" go test ./... ``
- Re-read tobari.toon and calculate new coverage
Report and Confirm
After each improvement cycle:
- Show the user:
- Previous coverage rate
- New coverage rate
- What was added/changed
- Use AskUserQuestion:
- Question: "Coverage improved from X% to Y%. How would you like to proceed?"
- Options:
- "Continue improving (+5% more)"
- "Skip confirmations and continue to Z%" (where Z is a target like 80%, 90%, 100%)
- "Stop here"
- If user selects "Skip confirmations":
- Ask for target percentage if not specified
- Continue improving without confirmation until target is reached or no more improvements possible
- If user selects "Continue", repeat from "Set Target and Improve"
Important Guidelines
- Focus on meaningful coverage that tests actual behavior, not just line hits
- Consider edge cases: error paths, boundary conditions, nil/empty inputs
- When adding tests, follow existing patterns in the codebase
- Prefer table-driven tests for Go code when testing multiple inputs
- Don't add tests just to hit lines - ensure tests verify correct behavior
- If a code path is intentionally unreachable (dead code), suggest removing it instead of adding tests
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/tobari-coverage-improver/SKILL.md
Popularity
- Repository stars
- 48
- Repository forks
- 2
- 7-day trend score
- 19
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 24 Mar 2026, 7 months ago.
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
[](https://verified-skill.com/skills/goccy/tobari/tobari-coverage-improver)