Skip to content

archibate/dotfiles-opencode / skills/review-ai-slop

review-ai-slop

Verified

Review code for AI slop patterns. TRIGGER when user says "review for AI slop", "check for AI patterns", "clean up AI code", "audit AI-generated code", or "review AI slop".

AI Slop Review Checklist

Review the specified code for AI-generated slop patterns.

Target: $ARGUMENTS (or current git diff if no arguments provided)

Output format: Group findings by category. For each: file path, line number, pattern name, brief description, suggested fix. Do not make inline edits — report findings and let user decide what to fix.


A. Defensive Programming

Load the anti-defensive skill and apply all 10 patterns:

  1. Swallowing exceptions
  2. Dictionary defaults on required fields
  3. Null coalescing to fabricate data
  4. Type coercion instead of validation
  5. Compatibility shims
  6. Unnecessary null checks
  7. Catch-all exception handlers
  8. Over-validation at internal boundaries
  9. Fabricated default values
  10. Logging warnings instead of raising

B. Over-Engineering

PatternFlag When
Premature abstractionFactory/strategy/abstract base class for a single implementation. "In case we need it later."
Unnecessary wrappersget_config() that just calls os.environ.get(). Utility functions invoked only once.
Over-modularizationSimple logic split across many files when one suffices. Deep directory nesting for small codebase.

C. Unnecessary Infrastructure

PatternFlag When
Retry logic everywhereExponential backoff on local function calls or non-transient operations.
Config/env var overuseEvery constant configurable via env var, even ones that should never change (math constants, format strings).
Unnecessary asyncasyncio/threading on CPU-bound or already-fast operations (<10ms).
Feature flags for no reasonBoolean toggles controlling behavior that has no reason to vary.

D. Code Bloat

PatternFlag When
Excessive logginglogger.info on every function entry/exit. Logging parameter values and return values of internal functions.
Magic number extractionMAX_SIZE = 100 when 100 is obvious from context. Constants that add no clarity.
Trivial docstringsdef add(a, b): """Add a and b.""" — docstring restates function name.
Unnecessary data classesdataclass/TypedDict created for one-off use instead of just using a dict or tuple.

E. Testing Slop

PatternFlag When
Tests that test nothingAsserting a function exists or returns the right type, not that it returns correct values. Tests with no assertions.
Over-mockingMocking so heavily the test only validates the mock, not the real logic. Mocking what you're trying to test.

F. Other Patterns

PatternFlag When
Callback/event overuseEvent emitters, hook systems, or pub/sub for simple linear flows.
Runtime type checkingisinstance checks inside functions that duplicate what type hints + static analysis already handle.
Hallucinated importsUsing APIs from wrong library version. Importing packages that don't exist.
Boilerplate generatorsCode that exists to satisfy a template rather than solve a problem. Empty __init__.py with docstrings.

Summary Table

CategoryCountSource
A. Defensive Programming10anti-defensive skill
B. Over-Engineering3This skill
C. Unnecessary Infrastructure4This skill
D. Code Bloat4This skill
E. Testing Slop2This skill
F. Other4This skill
Total27
rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit.Stars: 466kUpdated Claude CodeCodexVerifiedInstall
rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure.Stars: 466kUpdated Claude CodeCodexVerifiedInstall
rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics.Stars: 466kUpdated Claude CodeCodexVerifiedInstall
ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first.Stars: 193kUpdated Claude CodeCodexVerifiedInstall