bzfs-improve-code-coverage
Testing & QualityImprove code coverage in this repository with project-approved coverage commands and meaningful test additions. Use when asked to increase coverage, identify uncovered branches/functions, or report before-vs-after coverage percentages.
QUICK START
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/whoschek/bzfs/blob/HEAD/.agents/skills/bzfs-improve-code-coverage/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/bzfs-improve-code-coverage, but wait for my approval before writing files or running scripts.
Copying this prompt does not install or run the skill. Review third-party files before use.
bzfs Improve Code Coverage
Outcome
Improve code coverage meaningfully by adding high-value tests for critical uncovered logic paths and reporting measurable results.
Workflow
-
Measure baseline coverage:
export bzfs_test_mode="${bzfs_test_mode-unit}" # use existing bzfs_test_mode if defined python3 -m coverage run -m bzfs_tests.test_all # run the tests to gather coverage data python3 -m coverage xml # generate an XML coverage report cat coverage.xml # view the XML report to identify uncovered lines/branches -
Identify critical gaps:
- Use
coverage.xmlto identify key logic branches or functions that lack tests.
- Use
-
Add high-value tests:
- Prioritize adding tests for those areas rather than chasing minor unused lines.
- Focus on adding meaningful high-value tests: Do not add low-value tests just to increase a coverage percentage.
-
Re-run measurement with the same commands and compare results.
-
Report results:
- State the before vs. after coverage percentage so the impact is clear.
- Summarize which critical branches/functions are now covered.