add-handler
Installation
SKILL.md
Add Handler Skill
Create a new handler in src/birch/handler/ following the project pattern.
Steps
-
Create the handler file:
src/birch/handler/{argument}.gleam- Use
console.gleamorjson.gleamas a reference - Import required modules:
birch/handler,birch/record,birch/formatter
- Use
-
Implement the handler:
- Create a public
handler()function that returnshandler.Handler - Use
handler.new()with:name: A descriptive name (e.g.,"{argument}")write: Output function (fn(String) -> Nil)format: Formatting function usingformatter.Formattertype
- Create a public