Agent skill
backend-verification
Automatically runs required Go checks after any backend code changes. Ensures go vet, gofmt, and go test pass before commits. Use whenever modifying files in the backend/ directory.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/data/backend-verification
SKILL.md
Backend Verification
This skill ensures all Go code changes pass required CI checks before committing.
Required Commands
After ANY changes to Go files in backend/, run these commands in order:
1. Format Code
cd /home/user/ishkul/backend && gofmt -w .
Automatically formats all Go files to standard style.
2. Run Static Analysis
cd /home/user/ishkul/backend && go vet ./...
Catches common errors like:
- Printf format string issues
- Unreachable code
- Suspicious constructs
3. Run Tests
cd /home/user/ishkul/backend && go test ./...
Ensures all unit tests pass.
Quick One-Liner
Run all checks at once:
cd /home/user/ishkul/backend && gofmt -w . && go vet ./... && go test ./...
When to Use
- After creating new handlers in
internal/handlers/ - After modifying existing Go code
- Before committing any backend changes
- After adding new packages or dependencies
CI Integration
These checks run automatically in the CI pipeline. Running them locally first:
- Catches issues early
- Speeds up the PR review process
- Prevents failed deployments
Common Issues
go vet Failures
- Check for unused variables
- Verify printf format strings match arguments
- Look for unreachable code after return statements
Test Failures
- Check test file naming:
*_test.go - Verify test function naming:
Test* - Run specific test:
go test -run TestFunctionName ./...
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?