Skip to content

Validate skill bash snippets in tests - #1697

Closed
xuezhaolan wants to merge 1 commit into
garrytan:mainfrom
xuezhaolan:lan/bash-syntax-guard-1667
Closed

xuezhaolan wants to merge 1 commit into
garrytan:mainfrom
xuezhaolan:lan/bash-syntax-guard-1667

Conversation

@xuezhaolan

Copy link
Copy Markdown

Summary

  • add a SKILL.md freshness test that runs bash -n over concrete bash/sh fenced snippets
  • skip placeholder/example snippets such as <url>, {{PLACEHOLDER}}, and ellipsis blocks
  • batch syntax checks per markdown file for speed, then fall back to per-block checks for actionable file/line errors

Fixes #1667.

Test plan

  • bun test test/skill-parser.test.ts test/skill-validation.test.ts

Note: I also tried bun test; it did not complete cleanly on this checkout due existing unrelated failures/timeouts, including a missing .factory/skills/gstack-ship/SKILL.md golden fixture and a timeout in browse/test/security-audit-r2.test.ts.

@garrytan

garrytan commented Jun 8, 2026

Copy link
Copy Markdown
Owner

Closing in favor of #1722, which solves the same goal (#1667) more completely: it runs bash -n across every block in all SKILL.md files and caught + fixed a real fence bug in codex/SKILL.md. Can't land both. Thanks for the contribution!

@garrytan garrytan closed this Jun 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: validate bash syntax in SKILL.md code blocks during bun test (prevent silent runtime breakage)

2 participants