ワンクリックで
new-handler
Scaffold a new Arizona handler module. Ask whether it's a route-level view or an embeddable stateful component.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Scaffold a new Arizona handler module. Ask whether it's a route-level view or an embeddable stateful component.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
Add a new route to the Arizona router configuration. Use when creating new pages or endpoints.
Trace an event through the full Arizona stack from client click to DOM patch. Use when debugging event handling.
Profile Arizona hot paths with eprof/fprof. Use when investigating performance or picking the next optimization.
Add tests for an Arizona module. Use when creating CT suites, inline EUnit tests, or E2E tests.
Format, check, test, and commit changes. Use before committing any code changes.
Debug Arizona stream operations. Use when investigating stream insert/delete/update/move/sort/reset behavior.
SOC 職業分類に基づく
| name | new-handler |
| description | Scaffold a new Arizona handler module. Ask whether it's a route-level view or an embeddable stateful component. |
| argument-hint | ["module_name"] |
| allowed-tools | Write, Glob |
Scaffold a new handler module named $ARGUMENTS in src/. First ask the user which kind it is:
arizona_stateful.hrl,
mount/1 (request data arrives as bindings via arizona_middleware:extract/1 middlewares)?stateful(Handler, Props)) → arizona_stateful.hrl, mount/1-module($ARGUMENTS).
-include("arizona_stateful.hrl").
-export([mount/1, render/1, handle_event/3]).
mount(Bindings) ->
{maps:merge(#{id => <<"$ARGUMENTS">>}, Bindings), #{}}.
render(Bindings) ->
?html({'div', [{id, ?get(id)}], [
<<"$ARGUMENTS">>
]}).
handle_event(_Event, _Payload, Bindings) ->
{Bindings, #{}, []}.
-module($ARGUMENTS).
-include("arizona_stateful.hrl").
-export([mount/1, render/1, handle_event/3]).
mount(Bindings) ->
{maps:merge(#{id => <<"$ARGUMENTS">>}, Bindings), #{}}.
render(Bindings) ->
?html({'div', [{id, ?get(id)}], [
<<"$ARGUMENTS">>
]}).
handle_event(_Event, _Payload, Bindings) ->
{Bindings, #{}, []}.
Rules:
src/$ARGUMENTS.erlmount returns {Bindings, Resets} where Resets is typically #{}render/1 returns a ?html(...) template; the root element must use {id, ?get(id)}handle_event/3 returns {Bindings, Resets, Effects}