antislop-code
Code comment hygiene for AI coding agents: remove generic AI-slop comments, keep the valuable ones, never touch the code.
Human and accessibility skill for antislop. Contrast, keyboard, focus, states, and interaction affordances for real people. Includes the contrast checker.
Claude Code
$ npx -y skills add miqdadbadjuber/anti-slop --skill antislop-human --agent claude-code
Codex
$ npx skills add miqdadbadjuber/anti-slop --skill antislop-human -a codex -y
Cursor
$ npx skills add miqdadbadjuber/anti-slop --skill antislop-human -a cursor -y
Gemini CLI
$ npx skills add miqdadbadjuber/anti-slop --skill antislop-human -a gemini-cli -y
GitHub Copilot
$ npx skills add miqdadbadjuber/anti-slop --skill antislop-human -a github-copilot -y
OpenCode
$ npx skills add miqdadbadjuber/anti-slop --skill antislop-human -a opencode -y
Windsurf
$ npx skills add miqdadbadjuber/anti-slop --skill antislop-human -a windsurf -y
name: antislop-human description: "Human and accessibility skill for antislop. Contrast, keyboard, focus, states, and interaction affordances for real people. Includes the contrast checker." allowed-tools: Bash(python *), Bash(python3 *), Read, Write, Edit, Glob, Grep
> Anti Slop: Rules for AI Coding Agents. Human skill
> Part of the antislop system. Read together with `antislop.md` (the core). This skill deep-dives the human concern: the UI must stay usable by people with different eyes, hands, and setups. Contrast, keyboard, focus, states, and the mobile details that exclude people.
The home of the contrast checker. Three layers, from most to least convenient:
**The script.** When a script runtime is available and the file is present, run it instead of computing by hand. The script ships in this skill's folder (`contrast-check.py`, next to this `SKILL.md`). Run it with `python3` on macOS and Linux, `python` on Windows:
python3 "${CLAUDE_SKILL_DIR}/contrast-check.py" "#FFFFFF" "#777777"
# normal text: FAIL (4.48 < 4.5)
# large text: PASS (4.48 >= 3.0)If the `${CLAUDE_SKILL_DIR}` variable is not available in this agent, point the script path at this skill's folder directly. The script exists so agents stop hallucinating AA. It takes two hex colors and prints the ratio and the verdict for both text sizes. If the file is missing, the formula and table below are complete on their own. Never block on the script.
**The formula (WCAG 2.x).**
1. Contrast ratio = (L1 + 0.05) / (L2 + 0.05), where L1 is the lighter relative luminance and L2 the darker. 2. Relative luminance L of one color: convert each channel to 0-1 (`c = hex / 255`), then linearize: if `c <= 0.03928`, `c_lin = c / 12.92`; otherwise `c_lin = ((c + 0.055) / 1.055)^2.4`. 3. `L = 0.2126*R + 0.7152*G + 0.0722*B`. 4. Compare the unrounded ratio: 4.5:1 for normal text, 3:1 for large text (18px+, per R-25). Round only for display, so a pairing at 4.498:1 prints as 4.50 and still fails 4.5:1. The maximum ratio is 21.0 (black on white).
**The reference table** (common pairings, computed with the formula):
| Pairing (text on background) | Ratio | Normal text (4.5) | Large text (3.0) | |------------------------------|-------|-------------------|------------------| | Black on white | 21.00 | Pass | Pass | | White on black | 21.00 | Pass | Pass | | White on #333333 | 12.63 | Pass | Pass | | White on #666666 | 5.74 | Pass | Pass | | #777777 on white | 4.48 | Fail | Pass | | #777777 on #070707 | 4.50 | Fail | Pass | | White on #888888 | 3.54 | Fail | Pass | | White on #999999 | 2.85 | Fail | Fail | | #555555 on black | 2.82 | Fail | Fail |
The `#777777 on #070707` row is the near-threshold case: 4.4983:1 rounds to 4.50 for display and still fails 4.5:1.
Read the table as a sanity check, not as a substitute. Any pairing not listed, or anything near a threshold,
npx antislop-ai antislop is a rulebook an AI coding agent reads every session. It stops generic UI, text, and AI-shaped code, and it is a filter, not a style guide: no colors, fonts, or layouts prescribed, direction stays yours.
Code comment hygiene for AI coding agents: remove generic AI-slop comments, keep the valuable ones, never touch the code.
Copy and text skill for antislop. Use when writing or editing prose: headlines, tone, CTAs, and anti-AI-writing patterns. Load…
Mobile layout skill for antislop. Use for layouts that reflow across screen sizes, phone to desktop: grids, overflow, tap…
UI and visual skill for antislop. Use when building or editing any interface: color, layout, components, motion, and page…
Anti Slop: Rules for AI Coding Agents. The core filter. Load always to stop generic AI slop.
Behavioral guidelines to reduce common LLM coding mistakes. Use when writing, reviewing, or refactoring code to avoid…
Design and build AI agents for any domain. Use when users: (1) ask to "create an agent", "build an assistant", or "design an AI…