Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

  1. Install gofish globally:

    go install github.com/csmith/gofish/cmd/gofish@latest
  2. Configure Claude Code settings: Add the following to your Claude Code settings.json:

    {
      "hooks": {
        "Stop": [
          {
            "matcher": "",
            "hooks": [
              {
                "type": "command",
                "command": "gofish"
              }
            ]
          }
        ]
      }
    }

    Alternatively, use the /hooks slash 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 found
  • 1: Error running checkers
  • 2: Code quality issues detected

About

Tool to report problems in a project, for use with LLM coding agent hooks

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages