No slash command · from web-tasuke
Guidelines for using window.alert() and window.confirm() in web applications. Use when implementing error notifications or destructive action confirmations.
Ships in web-tasuke. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
window.alertとwindow.confirmの使用指針window.alert()とwindow.confirm()はブラウザ標準のAPIです。
以下の利点があるため、適切な場面では使います。
confirm()の戻り値で同期的に分岐できるため、コードがシンプルになりますconfirm()が常にfalseになる可能性がありますhistory.pushStateとの組み合わせの問題iOS Safariではhistory.pushState()で追加された履歴エントリにブラウザバック(スワイプバック含む)で戻ると、
その後のalert()/confirm()/prompt()がサイレントに無視されます。
confirm()は常にfalseを返します。
このバグはiOS 9.3頃から報告されており、
iOS 18時点でも修正されていません。
alert/confirm/promptが無視される問題そのもののWebKit Bugzillaの公開チケットはなく、
Apple内部のRadarで管理されていると推測されています。
WebKitチームはユーザーインタラクションなしのpushStateエントリのスキップを、
意図的なセキュリティ強化として扱っている面もあり、
根本的な修正の見通しは不明です。
Apple Developer Forumでの報告で、
iOS 17/18でも再現が確認されています。
WebKit Bugzillaの#248303は、
直接にはpopstateイベントの問題ですが、
pushStateエントリのスキップという根本原因が共通しています。
SPA的なhistory操作を行うアプリケーションでは、 この問題に該当する可能性があるため注意が必要です。
<dialog>要素のshowModal()やUIライブラリの機能を使ってくださいWhat SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub ncaq/konoka --plugin web-tasuke17 skills in this plugin
/any-typeAvoid using any type in TypeScript. Use unknown, generics, or proper type definitions instead. Use when writing or reviewing TypeScript type annotations./aria-usageWAI-ARIA usage guidelines. Avoid redundant ARIA attributes. No ARIA is better than Bad ARIA. Use when writing or reviewing HTML/JSX with accessibility attributes./as-const-satisfiesUse `as const` and `as const satisfies Type` for constant definitions in TypeScript. Use when defining constants, config objects, or string union types./async-state-typeAvoid contradictory state types for async data fetching. Use Suspense or discriminated unions instead. Use when writing or reviewing async data fetching code in React/TypeScript./avoid-forAvoid for loops (C-style, for...of, for...in) in TypeScript/JavaScript. Prefer higher-order Array methods like map, filter, find, some, every, reduce. Use when writing or reviewing loops or iteration over arrays, objects, Map, Set, or String./dynamic-importPrefer static import over dynamic import() in TypeScript/JavaScript. Use when writing or reviewing import statements.