C4D Practice
← Browse by Chapter
#68Chapter 12 — Mods: Changing Claude Code from the Inside
Write tests for the mod in [directory], to run with `claude plugin test`. For every event on the `hooks:` line of `claude plugin validate`, write at least one test that fires that event and checks what the hook returned or changed. For any hook that can refuse, deny or answer in Claude Code's place, write one test where it should and one where it should not. Stub every mods API call the mod makes, so that no tool, model, file or network request is real. Run the tests, and if one fails, tell me whether the test or the mod is wrong before you change either.
Mastering Claude Code
Mastering Claude Code

These prompts are excerpts from the book. Get the full collection with explanations and use cases.

Get the Book →