/peekie:peekie-coveragefrom peekie
Extracts code coverage from Xcode .xcresult bundles via `peekie coverage`. Outputs hierarchical JSON with module/file coverage, covered/total lines. Useful for CI gating and custom reports.
Ships in peekie. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
peekie coverageEmit code coverage from a .xcresult bundle as a hierarchical JSON structure (or list).
peekie coverage <xcresult-path> [flags]
| Flag | Default | Notes |
|---|---|---|
<xcresult-path> | — | Required positional. Path to the .xcresult bundle. |
--format json|list | json | Output format. |
-v, --verbose | false | Debug-level logging to stderr. |
There is no --include flag on peekie coverage. Filter modules/files with jq.
--format json (default){
"coverage": 0.6234,
"modules": [
{
"name": "Calculator",
"coverage": 0.71,
"coveredLines": 167,
"totalLines": 233,
"files": [
{"name": "Calculator.swift", "path": "/.../Calculator.swift", "coverage": 0.71, "coveredLines": 167, "totalLines": 233}
]
},
{
"name": "Networking",
"coverage": 0.42,
"coveredLines": 84,
"totalLines": 200,
"files": [
{"name": "Client.swift", "path": "/.../Networking/Client.swift", "coverage": 0.50, "coveredLines": 50, "totalLines": 100},
{"name": "Endpoint.swift", "path": "/.../Networking/Endpoint.swift", "coverage": 0.34, "coveredLines": 34, "totalLines": 100}
]
}
]
}
coverage is overall percentage as 0.0–1.0 (multiply by 100 for percent).coverage, coveredLines, totalLines.path is the absolute source-file path captured at build time.--format listHuman-readable, indented by module → file. Good for terminal, not for piping.
peekie coverage Tests.xcresult | jq '.coverage * 100 | floor'
peekie coverage Tests.xcresult | jq '(.coverage * 1000 | floor) / 10'
(.coverage * 1000 | floor) / 10 keeps it pure jq — no bc, no printf. For two decimals, use * 10000 | floor) / 100.
if ! peekie coverage Tests.xcresult | jq -e '.coverage >= 0.70' >/dev/null; then
cov=$(peekie coverage Tests.xcresult | jq -r '(.coverage * 1000 | floor) / 10')
echo "Coverage below 70% (got ${cov}%)" >&2
exit 1
fi
jq -e exits non-zero when the expression is false — no awk / bc needed.
peekie coverage Tests.xcresult \
| jq -r '.modules[] | "\(.name)\t\(.coveredLines)/\(.totalLines)\t\((.coverage * 100 | floor))%"'
peekie coverage Tests.xcresult \
| jq '.modules[] | select(.name == "Networking") | .files[] | select(.coverage < 0.5)'
peekie coverage Tests.xcresult \
| jq '.modules | sort_by(.coverage) | .[] | {name, coverage, coveredLines, totalLines}'
--include — it doesn't exist on peekie coverage. Filter with jq.peekie coverage only runs the coverage invocation (xcrun xccov). Use the other subcommands for those..coverage by anything other than 100 to get a percentage — it's already a 0.0–1.0 fraction.xcrun xccov view --report --json and parse it by hand — peekie coverage already runs and normalizes it.peekie-tests — test results from the same bundle.peekie-warnings / peekie-errors — build diagnostics from the same bundle.peekie (umbrella) — CI recipe that fetches errors, warnings, and coverage in one step.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
xcode-coverage, code-coverage, xcresult, peekie, ci-coverage, ios-testing
6 skills in this plugin
/peekieRoute Xcode `.xcresult` parsing work to the right `peekie` subcommand. Trigger on broad bundle intent — e.g. "look at this xcresult: /tmp/Build.xcresult", "parse this test bundle", "what's in this build artifact?", "can you summarize this `.xcresult`?", "I have an xcresult from CI, what should I do with it?". Five dedicated sub-skills (`peekie-tests`, `peekie-warnings`, `peekie-errors`, `peekie-coverage`, `peekie-attachments`) cover the data axes; this umbrella picks the right one./peekie-attachmentsExtract and list test attachments (screenshots, logs, blobs) from an Xcode `.xcresult` bundle via `peekie attachments`. Trigger when the user asks about attached files in a bundle — e.g. "extract failure screenshots from /tmp/Tests.xcresult to /tmp/out", "save attachments for a single test", "what's attached to my failing tests?", "dump every attachment from this xcresult", "give me a manifest of attachments with file paths and content types", "I need just the attachments for `ExampleSUITests/failure()`". `--output-dir` is required. Note `--include` filters the printed manifest, NOT files written to disk — use `--test-id` to scope disk writes./peekie-errorsList build errors from an Xcode `.xcresult` bundle via `peekie errors`. Trigger when the user asks about why a build broke or wants structured error output — e.g. "why is the build broken in /tmp/Build.xcresult?", "show me build errors from this CI run", "how many errors are there in this xcresult?", "give me JSON of compilation errors I can pipe to jq", "fail my CI step if errors > 0", "first three errors with file and line, please". One subcommand, flat sorted array per error, same shape as `peekie warnings`.npx claudepluginhub dodobrands/peekie --plugin peekieOther plugins' skills for the same job