Skip to content

About

No description, website, or topics provided.

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Latest commit

Β 

History

27 Commits

Folders and files

Repository files navigation

Anti-Slop Stack Banner

Anti-Slop Stack πŸ›‘οΈ

The ruthless multi-layer purifier for AI coding agents. Strips away bloated boilerplate, hallucinated abstractions, narrative comments, generic AI template UIs, and robotic prose.

Anti-Slop CI GitHub Action License: MIT Node.js Platform: Universal Agent Skills Zero Dependencies


🎯 The Problem

Large Language Models (LLMs) and AI coding agents have an innate bias toward AI Slop:

  • Code Slop: Trivial comments restating syntax, empty catch (e) {} blocks, unchecked as any band-aids.
  • YAGNI & Architecture Bloat: Single-use interfaces, premature factories, speculative configuration, and wrapper functions that add zero semantic value.
  • UI Slop: Cookie-cutter purple gradients, unstyled floating cards, hardcoded pixel widths breaking mobile viewports.
  • Prose Slop: Buzzword salads ("delve", "leverage", "testament", "in today's rapidly evolving world").

anti-slop-stack operates as an automated Senior Staff Engineer and QA gatekeeper that detects, catalogs, and mechanically purges these patterns.


⚑ Quick Start

1. Run via npx (Zero Install)

npx anti-slop scan src/

2. Auto-Fix Mechanical Slop

Automatically strips trivial narrative comments, dead imports, and obvious residue:

npx anti-slop fix src/

3. Machine-Readable JSON & SARIF Export

Output structured findings for CI/CD dashboards or GitHub Code Scanning:

# JSON output
npx anti-slop json src/

# SARIF v2.1.0 output for GitHub Security tab
npx anti-slop sarif src/ > results.sarif

4. Custom Configuration (.antisloprc.json)

Configure thresholds and toggle rules per repository:

{
  "rules": {
    "bloatSlop": {
      "maxLOC": 200
    }
  }
}

5. Install Git Pre-Commit Hook

Prevent degraded AI code from ever entering your Git history:

npx anti-slop init-hook

You can also audit only currently staged Git files or check changes across branch diffs:

# Audit staged files before commit
npx anti-slop staged

# Audit changed files against base branch
npx anti-slop diff origin/main

See docs/PRE-COMMIT.md for Husky and Python pre-commit integrations.

6. GitHub Action (Reusable CI Workflow)

Add to your repository's .github/workflows/quality.yml:

steps:
  - uses: actions/checkout@v4
  - uses: Dhani078/anti-slop-stack@main
    with:
      path: 'src'
      fail-on-violation: 'true'

7. CI Quality Gate

Fails the build with exit code 1 if high-severity violations exist:

npx anti-slop ci src/

🧩 4 Purification Layers

Layer Target What it Eliminates
1. Code Slop TypeScript, JavaScript, Python, PHP, Go, Rust Narrative comments, swallowed exceptions (catch {}), as any / @ts-ignore, dead residue, leftover debug logs, destructive error wrapping, dangerous eval(), hardcoded secrets/API keys, blind sleep timeouts.
2. Architecture & Bloat Architecture & Modules Single-implementation interfaces, speculative wrappers, files exceeding 200 LOC ceiling.
3. UI & Visual Slop CSS, Tailwind, JSX, Vue Generic AI purple glows, template card layouts, hardcoded width overflow risks, Tailwind template gradients (from-purple-500 to-indigo-500).
4. Prose & Copy Markdown, HTML, Docs AI clichΓ©s (delve, leverage, seamless), throat-clearing openings, passive voice, markdown bold overuse (term).

πŸ€– Installation into AI Coding Agents

anti-slop-stack is designed to run seamlessly across any AI coding environment:

1. Hermes Agent

Clone directly into your Hermes skills directory:

cd ~/.hermes/skills/code-quality
git clone https://github.com/Dhani078/anti-slop-stack.git

2. Claude Code CLI

Clone into your workspace or user skills folder:

git clone https://github.com/Dhani078/anti-slop-stack.git .claude/skills/anti-slop-stack

3. Cursor & Windsurf

Add SKILL.md directly to your project rules (.cursorrules or .windsurfrules):

curl -s https://raw.githubusercontent.com/Dhani078/anti-slop-stack/main/SKILL.md >> .cursorrules

4. OpenAI Codex & Antigravity

Reference SKILL.md inside your repository instructions (AGENTS.md):

Before finalizing code changes, review and enforce SKILL.md from anti-slop-stack to eliminate boilerplate, narrative comments, and template UI bloat.

5. Aider & Cline & Roo Code

Use as a pre-commit or post-generation check script:

npx anti-slop scan src

6. GitHub Copilot CLI & Workspaces

Embed into .github/copilot-instructions.md:

Follow the anti-slop-stack rules: write minimal code (YAGNI), avoid Hungarian interfaces (no IFoo), ban narrative comments, and eliminate generic purple gradients.

πŸ§ͺ Testing

Run the included standalone verification suite (0 external dependencies):

npm test

Sample test output:

Running test suite for anti-slop-stack...
βœ“ Code Slop scanner passed
βœ“ Code Slop fixer passed
βœ“ Architecture Bloat scanner passed
βœ“ UI Slop scanner passed
βœ“ Prose Slop scanner passed

All 5 test suites passed cleanly with 0 failures!

πŸ“„ Documentation


πŸ“„ License

MIT Β© Dhani078

About

No description, website, or topics provided.

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages