AgentSkillsCN

bun-adhoc-validate

通过在仓库中编写临时的 TypeScript 脚本,导入本地代码,对脚本进行迭代并反复运行直至验证通过(包括确认失败情况),然后删除脚本,以此快速、临时地进行验证或测试检查。当需要即时验证假设、检查远程状态,或在不添加永久文件或测试的情况下对小型检查进行原型设计时,可使用此技能。

SKILL.md
--- frontmatter
name: bun-adhoc-validate
description: Run quick, ad-hoc validation or test checks using Bun by writing a temporary TypeScript script in the repo that imports local code, iterating on the script and rerunning until validated (including confirming a failure), then deleting the script. Use when immediate validation is needed to confirm assumptions, inspect remote state, or prototype small checks without adding permanent files or tests.

Bun Adhoc Validate

Workflow

  • Write a short, single-purpose TypeScript script in the repo (e.g., ./tmp/validate-*.ts) that imports local utilities or clients.
  • Keep it minimal: parse args inline if needed, log key outputs, and exit with a non-zero code on failure.
  • Run it with bun from the repo root (prefer bun run <path>).
  • Iterate: edit the script and rerun until you validate the assumption or confirm it doesn't work.
  • Summarize the results, then delete the temporary script and any temporary artifacts.

Guidelines

  • Prefer local imports over re-implementing logic.
  • Avoid committing the temp script; delete it in the same flow.
  • If the script needs secrets or env vars, reuse existing project conventions.
  • If the check should become permanent, propose a real test after validation.