Techniques Used in no-ai-slop for AI Detection: A Rule-Based Pattern Matching System
The no-ai-slop project detects AI-generated "slop" by matching text against a curated library of over 20 linguistic patterns through a lightweight, rule-based scanner that reports specific stylistic markers without using machine learning models.
The petergyang/no-ai-slop repository implements a specialized detection skill that identifies clichéd, AI-generated prose by scanning for predictable linguistic constructions. Unlike neural-network classifiers that output opaque probability scores, this system operates through explicit pattern matching against a static catalogue of telltale writing habits. According to the source code in skills/no-ai-slop/SKILL.md, the detector examines submissions line-by-line to flag specific syntactic structures characteristic of generic AI output.
Pattern Library Architecture
The detection engine relies on a binary pattern library containing more than 20 distinct linguistic markers stored in skills/no-ai-slop/SKILL.md (lines 52-84). This catalogue includes categories such as binary contrasts (e.g., "It's not X, it's Y"), throat-clearing openers (e.g., "Here's the thing:"), faux-insight setups (e.g., "What most people get wrong is"), and colon reveals (e.g., "The best part: [claim]").
Each pattern represents a structural tell common in AI-generated drafts—formulas that language models default to when producing uncontroversial, filler-heavy content. The system performs case-insensitive matching with tolerance for surrounding punctuation, ensuring it captures variations like "Here's the thing:" versus "here's the thing—" without requiring exact string matches.
Detection Mode Workflow
When invoked for analysis, the skill executes a strict diagnostic protocol defined in skills/no-ai-slop/SKILL.md (lines 14-15). The workflow distinguishes between Edit mode (the default, which rewrites text) and Detect mode (which only reports findings).
To trigger Detect mode, users submit a request formatted as "is this slop?" or explicitly set "mode": "detect" in the JSON payload. The system then performs a line-by-line scan, examining each sentence against the pattern library. For every match detected, the skill returns a structured report containing:
- The specific pattern name (e.g., "Binary contrast")
- The exact quoted line from the draft where the pattern appears
- A concise fix suggestion (e.g., "Rewrite as a single statement")
Crucially, the detector never rewrites the original text or assigns an "AI-generated" percentage score during detection operations. This design keeps the output purely diagnostic, allowing authors to see exactly which passages trigger algorithmic recognition without automated alteration of their prose.
Validation and Quality Assurance
After generating a detection report, the skill runs an internal eval check defined in skills/no-ai-slop/eval.md (line 5) to verify output integrity. This validation ensures that every identified pattern was correctly named and that each quoted line matches the actual source text. If any verification check fails—such as a misattributed pattern name or incorrect line quotation—the system regenerates the response to maintain accuracy standards.
This eval-based approach creates a feedback loop that enforces grounded reporting: the skill cannot hallucinate pattern matches or invent quotations, as the validation layer would catch and reject such errors.
Plugin Integration and Capability Declaration
The detection functionality is exposed to host platforms through the plugin manifest located at .codex-plugin/plugin.json (lines 25-28). This file explicitly advertises a "Detect" capability, signaling to compatible hosts that the skill supports pure analysis without editing.
Clients invoke the detector by sending JSON payloads to the skill endpoint. The following example demonstrates a standard detection request:
{
"skill": "no-ai-slop",
"mode": "detect",
"input": "Here’s the thing: the new feature is great. It’s not a bug, it’s an improvement."
}
The skill responds with specific pattern matches and remediation guidance:
Pattern: Binary contrast
Line: "It’s not a bug, it’s an improvement."
Fix: Combine into a single statement (“The new feature is an improvement, not a bug.”)
Pattern: Throat‑clearing opener
Line: "Here’s the thing: the new feature is great."
Fix: Remove opener and start with the main point.
Summary
- Rule-based detection: The system uses a static library of 20+ linguistic patterns rather than machine learning models to identify AI-generated prose.
- Explicit reporting: Detect mode outputs pattern names, exact line quotations, and fix suggestions without rewriting the original text.
- Validation layer: An eval-based check in
eval.mdensures all pattern matches are correctly attributed and quoted. - Plugin architecture: The capability is declared in
plugin.json, enabling integration with host platforms through JSON API calls. - Diagnostic focus: Unlike black-box classifiers, no-ai-slop provides transparent, actionable feedback about specific stylistic markers.
Frequently Asked Questions
How does no-ai-slop differ from traditional AI detectors?
Traditional AI detectors use neural networks to calculate probability scores based on perplexity and burstiness metrics. In contrast, no-ai-slop employs a rule-based pattern matching system that looks for specific syntactic structures—such as binary contrasts and throat-clearing phrases—without calculating an overall "AI percentage" score. This approach provides transparent, explainable results that show exactly which lines triggered the detection.
What triggers Detect mode versus Edit mode in no-ai-slop?
Detect mode activates when the user submits a query formatted as "is this slop?" or includes "mode": "detect" in the JSON payload as specified in skills/no-ai-slop/SKILL.md. In this mode, the skill only reports pattern matches and suggested fixes. Edit mode (the default) would automatically rewrite the text to remove detected patterns.
Can no-ai-slop detect all types of AI-generated content?
No, the system specifically targets AI "slop"—generic, clichéd prose characterized by predictable structural patterns. It will not detect sophisticated AI writing that avoids common LLM default constructions like binary contrasts or colon reveals. The detection is limited to the curated pattern library defined in the SKILL.md file, making it a specialized tool for stylistic analysis rather than a general authorship classifier.
What validation ensures the accuracy of pattern matches?
According to skills/no-ai-slop/eval.md, the skill runs an internal eval check after generating reports to verify that every pattern name is correct and every quoted line matches the source text exactly. If validation fails, the response is regenerated, preventing hallucinated matches or misattributed quotations.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →