anti-slop

by dmmulroyVerified

Opinionated Oxlint rules for rejecting low-evidence TypeScript and JavaScript patterns

3,402
Stars
66
Forks
TypeScript
Language
8/23/2026
Added
View on GitHubDownload ZIP

⚠️ Third-Party Software Notice

This skill is third-party open-source software developed and hosted independently on GitHub. SkillTip is an informational directory and does not control or maintain the underlying repository. Any security checks displayed are automated and limited in scope. Review the source code before installing.

Read the Terms of Service

Installation

Add to your Claude Code skills directory:

# Add to your Claude Code skills
git clone https://github.com/dmmulroy/anti-slop

Getting Started

Guides for using skills like anti-slop.

Security Report

Verified

Last scanned: —

{
  "status": "PASSED",
  "issues": []
}

README.md

anti-slop

skills.sh

Opinionated Oxlint rules that reject low-evidence and low-signal TypeScript and JavaScript patterns.

This project is meant to be vendored, not treated as a fixed npm dependency. Copy the rules into your repository, read them, and change them to match your team's standards. The bundled agent skill handles the initial copy and configuration; after that, the vendored files are yours to maintain and make your own.

Install with an agent skill

npx skills add dmmulroy/anti-slop --skill install-anti-slop

Then ask your coding agent to install or configure anti-slop in the current repository. The skill copies the plugin, installs current Oxlint dependencies, merges the plugin into the existing lint configuration, enables every generic rule, and validates the result. In repositories that depend on Effect, it also enables the opt-in Effect rule group.

To inspect available skills first:

npx skills add dmmulroy/anti-slop --list

Manual local installation

Copy src/ into the target repository, for example at tools/oxlint/anti-slop/, and install matching current versions of oxlint and @oxlint/plugins.

Register the copied entry point in oxlint.config.ts:

import { defineConfig } from "oxlint";

export default defineConfig({
  ignorePatterns: [
    ".agent/**",
    ".agents/**",
    ".claude/**",
    ".codex/**",
    ".continue/**",
    ".cursor/**",
    ".gemini/**",
    ".opencode/**",
    ".pi/**",
    ".roo/**",
    ".windsurf/**",
    "tools/oxlint/anti-slop/**",
  ],
  jsPlugins: [
    { name: "anti-slop", specifier: "./tools/oxlint/anti-slop/index.ts" },
  ],
  rules: {
    "anti-slop/no-chained-type-assertions": "error",
    "anti-slop/no-conditional-empty-object-spread": "error",
    "anti-slop/no-known-value-widening": "error",
    "anti-slop/no-module-mocking": "error",
    "anti-slop/no-object-parameters": "error",
    "anti-slop/no-reflect-apply": "error",
    "anti-slop/no-reflect-get": "error",
    "anti-slop/no-runtime-typeof": "error",
    "anti-slop/no-shape-in-symbol-names": "error",
    "anti-slop/no-unknown-parameters": "error",
    "anti-slop/no-unknown-returns": "error",
    "anti-slop/no-unknown-type-aliases": "error",
    "anti-slop/no-unsafe-dictionary-type": "error",
    "anti-slop/no-widen-then-assert": "error",
    "anti-slop/require-safety-comment-for-type-assertion": "error"
  }
});

The same ignorePatterns, jsPlugins, and rules work under lint in a Vite+ config. Merge the ignore patterns into Vite+'s fmt.ignorePatterns as well so vp check does not reformat installed agent assets or the vendored plugin. Preserve existing ignores and add any other project-local agent tooling directories detected in the repository; do not broadly ignore every dot-directory.

Optional Effect rules

Effect-specific rules live in a separate plugin so projects that do not use Effect do not inherit Effect architecture policy. Register the Effect entry point only in repositories that use Effect:

export default defineConfig({
  jsPlugins: [
    { name: "anti-slop", specifier: "./tools/oxlint/anti-slop/index.ts" },
    {
      name: "anti-slop-effect",
      specifier: "./tools/oxlint/anti-slop/effect/index.ts"
    }
  ],
  rules: {
    "anti-slop-effect/no-service-constructor-imports": "error"
  }
});

Rules

Generic rules

  • no-chained-type-assertions — rejects nested type assertions that fabricate evidence.
  • no-conditional-empty-object-spread — rejects conditional spreads that use {} to omit fields.
  • no-known-value-widening — rejects explicit broad target types that discard known value evidence.
  • no-module-mocking — rejects Vitest and Jest module mocks in favor of real dependency seams.
  • no-object-parameters — rejects the broad object type on function inputs.
  • no-reflect-apply — rejects Reflect.apply in favor of typed function calls.
  • no-reflect-get — rejects Reflect.get in favor of typed property access or boundary parsing.
  • no-runtime-typeof — requires boundary parsing instead of ad hoc typeof narrowing.
  • no-shape-in-symbol-names — rejects shape in symbol names.
  • no-unknown-parameters — rejects unknown inputs except the explicit cause convention.
  • no-unknown-returns — rejects function contracts that return unknown or Promise<unknown>.
  • no-unknown-type-aliases — rejects aliases that merely conceal unknown.
  • no-unsafe-dictionary-type — rejects dictionary value contracts based on unknown, any, object, {}, and semantic equivalents.
  • no-widen-then-assert — rejects local flows that widen known values and later assert them back.
  • require-safety-comment-for-type-assertion — requires each non-const assertion to document its checked invariant.

Effect rules

  • no-service-constructor-imports — rejects relative project imports of exported make<CapabilityName> constructors outside *.test.* and *.spec.* files. Runtime callers should import the owning Layer and yield the contextual service instead. Package imports and static constructors such as WorkspaceName.make are outside the rule.

Violation examples

Each snippet below is rejected by the named rule.

no-chained-type-assertions

const user = input as object as User;

no-conditional-empty-object-spread

const options = {
  ...(timeout !== undefined ? { timeout } : {}),
};

no-known-value-widening

const handlers: Record<string, Handler> = {
  start: startHandler,
};

This discards the known start key. Preserve inference or use satisfies Record<string, Handler> instead.

no-module-mocking

vi.mock("./user-store");

no-object-parameters

function save(value: object) {}

no-reflect-apply

const value = Reflect.apply(operation, owner, args);

no-reflect-get

const value = Reflect.get(owner, key);

no-runtime-typeof

if (typeof input === "string") {
  useName(input);
}

Schema-free projects can permit typeof checks directly inside type predicate and assertion functions while continuing to reject ad hoc checks elsewhere:

{
  "anti-slop/no-runtime-typeof": [
    "error",
    { "allowInTypeGuards": true }
  ]
}

The option defaults to false.

no-shape-in-symbol-names

interface UserShape {
  id: string;
}

Effect: no-service-constructor-imports

import { makeIssueService } from "./issue-service.ts";

Import the owning Layer and yield IssueService instead. Focused *.test.* and *.spec.* files may import the constructor directly.

no-unknown-parameters

function handle(input: unknown) {}

no-unknown-returns

function loadUser(): unknown {
  return input;
}

no-unknown-type-aliases

type ExternalValue = unknown;

no-unsafe-dictionary-type

type Metadata = Record<string, unknown>;
type OtherMetadata = { [key: string]: object };

no-widen-then-assert

const loaded: User = loadUser();
const stored: unknown = loaded;
const user = stored as User;

require-safety-comment-for-type-assertion

const userId = value as UserId;

Add a specific justification immediately before a necessary assertion:

// SAFETY: parseUserId validated the identifier before branding it.
const userId = value as UserId;

Development

pnpm install
pnpm check

src/ is canonical. After changing production source, run pnpm sync:skill-assets; CI checks that the skill's bundled copy remains identical.

License

MIT

Frequently Asked Questions

What is anti-slop?

anti-slop is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by dmmulroy. Opinionated Oxlint rules for rejecting low-evidence TypeScript and JavaScript patterns. It has 3,402 GitHub stars.

Is anti-slop safe to use?

Yes. anti-slop passed SkillsLLM's automated security scan — a dependency vulnerability audit plus prompt-injection heuristics — with no high-severity issues. You can read the full report in the Security Report section on this page.

How do I install anti-slop?

Clone the repository with "git clone https://github.com/dmmulroy/anti-slop" and add it to your Claude Code skills directory (see the Installation section above).

What programming language is anti-slop written in?

anti-slop is primarily written in TypeScript. It is open-source under dmmulroy on GitHub, so you can review or fork the full source.

Are there alternatives to anti-slop?

Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh anti-slop against similar tools.

Comments (0)

No comments yet. Be the first to share your thoughts!

ECC

by affaan-m

10

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

242,21936,702JavaScript
AI Agentsai-agentsanthropicclaude-code
View details
15

An agentic skills framework & software development methodology that works.

234,96620,863Shell
AI Agentsai-agentsbrainstorming
View details

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

185,94028,768JavaScript
AI Agentsai-agentsanthropicclaude-code
View details

cc-switch

by farion1231

3

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

128,8688,826Rust
AI Agentsclaude-codeai-tools
View details

claude-code

by anthropics

Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.

120,03119,897Shell
AI Agents
View details

Developers Also Liked

Based on votes and bookmarks from developers who liked this skill

ECC

by affaan-m

10

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

242,21936,702JavaScript
AI Agentsai-agentsanthropicclaude-code
View details
15

An agentic skills framework & software development methodology that works.

234,96620,863Shell
AI Agentsai-agentsbrainstorming
View details

n8n

by n8n-io

12

Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

201,88160,308TypeScript
MCP Serversapisai-tools
View details

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

185,94028,768JavaScript
AI Agentsai-agentsanthropicclaude-code
View details

cc-switch

by farion1231

3

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

128,8688,826Rust
AI Agentsclaude-codeai-tools
View details