원클릭으로
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.