Source profileQuality 59/100

gadievron/raptor/.claude/skills/crash-analysis/gcov-coverage/SKILL.md

Code Coverage with gcov

Add gcov code coverage instrumentation to C/C++ projects

Source repository stars
3,413
Declared platforms
0
Static risk flags
0
Last source update
2026-07-28
Source checked
2026-07-28

Decision brief

What it does—and where it fits

Add gcov code coverage instrumentation to C/C++ projects

Best for

  • Instrument C/C++ programs with gcov to measure test coverage.

Not for

  • Tasks that require unconfirmed production actions or broad system permissions.
  • Environments where the pinned source and install steps cannot be inspected.

Compatibility matrix

Platform support, with evidence labels

PlatformStatusEvidenceWhat to check
CodexNot declaredNo explicit evidencePortability before use
Claude CodeNot declaredNo explicit evidencePortability before use
CursorNot declaredNo explicit evidencePortability before use
Gemini CLINot declaredNo explicit evidencePortability before use
Open the compatibility checker

Installation

Inspect first. Install second.

The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.

Source-detected install commandSource
npx skills add https://github.com/gadievron/raptor --skill ".claude/skills/crash-analysis/gcov-coverage"
Safe inspection promptEditorial

Inspect the Agent Skill "Code Coverage with gcov" from https://github.com/gadievron/raptor/blob/e63c1b0ae449516f50ab510226ceb09a0edb3895/.claude/skills/crash-analysis/gcov-coverage/SKILL.md at commit e63c1b0ae449516f50ab510226ceb09a0edb3895. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.

Workflow

What the source asks the agent to do

  1. 01

    Purpose

    Instrument C/C++ programs with gcov to measure test coverage.

    Instrument C/C++ programs with gcov to measure test coverage.
  2. 02

    How It Works

    Review the “How It Works” section in the pinned source before continuing.

    Review and apply the “How It Works” source section.
  3. 03

    Build with Coverage

    Review the “Build with Coverage” section in the pinned source before continuing.

    Review and apply the “Build with Coverage” source section.
  4. 04

    Run Program

    Review the “Run Program” section in the pinned source before continuing.

    Review and apply the “Run Program” source section.

Permission review

Static risk signals and limitations

No configured static risk pattern was detected

This is not proof of safety. Runtime behavior, indirect dependencies, and hidden external systems are outside the static scan.

Evidence record

Why each signal appears

EvidenceSourceComputedTestedEditorial
SignalValueEvidence typeMeaning
Quality score59/100ComputedDocumentation, specificity, maintenance, and trust rules
Repository stars3,413SourceRepository attention, not individual Skill quality
Compatibility0 platformsSourceDeclared in the catalog source record
Usage guideautomated source guideEditorialGenerated or reviewed according to the visible evidence level

Pinned source

Provenance and original SKILL.md

Repository
gadievron/raptor
Skill path
.claude/skills/crash-analysis/gcov-coverage/SKILL.md
Commit
e63c1b0ae449516f50ab510226ceb09a0edb3895
License
NOASSERTION
Collected
2026-07-28
Default branch
main
View the original SKILL.md

Code Coverage with gcov

Purpose

Instrument C/C++ programs with gcov to measure test coverage.

How It Works

Build with Coverage

gcc --coverage -o program source.c

Run Program

./program
# Creates .gcda files with execution data

Generate Reports

Text report:

gcov source.c
# Creates source.c.gcov with line-by-line coverage

HTML report:

gcovr --html-details -o coverage.html

Coverage Flags

  • --coverage (shorthand for -fprofile-arcs -ftest-coverage -lgcov)
  • Add to both CFLAGS and LDFLAGS

Build System Integration

Makefile

ENABLE_COVERAGE ?= 0
ifeq ($(ENABLE_COVERAGE),1)
    CFLAGS += --coverage
    LDFLAGS += --coverage
endif

CMake

option(ENABLE_COVERAGE "Enable coverage" OFF)
if(ENABLE_COVERAGE)
    add_compile_options(--coverage)
    add_link_options(--coverage)
endif()

When User Requests Coverage

Steps

  1. Detect build system (Makefile/CMake/other)
  2. Add --coverage to CFLAGS and LDFLAGS
  3. Clean previous build: make clean or rm -f *.gcda *.gcno
  4. Build with coverage: make ENABLE_COVERAGE=1 or cmake -DENABLE_COVERAGE=ON
  5. Run tests: make test or ./test_suite
  6. Generate report: gcovr --html-details coverage.html --print-summary
  7. Present summary and path to HTML report

Output

Text (.gcov files):

        -:    0:Source:main.c
        5:   42:    int x = 10;
    #####:   43:    unused_code();
  • 5: = executed 5 times
  • #####: = not executed
  • -: = non-executable

HTML: Interactive report with color-coded coverage

Metrics

  • Line coverage: Executed lines / total lines
  • Branch coverage: Taken branches / total branches
  • Function coverage: Called functions / total functions

Target: 80%+ line coverage, 70%+ branch coverage

Alternatives

Compare before choosing