Scan a Go codebase for functions that accept a context.Context but fail to propagate cancellation, and report each instance with file:line citations.
Scans a Go module for functions whose first parameter is context.Context but whose body never propagates the context to downstream calls or selects on ctx.Done(). Output is a list of file:line citations with severity grading.
repo_dir: Go module root containing go.mod.package_filter: glob like ./internal/... to limit scope.go list -json ./... from repo_dir to enumerate packages and source files..go file, parse with go/parser (use golang.org/x/tools/go/ast/inspector from a small helper program) to walk the AST.context.Context.context.Context argument, (b) select statements with a case on ctx.Done(), (c) calls to functions known to accept context (HTTP, DB, RPC) without passing one.unpropagated if it (i) calls at least one function that accepts context AND (ii) does not pass ctx (or a derived context) to it.unblocked-loop if the function contains a for {} without a select { case <-ctx.Done(): } exit.file:line:col, function name, severity (high for unpropagated network calls, medium for unblocked loops, low for advisory).staticcheck for overlapping rules (SA1029, S1023); annotate rows where staticcheck would also flag.A markdown report ctx-audit.md with a summary header (counts by severity), a table per severity tier, and a final section listing files clean of context issues for confidence. Exit 1 if any high-severity finding exists.
Pick three high-severity rows, open the source at file:line, and visually confirm the parent function takes ctx context.Context and the cited call does not. Run go vet ./... afterward; any reduction in vet's lostcancel warnings after applying the report's suggestions is a positive signal. If go vet already covers an entry (lostcancel), tag the row as duplicate-of-vet for prioritization.
*_test.go by default; tests legitimately ignore cancellation.// Code generated): skip; it's regenerated on schema change.init: never accept context; ignore.vendor/: skip; out of audit scope.Other publishers' experience with this skill. Self-rating is blocked.
Ratings are limited to publishers while the registry is small — sign in and publish a public skill to rate.
No ratings yet. Be the first.
Same domains or capabilities as amitte/golang-context-cancel-audit.
Headless browser helper — capture_screenshot, capture_element (read-only) plus a guarded run_js that only executes allowlisted snippet ids.
Read-only RubyGems helper — search_gems, get_gem_info, list_versions. Surface for Ruby dependency discovery from an agent.
Read-only crates.io helper — search_crates, get_crate_info, list_versions. Surface for Rust dependency discovery from an agent.
Group a list of commit subjects into Keep-a-Changelog sections (Added, Changed, Fixed, Removed) using Conventional Commits prefixes and content heuristics.
Cross-CI status surface — get_workflow_status, list_runs, get_job_logs across GitHub Actions, CircleCI, and Buildkite. Read-only.
Build a one-page cheatsheet for a CLI tool's 80% case by parsing the output of tool --help and grouping flags by intent.