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:
[no-secrets] Secret assignment detected: api_key=...
-> Use environment variables instead of hard-coded secrets.
The agent can replace the literal with an environment-variable lookup:
import os
api_key = os.environ["SERVICE_API_KEY"]
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.
uv tool install agentlint
cd your-project
agentlint setup claude
Use your agent's name for the last command:
| Agent | Setup | Activate |
|---|---|---|
| Claude Code | agentlint setup claude |
Restart Claude Code |
| Codex | agentlint setup codex |
Restart, then review and trust the hooks in /hooks |
| Cursor | agentlint setup cursor |
Reload the Cursor window |
| Gemini CLI | agentlint setup gemini |
Start a new session |
| Continue · Kimi · Grok | agentlint setup continue, kimi, or grok |
Follow the linked agent guide |
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:
agentlint status
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 standard severity and the relevant pre-tool hook:
| Outcome | Examples | Requirement |
|---|---|---|
| Block | Detected secret writes, .env writes, plain --force/-f pushes to main/master, CI pipeline edits, package publishing |
Core rules, subject to configuration and each rule's scope |
| Warn | Many destructive commands, direct pushes to main, protected-branch --force-with-lease, test weakening, removed error handling |
Core rules; some catastrophic destructive patterns block instead |
| Check your stack | SQL interpolation, unsafe Python shell calls, frontend accessibility, React loading states | Detected language/framework packs |
| Opt in | Shell file-write restrictions and network exfiltration checks | security pack |
| Opt in, experimental | Production targets, cloud deletions, infrastructure mutations | autopilot pack |
Some rules run after a tool call or at session end and cannot prevent an action that has already happened. Severity settings, approvals, exemptions, and the circuit breaker affect decisions. The rule reference documents the exact behavior.
Integration matters. Native hooks inspect the tools their host reports. The OpenAI Agents SDK adapter must be attached to supported tools. The MCP server provides on-demand checks and is advisory. See coverage and limitations before relying on an integration.
AgentLint includes 77 built-in rules in 8 packs:
| Pack | Rules | Examples |
|---|---|---|
| universal | 24 | secrets, .env writes, force-push, destructive commands, CI/CD edits, package publishing, test weakening |
| quality | 7 | oversized diffs, removed error handling, dead imports, commit message format |
| python | 6 | SQL built with f-strings, unsafe shell calls, bare except, risky migrations |
| frontend | 8 | missing alt text and labels, focus styles, touch targets |
| react | 3 | unhandled loading/error states, empty states |
| seo | 4 | page metadata, Open Graph, semantic HTML |
| security | 7 | shell file-write restrictions and network exfiltration patterns (opt-in) |
| autopilot | 18 | production targets, cloud deletions, IAM/firewall changes, infrastructure previews (opt-in, experimental) |
The rule catalogue lists each rule's event, severity, and configuration.
Make it fit your project
# agentlint.yml
packs: [python, security] # explicit selection; core packs are also loaded
rules:
max-file-size:
limit: 400
no-todo-left:
enabled: false
An explicit packs list replaces stack detection. The universal and quality packs are included unless deliberately excluded. Start with detected defaults and add stricter packs when you need them.
| You want to… | Start here |
|---|---|
| Protect a shared branch while keeping normal Git work moving | Protect main |
| Fix a legitimate action that keeps getting flagged | Handle a false positive |
| Run Ruff, ESLint, or a formatter after agent edits | Connect your linters |
| Apply a shared policy across repositories | Share required rules |
| Enforce a convention specific to your codebase | Write a custom rule |
Use the same checks beyond the agent
agentlint check-patch change.patch # preview a Codex patch without applying it
agentlint ci --diff origin/main...HEAD # check the pull request's file changes
agentlint evidence # inspect verification receipts
agentlint uninstall claude # remove Claude Code's native hooks
CI checks file changes; it does not reconstruct or audit every shell command the agent ran. CI setup · CLI reference
Local by default
Hook checks run locally. You do not need an account or a network connection for the offline rules. Optional AgentChute adds threat feeds, team policy, and visibility; feed-backed rules need that data. Cloud event delivery is opt-in and sends redacted summaries rather than file contents or full commands.
AgentLint uses rules and heuristics. It can miss risky behavior, flag legitimate work, and be bypassed by a process with broad access. Keep code review, tests, CI, and least-privilege credentials in place. Security model · Report a vulnerability
Contribute
Start with CONTRIBUTING.md. A regression case for a false positive or a missed detection is a useful first contribution. AgentLint includes 77 built-in rules in 8 packs; the catalogue is generated in part from the code and checked in CI.
Changelog · Issues · Security policy · MIT license
Star history
Metadata
Release files for agentlint 2.11.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| agentlint-2.11.0.tar.gz | 6.3 MB | With provenance | Details for agentlint-2.11.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| agentlint-2.11.0-py3-none-any.whl | Python 3 | none | any | Details for agentlint-2.11.0-py3-none-any.whl |
Total release size: 6.7 MB
Release files / agentlint-2.11.0.tar.gz
| Download URL | agentlint-2.11.0.tar.gz |
|---|---|
| Size | 6.3 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
15fba5bc967b3588ef30cb441c3455a10ae397352f29f8a504e672206882b72d
|
|
BLAKE2b-256 checksum How to use checksums |
6674e4688a10b21cefe8ff6335a78c73c7b281ce1e4f7001ad7f6abac4319c43
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.
Transparency logRelease files / agentlint-2.11.0-py3-none-any.whl
| Download URL | agentlint-2.11.0-py3-none-any.whl |
|---|---|
| Size | 311.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
841dd4002fe648aae173b7956537ec9bd88a0261a7a6b7c153cdf4d6742a9133
|
|
BLAKE2b-256 checksum How to use checksums |
4f9ef02b42bf32f7e46bc8663af3df18479b91f1b16c241a499566a6d6503527
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.
Transparency logSecurity for agentlint 2.11.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for agentlint-2.11.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.