From 38f812df4a0956b9019b0fbb439beb5acaa018cb Mon Sep 17 00:00:00 2001 From: Fajar Hidayat Date: Sun, 16 Aug 2026 07:00:48 +0700 Subject: [PATCH] fix: call python3, not python, so the contrast tooling runs (#11) Stock macOS and Debian ship python3 only. Nothing named `python` is on PATH there, so the bundled antislop-contrast MCP server never starts and the command the antislop-human skill prints fails the same way. Changes `command` in plugin.json, the allowed-tools Bash rule and the example in antislop-human/SKILL.md, and the usage strings in contrast-check.py. The script's own shebang was already python3. --- .claude-plugin/plugin.json | 2 +- skills/antislop-human/SKILL.md | 4 ++-- skills/antislop-human/contrast-check.py | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json index 50c2726..6dc76c8 100644 --- a/.claude-plugin/plugin.json +++ b/.claude-plugin/plugin.json @@ -12,7 +12,7 @@ "skills": ["./skills/"], "mcpServers": { "antislop-contrast": { - "command": "python", + "command": "python3", "args": ["${CLAUDE_PLUGIN_ROOT}/skills/antislop-human/contrast-mcp.py"], "env": {} } diff --git a/skills/antislop-human/SKILL.md b/skills/antislop-human/SKILL.md index 0b4dbb3..ca10325 100644 --- a/skills/antislop-human/SKILL.md +++ b/skills/antislop-human/SKILL.md @@ -1,7 +1,7 @@ --- name: antislop-human description: "Human and accessibility skill for antislop. Contrast, keyboard, focus, and states for real people. Includes the contrast checker." -allowed-tools: Bash(python *) Read Write Edit Glob Grep +allowed-tools: Bash(python3 *) Read Write Edit Glob Grep --- # antislop-human @@ -50,7 +50,7 @@ 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`): ```bash -python "${CLAUDE_SKILL_DIR}/contrast-check.py" "#FFFFFF" "#777777" +python3 "${CLAUDE_SKILL_DIR}/contrast-check.py" "#FFFFFF" "#777777" # normal text: FAIL (4.48 < 4.5) # large text: PASS (4.48 >= 3.0) ``` diff --git a/skills/antislop-human/contrast-check.py b/skills/antislop-human/contrast-check.py index 9764764..11e553c 100644 --- a/skills/antislop-human/contrast-check.py +++ b/skills/antislop-human/contrast-check.py @@ -2,9 +2,9 @@ """WCAG 2.x contrast checker, home of the antislop-human contrast checker. Usage: - python contrast-check.py "#FFFFFF" "#777777" - python contrast-check.py FFFFFF 777777 - python contrast-check.py --selftest + python3 contrast-check.py "#FFFFFF" "#777777" + python3 contrast-check.py FFFFFF 777777 + python3 contrast-check.py --selftest Prints the contrast ratio and a PASS/FAIL verdict for normal text (4.5:1) and large text (3:1, 18px+ per antislop R-25). Exit code 0 only when both @@ -142,7 +142,7 @@ def main(argv): if len(argv) == 1 and argv[0] == "--selftest": return selftest() if len(argv) != 2: - print("usage: python contrast-check.py | --selftest") + print("usage: python3 contrast-check.py | --selftest") return 2 try: ratio = contrast_ratio(parse_hex(argv[0]), parse_hex(argv[1]))