Skip to content
Skill

Kcov debug

Diagnoses and fixes kcov bash and pytest coverage failures in ClaudeSec CI

Kcov debug is an open-source agent skill for developer tools. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

Scripts
None
Platforms
Claude Code, Codex, Cursor
GitHub stars
14
Last commit
License
MIT
Listing updated

Similar skills

About Kcov debug

This skill is a troubleshooting playbook for the coverage checks in the ClaudeSec project. It sorts a failing or stalled coverage job into a category, such as a hang, a missing merged coverage.json, zero bash coverage, or a result below the bash or Python floor, and then points to the fix for that case.

The guidance centers on a few known causes. Live GitHub API calls made by the dashboard generator can make tests run for minutes, so the playbook says to set an offline environment variable before anything else. It also explains that kcov v42 writes merged output into a nested directory, so file paths should be found rather than hard-coded, and it covers instrumentation pitfalls such as tracing the script instead of the interpreter. Floor changes are treated as a one-way ratchet, and the playbook says to add tests rather than lower thresholds.

It expects a ClaudeSec checkout with its lint workflow, bash and kcov v42, pytest, and the offline mode variable, and it includes local commands for re-running the Python gate and a shell test under kcov.

When your agent uses it

Diagnose and fix ClaudeSec coverage failures — kcov bash coverage (scanner-shell-coverage job), pytest scanner/lib gate, hangs, "no coverage.json found", and floor-below-threshold errors. Use when a coverage CI job fails, hangs, reports 0%/missing coverage, or when raising a coverage floor.

From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.

What it can access

From a static check of its 1 file (7 KB) on GitHub on 4 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.

Check another skill before you install it.

Install

Copy the skill folder to ~/.claude/skills/kcov-debug to use it in all your projects:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/Twodragon0/claudesec.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/kcov-debug &&
cp -R "$tmp/.claude/skills/kcov-debug" ~/.claude/skills/kcov-debug &&
rm -rf "$tmp"

For one project only, put the folder in .claude/skills/kcov-debug inside it instead.

Claude Code docs on skills

Copy the skill folder to ~/.agents/skills/kcov-debug to use it in every repository:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/Twodragon0/claudesec.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/kcov-debug &&
cp -R "$tmp/.claude/skills/kcov-debug" ~/.agents/skills/kcov-debug &&
rm -rf "$tmp"

For one repository only, put the folder in .agents/skills/kcov-debug inside it instead.

Codex docs on skills

Copy the skill folder to ~/.cursor/skills/kcov-debug to use it in every project:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/Twodragon0/claudesec.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/kcov-debug &&
cp -R "$tmp/.claude/skills/kcov-debug" ~/.cursor/skills/kcov-debug &&
rm -rf "$tmp"

For one project only, put the folder in .cursor/skills/kcov-debug inside it instead.

Cursor docs on skills

Run in a terminal (add --scope workspace to install it for the current workspace only):

gemini skills install https://github.com/Twodragon0/claudesec.git --path .claude/skills/kcov-debug

Or copy the folder to ~/.gemini/skills/kcov-debug yourself.

Gemini CLI docs on skills

For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/kcov-debug:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/Twodragon0/claudesec.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/kcov-debug &&
cp -R "$tmp/.claude/skills/kcov-debug" ~/.copilot/skills/kcov-debug &&
rm -rf "$tmp"

For one project only, put the folder in .github/skills/kcov-debug inside it instead.

VS Code docs on skills

Get the folder:

git clone --depth 1 https://github.com/Twodragon0/claudesec.git

Then copy claudesec/.claude/skills/kcov-debug into your agent's skills folder as kcov-debug. Agents that support SKILL.md read one folder per skill.

The SKILL.md format

What it does

Failure triage decision tree
Maps a red or slow coverage job to the most likely cause and the section that addresses it.
Offline dashboard guard
Explains why hung tests usually need the offline environment variable and how CI sets it.
Merged coverage path discovery
Shows how to locate the merged kcov JSON with find instead of a fixed path.
kcov instrumentation pitfalls
Covers tracing the script rather than bash and using filename-based include patterns.
Coverage floor guidance
Describes when a bash or Python floor may be raised and why tests should be added instead of lowering thresholds.
Local verification commands
Lists offline commands for running the Python gate, a single kcov test, and reading the merged percentage.

Good for

  • Fix a scanner-shell-coverage CI job that hangs or times out
  • Find why the coverage gate reports no coverage.json file
  • Investigate bash coverage that suddenly drops below the 90% floor
  • Reproduce a slow coverage test locally in offline mode
  • Decide whether a coverage floor can safely be raised

Kcov debug FAQ

When does Kcov debug trigger?

It is meant for cases where a coverage CI job fails, hangs, reports 0% or missing coverage, or where a coverage floor is being raised.

What is the most common cause of a hanging coverage job?

According to the playbook, un-gated live GitHub API calls in the dashboard generator, which is fixed by exporting CLAUDESEC_DASHBOARD_OFFLINE=1.

Does Kcov debug recommend lowering the coverage floor when a check fails?

No. It says to add or extend tests covering the uncovered code and not to relax the gate.

Which tools does Kcov debug need?

It references kcov v42, pytest with coverage, bash, and the ClaudeSec lint workflow, and includes local commands for them.

How do I install Kcov debug in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/kcov-debug to use it in all your projects, or to .claude/skills/kcov-debug in one project.

Does Kcov debug run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

Which AI agents can use Kcov debug?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

What are the best alternatives to Kcov debug?

The closest alternatives to Kcov debug are Ci, Fix ci, Ci config guard claudesec, Ci and Systematic Debugging.

Where this comes from

  • Description: from the skill's own SKILL.md.

More from Twodragon0/claudesec

  1. Guides writing CI config regression tests for the ClaudeSec repo's workflows

    • Open source
    • 14 GitHub stars
    • Developer tools
  2. Triages lychee link-rot and redirect findings in ClaudeSec docs and CI

    • Open source
    • 14 GitHub stars
    • Developer tools
  3. Reference catalog for OMC agents, tools, team pipelines, skills and commit trailers

    • Open source
    • 14 GitHub stars
    • Developer tools