一键导入
go-precommit
Run full pre-commit workflow for Go code. Use when preparing to commit Go changes, before creating pull requests, or ensuring code quality.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Run full pre-commit workflow for Go code. Use when preparing to commit Go changes, before creating pull requests, or ensuring code quality.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Systematic analysis and reasoning workflows. Use when performing audits, investigation, requirements analysis, risk analysis, scenario/edge-case enumeration, or design analysis that demands evidence-based, comprehensive coverage.
Code quality and safety standards. Activates when editing or reviewing code. Use for quality priorities, safety checks, and code correctness verification.
Use when performing coding tasks (implement features, fix bugs, refactor code). Orchestrates language detection, mode switching (normal/autopilot/full-auto), quality enforcement, and verification.
Break a problem into atomic, testable subproblems. Use when facing complex tasks, unclear requirements, or planning implementation strategy.
Start structured feature implementation workflow. Use when implementing new features, adding functionality, or building complete user-facing capabilities.
Use when starting work that needs isolated branches or parallel feature development using git worktrees.
| name | go-precommit |
| description | Run full pre-commit workflow for Go code. Use when preparing to commit Go changes, before creating pull requests, or ensuring code quality. |
| allowed-tools | ["shell"] |
| metadata | {"short-description":"Run Go pre-commit checks"} |
Read these references:
~/.config/agent/domain/coding/go/tooling.md - Go command details~/.config/agent/domain/coding/quality.md - Quality requirements (all steps blocking)Execute the full pre-commit workflow in order. All steps are blocking - stop on first failure.
golangci-lint run --new-false --fix ./...
Wait for completion. If errors occur, investigate and fix before proceeding.
go test -race -count 1 -coverprofile=cover.out ./...
All tests must pass. If failures occur:
golangci-lint run --new-false ./...
Ensures all lint issues are resolved. Any errors indicate problems introduced during fixes.
Per AGENT.md Problem-Solving Framework:
All three steps must pass with zero errors before code is ready for commit.