the-swarm-corporation/Slop Detector
Analyses every commit with a Swarms AI agent and automatically reverts it if the slop rating (missing types, missing docs, placeholder code) exceeds the configured threshold.
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Stale
- License
- None
Inputs
| name | description | required | default |
|---|---|---|---|
| gemini_api_key | Gemini API key (store as a repo secret) | yes | — |
| threshold | Slop rating threshold between 0.0 and 1.0. Commits rated above this value are automatically reverted. | no | 0.5 |
| model_name | OpenAI model to use for analysis | no | gemini-2.0-flash |
| github_token | GitHub token used to push the revert commit (defaults to GITHUB_TOKEN) | no | ${{ github.token }} |
| fail_on_slop | If "true" the step exits with a non-zero code when slop is detected (in addition to reverting). Set to "false" to only revert silently. | no | true |
Outputs
| name | description |
|---|---|
| rating | Numeric slop rating between 0.0 and 1.0 |
| verdict | "PASS" or "FAIL" |
| summary | One-sentence summary from the agent |
| reverted | "true" if the commit was reverted, "false" otherwise |