mirror of
https://github.com/csmith/gofish
synced 2025-12-06 04:28:19 +01:00
No description
| .github | ||
| checkers | ||
| cmd/gofish | ||
| .gitignore | ||
| go.mod | ||
| LICENCE | ||
| README.md | ||
| staticcheck.conf | ||
gofish
Tool to automatically run various checks, for use when an LLM agent such as Claude Code thinks it's finished working.
Available Checkers
Go projects
- gofmt
- go vet
- go test
- staticcheck (only if there's a custom config file)
JavaScript/TypeScript projects
- svelte-check (if listed as a dependency)
- prettier (if listed as a dependency)
- test (if "test" script is defined in package.json)
Installation
Install from source
go install github.com/csmith/gofish/cmd/gofish@latest
Build locally
git clone https://github.com/csmith/gofish.git
cd gofish
go build ./cmd/gofish
Usage
Command Line
Run gofish in any directory to scan its subdirectories. It can handle 'nested'
projects (e.g. having a project.json in a frontend directory).
Claude Code Integration
gofish is designed to be run as a Stop hook in Claude Code.
Setup Hook
-
Install gofish globally:
go install github.com/csmith/gofish/cmd/gofish@latest -
Configure Claude Code settings: Add the following to your Claude Code
settings.json:{ "hooks": { "Stop": [ { "matcher": "", "hooks": [ { "type": "command", "command": "gofish" } ] } ] } }Alternatively, use the
/hooksslash command to manually set it up.
The hook will automatically run gofish whenever Claude Code stops working on your code, ensuring it doesn't leave anything in a mess.
For more information on Claude Code hooks, see the official documentation.
Exit Codes
0: Success, no issues found1: Error running checkers2: Code quality issues detected