Step 2 of 4
Executable Scripts Inside a Skill
Add a helper script the workflow can run deterministically.
Some steps are better as code than as prose — parsing, validation, deterministic transforms. A skill can bundle a script and instruct Claude to run it, so the fiddly part is exact and repeatable instead of re-derived each time.
.claude/skills/contrast/
SKILL.md
scripts/contrast.py # measures WCAG ratio for two hex colorsIn SKILL.md, name the script and when to run it: "To check a color pairing, run scripts/contrast.py <fg> <bg> and read the ratio — never eyeball it." The script is the source of truth; the body just routes to it.