#14
[skill] Make the formatter work on Windows
Makes skill/scripts/format.mjs work on Windows.
- Direct-run check:
import.meta.url.endsWith(process.argv[1].split("/").at(-1))never matches a Windows backslash path, so the CLI exits 0 without output. It now compares real paths, which still works when the skill folder is installed as a symlink or junction. Ifargv[1]isn't a file, it's treated as not a direct run instead of throwing. - Media references:
localRefreturned./captures\before.pngon Windows. It now emits/separators there. Other platforms are unchanged.
Verification:
- Windows 11:
pnpm testgoes from 25/31 to 31/31. - Linux (WSL, Node 24):
pnpm test31/31, andpnpm verify:skillpasses. - I haven't run
verify:localor the GitHub smokes, and the commits aren't signed. Squash-merging would give you a signed commit.
@jayamartinez is attempting to deploy a commit to the jmsv Team on Vercel.
A member of the Team first needs to authorize it.