Skip to content

Validate skill bash snippets in tests#1697

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

Validate skill bash snippets in tests#1697
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.

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)

1 participant