At the start, state: "I am using the check skill to run pre-commit checks."
Execution steps
Step 1: Code formatting check
gofmt -s -l .
If there are unformatted files, list the file list and prompt to run gofmt -s -w . to fix.
Step 2: Static checks
make lint
If it fails, list the issues reported by vet/staticcheck and provide fix suggestions.
Step 3: Unit tests
make test
If any step fails, stop and report the error, and provide fix suggestions.
Output format
When all pass:
✓ gofmt — 通过
✓ lint — 通过
✓ test — 通过
When there are failures, list the specific errors and fix suggestions.
Acceptance criteria (unified)
- Input prerequisites: parameters and context are parseable; default parameters are executed according to the skill defaults and noted in the output.
- Output requirements: provide results according to the output template agreed by the skill, and include key evidence (commands, paths, links, or log summaries).
- Pass determination: the main process steps have been completed with no blockers; if there are unfinished items, the scope of impact and next steps must be clearly marked.
- Default strategy (non-interactive): when confirmation is needed but the user does not respond in time, continue with the "recommended default/minimum risk option"; when an interactive choice is needed, prioritize the recommended option.
- Blocker escalation: when encountering missing permissions, credentials, or external dependencies, immediately stop that step and output "blocker + attempted + information needed from the user".
System specification (AGENTS.md)
When executing this skill, also comply with AGENTS.md system specification; if there is a conflict with this skill, this skill takes precedence.