SlopCop

SlopCop in your coding agent

Your agent checks its own change with SlopCop, reads what it found and fixes it before it hands the work back. This is how that works in Claude Code and Codex.

Set up

Once per machine: install the CLI, add its skill to your agents, sign in, then check from any repository. You need an account only to approve the sign-in.

Install with
Terminal
  1. npm install --global @brokkai/slopcop
  2. slopcop init
  3. slopcop login
  4. slopcop

slopcop init adds the SlopCop skill to Claude Code, Codex and opencode, so your agent knows how to run it. slopcop login gives you a code to approve in your browser, signed in to SlopCop. Other ways to install

How it works

The patch
From the merge base with your upstream branch to the working tree: unpushed commits, unstaged edits and untracked files. Git-ignored files stay out.
Only what is new fails
Findings on lines the change added or touched fail the check. Ones already in the code are counted, never failed.
False positives
The agent runs slopcop ignore with the finding’s id, and later checks leave it out.

Claude Code

The skill goes in ~/.claude/skills/slopcop/, Claude Code’s personal skills, so it is there in every project. Claude uses it when you ask it to check its change, and you can run it yourself with /slopcop.

To have Claude check every change without being asked, add a line to your project’s CLAUDE.md, such as “Run slopcop before you finish and fix what it reports.”

Claude Code names its session in the commands it runs (CLAUDE_CODE_SESSION_ID). From that session’s transcript, subagents included, the CLI reads the model and effort behind each file Claude wrote, so a finding can be traced to the model that wrote its line.

Codex

The skill goes in ~/.agents/skills/slopcop/, where Codex reads your skills, and in ~/.codex/skills/slopcop/ ($CODEX_HOME/skills/slopcop/ when CODEX_HOME is set). Codex lists it as SlopCop; ask it to check its change, or mention $slopcop in a prompt.

To have Codex check every change, add the same line to your project’s AGENTS.md.

Codex names its thread in the commands it runs (CODEX_THREAD_ID). From that thread’s session log the CLI reads the files each completed change wrote, and the model and effort of its turn.

Other agents

opencode reads both skills folders, so slopcop init covers it too. Any agent that can run a shell command can run slopcop: it never prompts, sends one request, and answers with an exit code.

0: clean
The check completed and the change added no finding.
1: findings
The change added a finding. The agent fixes it and checks again.
2: incomplete
No new finding, but some rule couldn’t finish, or the check failed. Never read as all clear.
3: still running
The wait ran out first. Running the same check again picks up the same analysis.

What leaves your machine

A check sends the repository’s URL, the base commit and the patch. The patch can hold unpublished source and binary files, so review what your working tree holds before an agent checks it.

Run by Claude Code or Codex, a check also sends the agent’s name and version, its session id, and each model and effort with the files it wrote. The CLI reads only those fields from the session’s record, never the conversation, a tool’s input or a file’s contents. Run outside an agent, a check sends none of it. It never decides a check or what it costs, and slopcop --verbose prints it.

Sign-in and who pays

slopcop login stores a token, readable only by you, in the slopcop folder of your user config directory. The login checks in, and bills, the workspace that was active in your browser when you approved it; slopcop whoami names it.

Checks don’t use credits. A repository joins your workspace the first time it is checked, and each active repository after the workspace’s first uses credits every 30 days. When the balance can’t pay a day, checks are refused, the first repository’s too, until you add credits; a refused check prints where to add them. Your agent runs with your login, so enabling or disabling a repository asks you to type its name in a terminal, and an agent can’t do it for you.

Set it up with us.

Leave your email and we’ll arrange a call about running SlopCop in your team’s coding agents and CI, or anything else you’d like to know.

We’ll use your email to respond.