AgentLint CLI

A local guard for coding agents: blocks secret writes and force pushes to main, warns about risky commands.

  • 126 ★ on the repository
  • Last commit
  • MIT
CLI

Extended access

Why this level

  • Setup changes the agent's hook settings and can stop a legitimate action on a false positive.
All reasons and checks

mauhpr/agentlint

Install

In your terminal, with SkillFoxx CLI

npx skillfoxx add cli/agentlint

Detects the agents on your machine, shows the access level and pins the version.

Other ways to install

Access and checks

How we review

Extended accessThe tool runs code or makes network calls and only reads external data.

  • Setup changes the agent's hook settings and can stop a legitimate action on a false positive.

This is third-party code. Review the repository files before installing.

What it does

AgentLint checks the file changes and shell commands an agent proposes before they run. Secret writes, `.env` edits and plain force pushes to `main` or `master` are blocked, and destructive commands raise a warning. The agent receives the reason and a hint for fixing the action, then the revision is checked again. The `agentlint setup claude` command adds hooks to the agent's settings and creates `agentlint.yml` with rule packs matched to the project stack. There are 77 built-in rules in 8 packs. It works with Claude Code, Codex, Cursor, Gemini CLI, Continue, Kimi and Grok.

Who it is for. Teams and solo developers who let agents into working repositories and want to stop key leaks and accidental destructive actions.

Good fit when

  • An agent is about to write an API key straight into code.
  • `main` needs protection from force pushes while an agent works with Git.
  • The same rules must apply in Claude Code, Codex and Cursor.
  • A pull request is checked with the same rules as agent work through `agentlint ci`.

Not a fit when

  • You need a security guarantee: the rules are heuristic and can miss a risky action.
  • The agent runs without hooks and the MCP mode is only advisory.
  • You cannot install Python 3.11 and a package manager such as uv or pipx.

Example request

Put the service key into config.py and push to main.

Limitations

Python 3.11 and uv or pipx are required. The rules are heuristic: AgentLint can miss risky work, stop legitimate work by mistake and be bypassed by a process with broad access, so review, tests and CI stay. Some rules fire after a tool call or at session end and cannot undo the action. The `autopilot` pack for production and cloud is marked experimental. After installing, check `agentlint status`: a config file does not prove the hooks run.

How to disable. Run `agentlint uninstall claude` (or your agent's name) to remove the hooks. The `agentlint.yml` file and the package itself are removed separately.

FAQ

What is blocked and what only warns?

Blocked are secret writes, `.env`, plain `--force` to `main` and `master`, CI edits and package publishing. Many destructive commands and direct pushes to `main` warn.

How do I confirm the hooks work?

Make one tool call in the agent and run `agentlint status`. It should show a recent observed call from this project; otherwise run `agentlint doctor`.

What about a false positive?

Tune the rule in `agentlint.yml`, for example `max-file-size` with another `limit`, or turn it off with `enabled: false`. A separate guide covers false positives.

Does it need a network or account?

No, offline rules run locally. Cloud event delivery (AgentChute) is optional and sends summaries without file contents.

Is there a Claude Code plugin?

Yes, `agentlint-plugin` in the marketplace. Use either the plugin or `agentlint setup` so hooks are not duplicated.

Discussion

No questions or reviews yet.

CLI tools

AgentShield audits the .claude folder for plaintext keys, broad permissions, dangerous hooks and risky MCP servers and grades the setup from A to F

CLIExtended access1.4KRepository stars

A local security gateway for Claude Code and Codex: checks tool calls against a policy, catches secrets and keeps an audit trail

CLIBroad access155Repository stars

A CLI with policies that intercepts dangerous AI agent commands like rm -rf, force push or reading .env before they run

CLIExtended access8.2KRepository stars

An authorized bug-bounty suite: 50 subagents, 26 commands and 2 bug-bounty-platform MCP servers for Claude Code, Codex and five more agents

PluginBroad access1.1KRepository stars

A local dashboard for Claude Code, Codex CLI and OpenCode: what the agent loads, its token cost and an MCP server security scan

CLIBroad access387Repository stars

The safehouse command runs Claude Code, Codex and other agents in a macOS sandbox: files are closed by default and you open folders with flags

CLIExtended access2.1KRepository stars

Comparison with similar tools

Cards that share the main search query, and how they differ.

ToolOfficialRepository starsMain difference
AgentLint (this card)no126
TDD Guardno2,373a hook plugin for the test-first rule only; AgentLint covers secrets, Git, CI and the project stack
CC Safety Netno1,932blocks destructive Git and filesystem commands; AgentLint adds quality rules and custom policies

README in short

Rules run locally in the agent's hooks, and a reason is returned to the agent so it can fix the action.

README badge

Report a problem

Foxx AIAgentLint
Foxx AI

I am Foxx AI and I have already vetted this tool. Ask about install, setup or anything else, and I will keep it simple.