skills/go-troubleshooting/SKILL.md
Highly actionable step-by-step checklist for diagnosing and resolving Go compilation errors, type errors, build/test failures, and runtime issues. Activate on any build or execution failure.
npx skillsauth add danicat/godoctor go-troubleshootingInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill outlines a rigorous, compiler-backed troubleshooting protocol for isolating, understanding, and correcting Go build and runtime errors.
Follow this systematic sequence to resolve issues, utilizing GoDoctor's compiler-gated tools to ensure precision:
Examine the detailed error output from smart_build or smart_edit.
main.go:34:12).Do not guess the shape of the types or functions causing the failure. Use GoDoctor's structural search and reference tools:
smart_read): Read the offending lines. The output will automatically include a <types> block outlining full structures, methods, and field declarations of any custom types referenced in those lines.describe_symbol): Query the exact symbol coordinates (line and column) where the error is reported. This will instantly show:
If the compiler reports undeclared name, undefined, or no field or method:
smart_edit fails, it automatically runs Levenshtein distance calculations against all symbols in the target package (via gopls symbols). Review the 💡 Suggestions: section in the error report.Name vs name) to be exported and visible outside their declaring package.If compilation succeeds but tests are failing or runtime behaviors are unexpected:
test_query): Run SQL queries on the test query SQLite database (testquery.db). This allows you to inspect:
SELECT * FROM all_coverage WHERE count = 0).mutation_test): To identify weak assertions or untested edge cases, execute mutation tests. Review surviving mutants to see where the test suite fails to detect behavioral changes.smart_edit): Apply edits to all target files in a single transaction. Do not use direct, unverified file-writing tools.gopls check ./.... If it fails, the workspace is automatically kept in its original healthy state with zero on-disk corruption.development
Guidelines and templates for structuring software development goals and ideas into actionable, bounded tasks using Context/Todo/AC, enforced by the DoR gate. Activate when scoping user requests, decomposing RFCs into tasks, or creating a new task file.
development
Guidelines and templates for authoring Request for Comments (RFCs). Activate when proposing significant features/refactorings, exploring design alternatives under high ambiguity, or gathering technical consensus.
development
Pre-release checklist and quality gate to verify codebase health, docs, and security before interacting with Git. Activate when preparing to tag/publish a release, concluding milestones, or running final verification on a pull request.
tools
Guidelines and procedures for querying, verifying, and upgrading Go module dependencies and toolchains. Activate when adding or upgrading Go packages, auditing go.mod, addressing dependency vulnerabilities, or verifying toolchain versions.