ワンクリックで
readme-assertify
Convert existing README code examples into testable readme-assert blocks by adding test tags and assertion comments.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Convert existing README code examples into testable readme-assert blocks by adding test tags and assertion comments.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Set up a git pre-commit hook that rejects commits when staged files aren't formatted. Detects the repo's formatter and writes a check-only hook.
Set up a git pre-push hook that rejects pushes when code isn't formatted. Detects the repo's formatter and writes a check-only hook.
Verify README code blocks still work using readme-assert — extracts fenced blocks and runs them with assertion comments.
| name | readme-assertify |
| description | Convert existing README code examples into testable readme-assert blocks by adding test tags and assertion comments. |
| user-invocable | true |
| allowed-tools | Bash Glob Grep Read Edit |
Convert existing README code examples into testable
readme-assert blocks by adding test tags
and assertion comments.
Read the README. Find README.md or readme.md in the current working
directory. If neither exists, tell the user and stop.
Scan code blocks. Identify all fenced JavaScript/TypeScript blocks
(```javascript, ```js, ```typescript, ```ts). Categorize each:
test or test:group) — skip.//=>, // →, // ->, // throws,
// rejects) but no test tag — add test to the fence.test tag and assertion comments.Apply edits and show the user what changed.
Run npx readme-assert to confirm the converted blocks pass.
Use these comment forms when adding assertions:
expr; //=> value — equality (strict for primitives, deep for objects)
expr; // => value — alternate spacing
expr; // throws /pattern/ — throws matching error
expr; //=> TypeError: message — throws specific error type
console.log(expr); //=> value — preserves the log, adds assertion
await promise; //=> value — resolved value
promise; // rejects /pattern/ — rejected value
//=> valueconsole.log(expr) → append //=> value (readme-assert preserves the
log and adds an assertion)test:groupname so
variables/imports carry across blocks```javascript test description from prosetest:groupname
rather than duplicating setup code.