Agent skill
staticcheck
Fix staticcheck issues
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/development/staticcheck
SKILL.md
staticcheck
Advanced static analyzer with comprehensive checks.
Install
go install honnef.co/go/tools/cmd/staticcheck@latest
Usage
staticcheck ./...
staticcheck -checks=all ./...
Common Issues
SA1019: Deprecated Function
// Bad
ioutil.ReadFile("file.txt")
// Good
os.ReadFile("file.txt")
SA4006: Unused Value
// Bad
value := compute()
value = other()
// Good
_ = compute()
value := other()
SA9003: Empty Branch
// Bad
if err != nil {
// TODO
}
// Good - remove or implement
if err != nil {
return err
}
S1002: Simplify Condition
// Bad
if x == true {
return true
}
// Good
return x
ST1003: Naming Convention
// Bad
func GetHTTPSUrl() string
// Good
func GetHTTPSURL() string
SA1006: Printf on os.Stderr
// Bad
fmt.Printf("error: %v\n", err)
// Good
fmt.Fprintf(os.Stderr, "error: %v\n", err)
SA4010: Result Not Used
// Bad
append(slice, item)
// Good
slice = append(slice, item)
Configuration
# .staticcheck.conf
checks = ["all", "-ST1000"]
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?