https://github.com/chenhunghan/ralph-hook-lint
Zero dependencies lighting fast universal lint hook for you agent loop
https://github.com/chenhunghan/ralph-hook-lint
agent claude-code cli hooks plugin rust
Last synced: 2 days ago
JSON representation
Zero dependencies lighting fast universal lint hook for you agent loop
- Host: GitHub
- URL: https://github.com/chenhunghan/ralph-hook-lint
- Owner: chenhunghan
- License: mit
- Created: 2026-01-29T16:57:40.000Z (20 days ago)
- Default Branch: main
- Last Pushed: 2026-01-31T19:57:37.000Z (18 days ago)
- Last Synced: 2026-01-31T22:12:08.671Z (18 days ago)
- Topics: agent, claude-code, cli, hooks, plugin, rust
- Language: Rust
- Homepage:
- Size: 70.3 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# ralph-hook-lint
Zero dependencies lighting fast universal lint hook for your ~~Ralph Wiggum~~ agent loop.
See also format hook: [ralph-hook-fmt](https://github.com/chenhunghan/ralph-hook-fmt)
## What it does
Lints after every `Write`/`Edit` operation in Claude Code. If lint errors are found, the agent is prompted to fix them.
## Supported Languages
- **JavaScript/TypeScript**: `oxlint` > `biome` > `eslint` > `npm run lint` (in order of preference)
- **Rust**: `clippy`
- **Python**: `ruff` > `mypy` > `pylint` > `flake8` (in order of preference)
- **Java**: Maven (`pmd:check` > `spotbugs:check`) or Gradle (`pmdMain` > `spotbugsMain`)
- **Go**: `golangci-lint` > `staticcheck` > `go vet` (in order of preference)
## Installation
```bash
claude plugin marketplace add https://github.com/chenhunghan/ralph-hook-lint.git
claude plugin install ralph-hook-lint
```
## Update Plugin
```bash
claude plugin marketplace update ralph-hook-lint
claude plugin update ralph-hook-lint@ralph-hook-lint
```
## Lenient Mode
Enabled by default. When the agent edits files in multiple steps, intermediate states may have unused variables/imports. The `--lenient` flag suppresses these rules so the agent can work incrementally without being blocked mid-edit.
To disable lenient mode, remove `--lenient` from the command in `hooks.json`:
1. Open `~/.claude/plugins/ralph-hook-lint/hooks/hooks.json`
2. Change the command from:
```json
"command": "${CLAUDE_PLUGIN_ROOT}/bin/ralph-hook-lint --lenient"
```
to:
```json
"command": "${CLAUDE_PLUGIN_ROOT}/bin/ralph-hook-lint"
```
## Debug Mode
By default, the hook only outputs `systemMessage` when blocking (lint errors found). To see all diagnostic messages, add `--debug` to the command in `hooks.json`:
```json
"command": "${CLAUDE_PLUGIN_ROOT}/bin/ralph-hook-lint --lenient --debug"
```