no-slop — Stop Your AI Agent From Writing Generic Code

Every AI coding agent has the same problem: given a blank slate and a vague instruction, they produce the same generic code. Comment stubs like # TODO: implement, variables named result, data, temp — and CSS that looks like Tailwind soup with twenty divs for a profile card.

no-slop is a CLI tool that fixes this at the constraint level.

The Problem

AI agents generate slop because their instructions don’t know your project. A Claude Code SKILL.md that says “write clean code” is useless. What you need is:

# Anti-Pattern: Abstraction Without Reason
name: "Abstract Base Smell"
description: "Don't create base classes unless you have at least 3 concrete implementations"

That’s a real constraint. And no-slop writes it for you.

How It Works

1. no-slop scan

Scans your project for 4 categories of slop patterns:

Detector What It Finds
Comments Boilerplate placeholders (“TODO: implement”), excessive comment-to-code ratio
Variables Generic names (temp, result, data, item, val), type-encoded prefixes (str_name)
Abstraction Unnecessary base classes, deep inheritance chains, interface-only abstractions, factory-for-one
CSS !important abuse, inline style repetition, utility-class-only designs with zero semantic classes

It scores every file 0-100 and outputs a Rich table (or JSON for CI pipelines):

Slop Analysis Results
┌───────────────────────────────────────────┬───────┬──────────────────┬──────────┐
│ File                                      │ Score │ Top Issues       │ Severity │
├───────────────────────────────────────────┼───────┼──────────────────┼──────────┤
│ src/styles.css                            │  42.0 │ Utility Class    │ Error    │
│                                           │       │ Spam, !important │          │
│ services/processor.py                     │  30.0 │ Generic Variable │ Warning  │
│                                           │       │ Names            │          │
│ tests/test_something.py                   │  25.0 │ Abstract Base    │ Warning  │
│                                           │       │ Smell            │          │
└───────────────────────────────────────────┴───────┴──────────────────┴──────────┘

2. no-slop generate

Takes scan results and generates constraint files for 4 agent frameworks:

# Generate for all frameworks
no-slop generate

# Preview without writing
no-slop generate --dry-run

# Just for Cursor
no-slop generate --agent cursor --dry-run

# Back up existing files first
no-slop generate --backup
Framework Output File Format
Claude Code SKILL.md YAML frontmatter + markdown (design principles, anti-patterns, naming conventions, code examples)
Cursor .cursorrules YAML-style rules with glob-patterned file-specific constraints
Codex CLI CLAUDE.md Structured markdown with coding standards, type hints, testing requirements
Gemini CLI .clinerules Key:value constraint format

3. no-slop apply / no-slop check

  • apply — installs generated files into the project (skips unchanged files)
  • check — validates existing constraint files for format, coverage gaps, and stale rules

A Real Example

Before no-slop, an AI agent generates this for a data processing service:

# TODO: Add your code here
def process_data(data):
    """Process the data."""
    result = []
    for item in data:
        temp = item * 2
        result.append(temp)
    return result

After no-slop constraints, the same agent produces:

from dataclasses import dataclass

@dataclass
class DataProcessor:
    """Transforms input records by applying a configured multiplier."""
    multiplier: float = 2.0

    def process(self, records: list[float]) -> list[float]:
        return [record * self.multiplier for record in records]

No stubs. No generic names. No explanation comments. Just project-specific, clean code.

Why Not Just Use Hallmark?

Hallmark (19K stars) showed the world that constraint files can dramatically improve agent output — but it only works with Claude Code’s SKILL.md format, and it ships a fixed rulebook. no-slop is the opposite approach: it scans your codebase, detects your specific slop patterns, and generates constraints tailored to your project. It supports all major agent frameworks, not one.

Install

pip install no-slop

Or from source:

git clone https://github.com/vikasudasi/no-slop
cd no-slop
pip install -e ".[dev]"

Usage

# Full workflow
no-slop init          # Create config
no-slop scan          # Detect slop patterns
no-slop generate      # Generate constraint files
no-slop apply         # Install them
no-slop check         # Verify existing constraints



Enjoy Reading This Article?

Here are some more articles you might like to read next: