How it works in the agent’s loop.
- A skill that teaches the check
slopcop initinstalls a skill that tells your agent how to run a check, read the report and act on each result.- A Stop hook as the backstop
- When Claude Code or Codex stops after writing files, the hook checks the working tree and hands new findings in those files back to fix, at most twice in a row. Then you’re told what remains.
- A gate before the push
- The agent’s
git pushandgh pr createwait for a passing check or a valid override. It guards the agent’s workflow and is not a security boundary. Pushes from your own terminal are not affected. - Findings an agent can act on
- Static findings name their rule, severity, file and line. Only new findings on lines the change touched fail the check, and a rule that can’t finish makes it incomplete, never clean. The guide to reading a report has the rest.
- A way past false positives
- The agent reads a doubtful finding, and ignores a false positive with
slopcop ignore. Later checks leave that finding out. - Rules first, review if you want it
- If you configure local reviewers,
slopcop checkruns them too, under your own logins. A review finding is a model’s judgment, while a static finding traces to a rule.--mode staticruns only the hosted check.
Claude Code, Codex and the rest.
- Claude Code
- Installs a user-level skill you can run as
/slopcop, with the Stop hook and push gate insettings.json. The Claude Code guide has the line to add toCLAUDE.md. - Codex
- Installs a skill you can mention as
$slopcop, with the hooks inhooks.json. Codex runs them once you trust them with/hooks. The Codex guide has each step. - Any agent with a shell
- An agent that can run a command can run
slopcop checkand act on its exit code. See other agents, or how SlopCop works in a coding agent. - Then on the pull request
- The same check can run on each push to a GitHub pull request. See pull request checks.
Set it up once.
npm install --global @brokkai/slopcop
slopcop init
slopcop loginThe quickstart has the other ways to install. Your agent’s first check in a repository adds it to your workspace.
Questions.
- How do I add static analysis to Claude Code?
- Install the slopcop CLI, then run slopcop init and slopcop login once on your machine. Init adds the skill, the Stop hook and the push gate at user level, so Claude Code can check its changes in any repository.
- Does SlopCop work with Codex?
- Yes. The same init installs a skill and hooks for Codex. Codex runs a new user-level hook only after you trust it, so open Codex and review it with /hooks.
- When does the Stop hook run a check?
- When the agent stops, if the session wrote files in the repository or a dependency file changed, slopcop is signed in, the workspace hasn’t disabled the repository or passed its limit, and the tree differs from the last check in the session.
- Can I turn the hooks off?
- Yes. Run slopcop init --no-hooks to install only the skill, or slopcop init --remove-hooks to remove SlopCop’s hooks and nothing else.
- What does a check cost?
- Your personal workspace gets 1,000 free checks each calendar month, and a team workspace gets them too once it has bought credits. Each check after those costs $0.01, paid from prepaid credits, unless the workspace is on the Team plan, which includes every check. Repositories are free. Pricing has both.
