How No AI Slop Detects AI Writing Patterns: Rule-Based Pattern Matching Explained

No AI Slop detects AI-generated text by tokenizing input into lines and matching them against curated regular-expression patterns defined in SKILL.md, producing a findings report that quotes specific violations and suggests concise fixes without rewriting the original draft.

No AI Slop is an open-source skill that identifies machine-written prose using deterministic pattern matching rather than probabilistic AI models. According to the petergyang/no-ai-slop source code, the tool operates entirely offline through a rule-based engine that scans content for "AI slop" markers---overly formal phrasing, redundant modifiers, and generic filler words---triggering detection when lines match regex rules stored in the skill definition.

The Detection Pipeline in SKILL.md

The detection workflow is defined in skills/no-ai-slop/SKILL.md and executed by an OpenAI-compatible agent engine. When running in detect mode, the skill implements a four-stage pipeline:

  1. Tokenization – The input draft is split into individual lines to enable discrete examination of each sentence.
  2. Pattern Matching – Every line is evaluated against the full set of regular-expression rules cataloged in the skill specification.
  3. Match Collection – For each pattern that fires, the engine records the exact line text and the corresponding pattern name.
  4. Report Generation – The skill outputs a findings document listing detected patterns, quoted offending lines, and specific fix suggestions.

The detection job explicitly terminates after returning this report; according to the source, it does not perform any automatic rewriting or scoring of the draft.

Rule Categories and Pattern Examples

The regex definitions in SKILL.md target specific linguistic constructions common in AI-generated text. Typical patterns include:

  • Wordy Phrases: Trigger on phrases like in order to, suggesting replacement with to.
  • Passive Voice: Flags constructions such as was performed by, recommending conversion to active voice.
  • Redundant Modifiers: Detects combinations like very unique, advising removal of intensifiers.
  • Generic Fillers: Identifies crutch words like basically or actually and suggests deletion.

Because the system relies entirely on these static regex rules, No AI Slop functions without external AI-detector services or API keys, making it fully operational in offline environments.

Running Detection: Code Examples

You can invoke the detection engine programmatically or via command line:


# Programmatic usage in detect mode

from no_ai_slop import NoAISlopSkill

skill = NoAISlopSkill(mode="detect")
draft = """
In order to improve the performance, we basically need to
optimize the algorithm. This is a very unique approach.
"""

report = skill.run(draft)
print(report)

The output identifies violations with line quotes and fix instructions:

- Pattern: Wordy Phrase
  Line: "In order to improve the performance, we basically need to"
  Fix: "Replace "in order to" with "to""
- Pattern: Redundant Modifier
  Line: "This is a very unique approach."
  Fix: "Remove "very""

For CLI usage, the skill exposes a detect command:


# CLI usage feeding text via stdin

no-ai-slop detect < draft.txt

This prints the findings report to stdout with pattern names, quoted lines, and concise fix hints.

Key Implementation Files

The detection architecture spans these files in the petergyang/no-ai-slop repository:

  • skills/no-ai-slop/SKILL.md – Contains the complete pattern catalog, regex definitions, detection job flow, and fix specifications.
  • .codex-plugin/plugin.json – Plugin metadata describing capabilities, version, and skill configuration.
  • scripts/build_plugin.py – Distribution script that bundles the skill and ensures detect mode artifacts are packaged correctly.
  • skills/no-ai-slop/eval.md – Evaluation scenarios demonstrating detection behavior against sample AI-generated text.
  • README.md – High-level overview of the plugin's offline operation and usage instructions.

As specified in SKILL.md, the detection job flow strictly constrains the skill to evidence gathering: "The user asks whether a piece is AI slop … Name each pattern … quote the line, and give the fix in a few words." This design ensures the tool serves as an analytical aid rather than an opaque rewriter.

Summary

  • Tokenization strategy: No AI Slop splits input into lines for granular analysis according to the specification in SKILL.md.
  • Rule-based matching: Detection relies on regular expressions defined in the skill configuration, not machine learning inference or external APIs.
  • Offline operation: The tool requires no network connectivity or API keys, functioning entirely within the local execution environment.
  • Evidence-only reporting: Detect mode surfaces violations with quoted text and fix suggestions but explicitly terminates without modifying the source draft.
  • Extensible architecture: New AI slop indicators can be added by editing the regex rules in skills/no-ai-slop/SKILL.md.

Frequently Asked Questions

How does No AI Slop identify specific AI writing patterns without using an AI model?

No AI Slop uses deterministic regular-expression patterns curated in SKILL.md to match against input text. Each rule targets specific linguistic markers---such as wordy phrases like "in order to" or redundant modifiers like "very unique"---allowing the tool to flag machine-like prose through static regex analysis rather than probabilistic inference.

Can No AI Slop automatically rewrite my text to remove AI patterns?

No. According to the job flow defined in SKILL.md, the detect mode is explicitly designed to only surface evidence. It quotes the offending line and suggests a fix---such as replacing "in order to" with "to"---but terminates immediately after generating the findings report without modifying the original draft.

What file contains the detection rules and how can I customize them?

The detection patterns reside in skills/no-ai-slop/SKILL.md. This file defines the regular expressions, pattern names, and suggested fixes. You can extend detection capabilities by adding new regex rules to this skill definition file.

Does No AI Slop require an internet connection or API keys to detect AI writing?

No. The detection engine operates entirely offline using the rule-based system implemented in the skill. Because it matches text against local regex patterns rather than calling external AI-detector services, the tool functions without API keys or network connectivity.

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:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →