Guide · for developers

Check the prose in your docs build.

By Manav Mishra

Add a writing check alongside your code tests. One Zero Slop command scores every document in a directory from 0 to 100. It exits non-zero when a document scores above the threshold you choose.

python3 package/scripts/slopscore.py --batch docs/ --json --gate 25

The batch check exits 0 when every score is at or below the threshold, and 1 when any score is above it. A failed command also returns a non-zero exit code.

What it costs to run

The scorer uses Python’s standard library. Once installed, the scorer makes no network call, needs no account or API key, and keeps every document on the runner. Your own security rules still apply.

In the recorded test, it scored 1,000 documents in 1.9929 seconds on one Apple silicon Mac, about 501.8 per second, and a 15,201-word document in 0.3223 seconds. Your runner and documents will affect the time it takes.

GitHub Actions

Pin the release you tested against rather than tracking main, the way you would pin any other check.

name: prose

on: [push, pull_request]

jobs:
  slop:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v5
      - uses: actions/setup-python@v6
        with:
          python-version: "3.11"

      - name: Install the scorer
        run: |
          curl --fail --silent --show-error --location --max-time 60 -o zero-slop.tar.gz \
            https://registry.npmjs.org/zero-slop/-/zero-slop-2.12.26.tgz
          tar -xzf zero-slop.tar.gz

      - name: Score the docs
        run: python3 package/scripts/slopscore.py --batch docs/ --json --gate 25

The scoring step needs Python, not Node.js. The install step above downloads the package; scoring itself makes no network calls. To skip the download, keep a copy of the scorer package in your repository.

Start with reports

Review the findings with your team before blocking changes. Run it in report-only mode first by dropping the --gate flag: the command still prints every score and exits 0 if the check completes without errors.

# Week one: measure, do not block.
python3 package/scripts/slopscore.py --batch docs/ --json > slop.json

# Week two: enforce at the number your own corpus already clears.
python3 package/scripts/slopscore.py --batch docs/ --json --gate 25

Start with 25, then check it against writing your team already considers good. If your house style scores higher, raise the threshold.

Only the files that changed

Download check-changed-prose.py, review it, and save it under scripts/ in your repository. It checks changed Markdown, MDX and text files one at a time. Deleted files are skipped; spaces and newlines in filenames are preserved.

python3 scripts/check-changed-prose.py --base origin/main \
  --scorer package/scripts/slopscore.py --gate 25

This reads committed files from HEAD, comparing against its merge base with origin/main. Fetch that branch first; in Actions, set fetch-depth: 0 on the checkout step. Keep the complete scorer package from the install step above, not just its Python script.

Before it reaches CI

For a pre-commit hook, use --staged. It checks the exact content staged for the commit, even if you have made further edits. Save this as .git/hooks/pre-commit and make it executable with chmod +x .git/hooks/pre-commit.

#!/bin/sh
exec python3 scripts/check-changed-prose.py --staged \
  --scorer package/scripts/slopscore.py --gate 25

The helper exits 0 when checks pass or no prose changed, 1 when a file needs review, and 2 if a command fails. Single-file checks also flag document-shape problems; inspect the JSON report before deciding what to change. Each Git command has a 15-second timeout; each scoring call has 30 seconds.

What still needs a reader

The score flags phrasing, rhythm and formatting for review; it does not establish factual accuracy, idea quality or authorship. Check claims against their sources. Read the scoring guide for the method and limits.

The editing half

The build check flags documents for review. The installed skill guides your AI assistant through the edit. Local checks warn when a rewrite changes a name, number, quotation, or link.

npx skills add manavmishra/ZeroSlop --global
# then, in Claude Code, Codex, Cursor, Warp, OpenCode or Zed:
/zero-slop docs/architecture.md

Commands and install paths for each assistant are on the install page.

Everything on this page is MIT licensed and reproducible from the repository. The scoring method and its limits are documented on the benchmark page.