/ginkgo:reportingfrom ginkgo
Generates and enriches Ginkgo test reports: console verbosity flags, JSON/JUnit machine-readable output, programmatic reporting nodes (ReportAfterEach, ReportAfterSuite), AddReportEntry, and profiling (--cover/--race/--cpuprofile/--memprofile).
Ships in ginkgo. 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.
How to produce reports and feed data into them. To read a failing report as an agent (the jq failure-diagnosis workflow), see ginkgo:debugging-failures. Docs: https://onsi.github.io/ginkgo/#generating-machine-readable-reports and https://onsi.github.io/ginkgo/#attaching-data-to-reports.
| Flag | Effect |
|---|---|
--succinct | Minimal (default when running multiple suites). |
| (none) | Normal — detail only for failed specs (default, single suite). |
-v | Full timeline for every spec; streams live in series. |
-vv | -v plus node > Enter/< Exit events and every failure (not just the primary). |
--trace | Full stack trace on every failure, not just panics. |
--no-color / GINKGO_NO_COLOR=TRUE | Disable color. |
--github-output | Format console output for GitHub Actions. |
In parallel (-p), -v/-vv timelines can't stream — the streams would interleave, so Ginkgo emits each spec's full timeline after that spec completes. → CI flags in ginkgo:ci.
ginkgo -r --json-report=report.json --output-dir=./.reports
--json-report is native and richest — an array of types.Report, each with SpecReports[] of types.SpecReport (godoc); build tooling against the types package.--junit-report=x.xml, --teamcity-report=x, --gojson-report=x.go.json exist for external CI but lose Ginkgo metadata — use them to feed a system, not to diagnose. (JUnit maps a Label("owner:XYZ") to the Owner attribute.)--output-dir=DIR collects all files in one place; under -r all suites merge into one report file. --keep-separate-reports writes one PACKAGE_report.json per package instead.-vv timeline regardless of console verbosity. Run the suite quiet and mine the file — you don't need -vv on the console to get rich detail in the report.CurrentSpecReport() works in any run-phase closure — use it for in-spec conditional diagnostics:
AfterEach(func() {
if CurrentSpecReport().Failed() {
GinkgoWriter.Println(libraryClient.DebugLogs()) // expensive diagnostics, only on failure
}
})
For custom report files, don't roll your own in AfterEach — use reporting nodes:
ReportAfterEach(func(r SpecReport){...}) / ReportBeforeEach — run for every spec including skipped/pending (unlike AfterEach), after all AfterEaches. A failure here fails the spec. In parallel they run on each process concurrently — never write a shared file from them (you'll get interleaved garbage).ReportBeforeSuite / ReportAfterSuite("name", func(r Report){...}) — top-level, and run only on process #1. ReportAfterSuite receives the Report aggregated across all parallel processes — this is the safe place for custom suite-level report files:ReportAfterSuite("custom report", func(report Report) {
f, _ := os.Create("report.custom")
for _, sr := range report.SpecReports {
fmt.Fprintf(f, "%s | %s\n", sr.FullText(), sr.State)
}
f.Close()
})
Reporting nodes can be made interruptible by also accepting SpecContext → ginkgo:timeouts-and-async.
It("is reported", func() {
AddReportEntry("Publish stats", stats, ReportEntryVisibilityFailureOrVerbose)
})
AddReportEntry(name, value, ...args) attaches arbitrary data to the current spec; it lands in SpecReport.ReportEntries, in all machine-readable reports, and (per visibility) on the console. Visibility enum:
ReportEntryVisibilityAlways (default) — always printed.ReportEntryVisibilityFailureOrVerbose — only on failure or -v (like GinkgoWriter).ReportEntryVisibilityNever — never on console, but still in the JSON report.For failure-only diagnostics, call AddReportEntry from a DeferOnFailure callback (→ ginkgo:writing-specs).
value is JSON-round-tripped into the report (retrieve via entry.GetRawValue() / json.Unmarshal(entry.Value.AsJSON, ...)). A fmt.Stringer/types.ColorableStringer controls console rendering; pass a pointer to capture later mutations. AddReportEntry decorators (Offset, CodeLocation, ReportEntryVisibility) → ginkgo:decorators.
Recap (owned by ginkgo:writing-specs): GinkgoWriter buffers log output and only prints it on failure (or always under -v); By("step") annotates the timeline. Use these for ad-hoc logging; use AddReportEntry for structured data you want in the report file.
ginkgo -r --cover --coverpkg=./... --race --cpuprofile=cpu.out --output-dir=./.profiles
--cover, --coverprofile=NAME (filename only — use --output-dir for a path), --coverpkg=./... to cover beyond the suite's own package, --keep-separate-coverprofiles per-package. --race forces --covermode=atomic.--cpuprofile / --memprofile / --blockprofile / --mutexprofile (Ginkgo keeps the test binary so you can go tool pprof BINARY PROFILE). --output-dir collects and package-namespaces all profile/coverage assets.Focus/FIt/FDescribe exits early with a non-zero code, which stops go test from writing the profile. Subset with filters (--focus=, --label-filter=), not Focus → ginkgo:filtering.jq filters, the panicked-vs-failed trap) → ginkgo:debugging-failuresginkgo:ciLabel, ReportEntryVisibility, Offset) → ginkgo:decoratorsWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
13 skills in this plugin
/ciConfigure Ginkgo for continuous integration — the recommended CLI flag set and the rationale for each flag (-r -p --randomize-all --randomize-suites --fail-on-pending --fail-on-empty --keep-going --cover --race --trace --json-report --timeout --poll-progress-after/-interval), invoking via go run to pin the CLI to go.mod, the exit-code safeguards that catch committed Focus/Pending and empty filters, collecting report and coverage artifacts with --output-dir, CI-friendly output (--github-output/--force-newlines/--no-color), and the fixed per-suite cost --race adds (GORACE=atexit_sleep_ms=0). Use when setting up or hardening a CI pipeline for a Ginkgo suite./debugging-failuresDiagnose a failing Ginkgo suite as an agent — always run with --json-report into a predictable temp/gitignored location, read the terminal verdict line, then use jq to extract structured failure details (name, message, file:line, panic value, captured logs). Covers the panicked-vs-failed trap, panic locations pointing into the Go runtime, parallel output interleaving, reproducing with --seed, and progress reports for hangs. Use when a suite failed and you need to know why. Also invokable as /ginkgo:debugging-failures./decoratorsOne-line reference for every Ginkgo decorator, grouped by what it does, with the node types each can decorate — Serial, Ordered, ContinueOnFailure, OncePerOrdered, Label, Focus, Pending, FlakeAttempts, MustPassRepeatedly, NodeTimeout, SpecTimeout, GracePeriod, PollProgressAfter/Interval, SuppressProgressReporting, SpecPriority, SemVerConstraint, AroundNode, Offset/CodeLocation, EntryDescription. Use to look up a decorator's exact name, semantics, and where it's legal.npx claudepluginhub onsi/ginkgo --plugin ginkgoOther plugins' skills for the same job