hunter-party-go/slop-hunter-go/SKILL.md
Audit Go code for AI-generated noise — redundant comments, verbose documentation, style drift from project conventions and gofmt, trivially dead code, and unnecessary error wrapping. Surface-level hygiene pass; defaults to branch diff but supports any scope. Use when: reviewing AI-assisted Go code before merge, cleaning up generated code, enforcing project style on new contributions, or reducing review noise.
npx skillsauth add skyosev/agent-skills slop-hunter-goInstall 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.
Audit code for AI-generated noise — comments that narrate the obvious, documentation that restates code, style
choices that break project conventions, and dead code that slipped in. The goal: the code reads like a human wrote it,
following existing project idioms and gofmt standards.
Default to the diff. When scoped to a branch diff, only flag patterns introduced in this branch — pre-existing issues are out of scope. When scoped to a path or codebase, flag all matching patterns in the resolved surface.
Comments explain why, not what. A comment that restates the code ("increment the counter") is noise. A comment that explains intent, constraints, or non-obvious decisions ("rate limit: 3rd-party API allows 100 req/min") is valuable.
gofmt is the law. Go has a canonical formatter. Code that doesn't pass gofmt is wrong, period. Beyond
formatting, project-specific conventions (naming, error handling, import grouping) must be followed.
Less is more. AI tends to over-document, over-explain, and over-hedge. Strip to the minimum that preserves clarity.
Go idioms are the standard. Effective Go, the Go Code Review Comments wiki, and the project's existing patterns define the style. AI-generated code often brings patterns from other languages.
Comments that narrate obvious behavior, restate function/variable names, or explain standard language constructs.
Signals:
// Initialize the slice above var items []Item// Return the result above return result// Check for errors above if err != nil// Loop through items above for _, item := range items// ---- Helper Functions ----) in small filesAction: Delete. If the code needs explanation, it should be rewritten for clarity first.
Over-documentation that adds noise without insight — typically AI-generated godoc on every function including trivial unexported helpers.
Signals:
// param: name - the name style parameter descriptions that add nothingAction: Keep godoc on exported symbols (Go convention). Strip godoc on unexported functions unless the behavior is non-obvious. Godoc should describe what and why, not how.
Patterns that diverge from the project's established conventions or Go idioms.
Signals:
gofmt formatted codeuserName instead of username, get_user instead of getUser)error instead of err, e instead of errCreate* instead of New* (or vice versa if project uses Create)errors.Wrap when project uses fmt.Errorf)GetX() when Go convention is just X(), toString instead of String()Action: Conform to existing project conventions. Cite the existing pattern as evidence.
Unused imports, unused variables, commented-out code blocks, and placeholder TODOs.
Signals:
//nolint to suppress)// old implementation)// TODO: implement or // FIXME without actionable contextnolint directives that suppress valid lint findings without justificationAction: Delete unused imports/variables (the compiler catches most, but check for suppressed lints). Delete commented-out code. Convert vague TODOs to actionable issues or delete.
Hedging language, apologetic comments, and over-explanation typical of AI-generated code.
Signals:
// This is a workaround for... without specifying the issue// Note: this might need to be updated if... (speculative)// For safety, we also check... (unnecessary hedging)// New, improved version.. (references old code that doesn't exist)log.Println("entering function X"))fmt.Errorf("failed to do X: %w", fmt.Errorf("error doing X: %w", err))nil checks already guaranteed by preceding logicAction: Delete hedging and narration. Keep only comments that document concrete constraints or known issues with references.
Error handling that adds noise without context.
Signals:
return fmt.Errorf("error: %w", err) — the word "error" adds nothingreturn fmt.Errorf("failed to X: failed to Y: %w", err) — double-wrapping with redundant context"failed to process: failed to validate: failed to parse: invalid syntax"func Save() { return fmt.Errorf("Save: %w", err) }Action: Wrap errors once at the boundary where context is meaningful. Use the package/operation name, not redundant
verbiage. Let errors.Is/errors.As handle the chain.
main/master)BASE=$(git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null | sed 's@^refs/remotes/origin/@@' || echo main)
SCOPE=$(git diff --name-only $(git merge-base HEAD $BASE)...HEAD)
Constrain all subsequent scans to the resolved surface.In diff mode, focus on added lines to isolate new noise from pre-existing patterns:
# Added comments (single-line)
git diff $(git merge-base HEAD $BASE)...HEAD | rg '^\+\s*//'
# Added godoc blocks (multi-line doc comments)
git diff $(git merge-base HEAD $BASE)...HEAD | rg '^\+\s*/\*\*|^\+\s*//\s*[A-Z]\w+\s'
In path/codebase mode, scan the resolved surface directly:
EXCLUDE='--glob !**/vendor/** --glob !**/testdata/**'
# Comments (then classify manually)
rg '^\s*//' --type go $EXCLUDE
# Godoc on unexported functions
rg -B1 '^func\s+[a-z]' --type go $EXCLUDE --glob '!**/*_test.go'
In all modes:
# TODO/FIXME markers
rg 'TODO|FIXME|HACK|XXX' --type go
# Log statements that narrate flow
rg 'log\.\w+\("(entering|exiting|starting|finished|begin|end)' --type go
# Redundant error wrapping
rg 'fmt\.Errorf\("(error|failed|err)' --type go
# nolint without justification
rg 'nolint' --type go
# gofmt check
gofmt -l .
For each finding, determine:
Save as YYYY-MM-DD-slop-hunter-audit-{$LLM-name}.md in the project's docs folder (or project root if no docs folder exists).
# Slop Hunter Audit — {date}
## Scope
- Surface: {diff / path / codebase}
- Files: {count or list}
- Exclusions: {list}
## Findings
### Redundant Comments
| # | Location | Comment | Action |
| - | -------- | ------- | ------ |
| 1 | file:line | `// Initialize the slice` | Delete |
### Verbose Godoc
| # | Location | Pattern | Action |
| - | -------- | ------- | ------ |
| 1 | file:line | Godoc on unexported helper with obvious behavior | Strip |
### Style Drift
| # | Location | Pattern | Project Convention | Action |
| - | -------- | ------- | ------------------ | ------ |
| 1 | file:line | `userName` variable | Project uses `username` | Rename |
| 2 | file:line | `GetUser()` method | Go convention: `User()` | Rename |
### Dead Code
| # | Location | Code | Action |
| - | -------- | ---- | ------ |
| 1 | file:line | Commented-out function | Delete |
### AI Verbal Patterns
| # | Location | Pattern | Action |
| - | -------- | ------- | ------ |
| 1 | file:line | `// This is a workaround for...` (no issue link) | Delete or add reference |
### Unnecessary Error Wrapping
| # | Location | Pattern | Action |
| - | -------- | ------- | ------ |
| 1 | file:line | `fmt.Errorf("error: %w", err)` | Simplify to meaningful context |
## Recommendations (Priority Order)
1. **Must-fix**: {style drift that breaks project conventions, gofmt violations}
2. **Should-fix**: {redundant comments, dead code, unnecessary error wrapping}
3. **Consider**: {verbose godoc, AI verbal patterns}
file/path.go:line with the exact code.gofmt > project conventions > Effective Go. gofmt formatting is mandatory — it is not a style
choice. Project-specific conventions (naming, error handling, import grouping) take precedence next. Fall back to
standard Go idioms (Effective Go, Code Review Comments wiki) only when the project has no established convention.
When flagging drift, always cite the existing project pattern or the Go convention being applied.development
Transforms vague feature ideas into precise, codebase-grounded technical requirements. Use when requirements are ambiguous/incomplete, the user struggles to describe behavior, terminology is unclear, or multiple concepts are mixed. Output is a requirements spec—NOT an implementation plan.
tools
Audit TypeScript type definitions for design debt — duplicated shapes, missing derivations, over-engineered generics, under-constrained type parameters, reinvented utility types, and disorganized type architecture. Type structure and maintainability, not type enforcement. Use when: reviewing type definitions for maintainability, reducing type duplication, simplifying over-engineered type-level logic, or reorganizing type architecture after growth.
development
Audit TypeScript test code for quality gaps — missing coverage on critical paths, brittle tests coupled to implementation, over-mocking, assertion-free tests, missing edge cases, and duplicated test setup. Focuses on test effectiveness, not production code structure. Use when: reviewing TypeScript test suites for reliability, reducing false-positive test failures, improving coverage of critical business logic, or cleaning up test debt.
tools
Audit TypeScript class and interface design for SOLID violations — god classes, rigid extension points, broken substitutability, fat interfaces, and concrete dependency chains. Focuses on responsibility assignment and abstraction fitness. Use when: reviewing class hierarchies, preparing for extension with new variants, reducing coupling between services, or improving testability of class-heavy code.