Claude Code hook

agentlint

Local guardrail hooks that check proposed file edits and shell commands and block risky patterns.

215 stars 2 forksHooks Source

Install

Install
uv tool install agentlint
From source
git clone https://github.com/mauhpr/agentlint.git

From the README

AgentLint

Catch risky actions while your coding agent works.

AgentLint checks proposed file changes and shell commands locally. It blocks detected secret writes and plain force-pushes to main or master, warns about risky operations, and gives your agent feedback it can act on.

Quickstart · Documentation · Integration coverage · Rules

*Illustration with a supported pre-tool hook and standard policy. AgentLint evaluates the revised proposal again; it does not rewrite your code itself.*

See the difference

A coding agent proposes putting a credential in config.py. The no-secrets rule denies the write and returns a reason:

The agent can replace the literal with an environment-variable lookup:

The credential finding is resolved. The revised action is checked against the active policy, and any other findings still apply.

https://github.com/user-attachments/assets/ae9a6b72-8bf7-4b73-abe3-7f0f3b483d3b

Watch the 53-second product overview. The demonstration evaluates synthetic proposed actions as data; it does not execute dangerous commands.

Get started

Requires Python 3.11+ and pipx or uv.

Use your agent's name for the last command:

Prefer pipx? Use pipx install agentlint instead. Setup adds hooks to your agent's settings and creates agentlint.yml if it does not exist, using packs detected from the project.

Make one tool call in your agent, then run:

Look for a recent observed hook call from this project. A configuration file alone does not prove the hooks are running. If nothing is observed, run agentlint doctor and follow troubleshooting.

The five-minute quickstart completes the first check and correction. Claude Code users can alternatively install the marketplace plugin; use the plugin or native setup to avoid duplicate hooks.

What blocks, what warns

With…
Read the full README on GitHub

How hooks work

  • Hooks are shell commands Claude Code runs at fixed points: before or after a tool call, when you submit a prompt, when Claude stops, on notifications and at session start.
  • They are set in the hooks section of ~/.claude/settings.json (or .claude/settings.json for a project), or come bundled in a plugin.
  • A hook can block a tool call, add context, or run a formatter or test. Read the scripts before you install them: they run on your machine with your permissions.
Claude Code docs

Details

Type
Hooks
Language
Python
License
MIT
Last updated
2 November 2026
Topics
agentlinterai-agentsai-safetyclaude-codeclicode-qualitycodexcursordeveloper-toolsgemini-clgemini-cliguardrails

FAQ

What is agentlint?

Local guardrail hooks that check proposed file edits and shell commands and block risky patterns. It is a hook for Claude Code, from mauhpr/agentlint on GitHub.

How do I install agentlint?

Run uv tool install agentlint, then follow the setup in the README.

Is agentlint popular?

mauhpr/agentlint has 215 GitHub stars and 2 forks. It was last updated on 2 November 2026.

More hooks

Browse the most popular Claude Code mods, all hooks, or the skills and MCP server directories.