Load when styling with ui-accent ui-solid ui-size-lg ui-rounded-xl modifiers, editing site.css app.css @import @source "../corex", data-theme data-mode on html, typo layout on body, calling Corex MCP list_modifiers get_component_style list_themes, or when tempted to add custom BEM CSS in templates. Never invent class names.
Load when adding {:corex_mcp, only: [:dev, :test]}, configuring plug Corex.MCP in endpoint.ex, editing .cursor/mcp.json or Claude Desktop mcpServers JSON, calling list_components get_component list_modifiers get_component_style list_themes design_guide installation_guide, or when MCP connection refused. Never enable MCP in production.
Load when running mix corex.new, mix corex.design, adding {:corex} to mix.exs, configuring esbuild --format=esm --splitting, LiveSocket with csrfToken and hooks: { ...colocatedHooks, ...corex } in assets/js/app.js, use Corex in lib/*_web.ex, type="module" on app.js script tag, toggle.css select.css for mode/theme pickers, or toast_group layout in root layout.
Load when using Corex.Accordion.set_value, Corex.Dialog.open, phx-click with Corex.* JS commands, socket helpers Corex.*(socket, id, …), controlled mode with value assign, assign_async with accordion_skeleton, toast_group flash, or mix usage_rules.search_docs set_value -p corex. For on_*_change subscriptions use corex-events skill instead.
Load when adding Corex HEEx in lib/*_web/, registering phx-hooks in app.js, importing assets/corex/components/*.css, Corex.Content.new Corex.List.new Corex.Tree.new Corex.Image.new, compound slots with meta: and :let={item}, or accordion combobox dialog timer select tabs. Call MCP list_components and get_component before guessing attrs or slots.
Load when adding on_value_change, on_value_change_client, on_focus_change, on_open_change, handle_event for component interaction, controlled mode with value assign, ColocatedHook CustomEvent listeners, phx-update ignore on listener wrapper, or component Events doc pages. For Corex.* imperative helpers use corex-api skill instead.
Load when building Phoenix forms with to_form, phx-change validate, phx-submit, field={@form[:name]}, native_input checkbox select switch radio_group in lib/*_web/*_form_live.ex or *_form_live.ex, or when asked about Corex form inputs. Corex has no .form component — use Phoenix.Component.to_form/1.
Load when using .navigate with type navigate or patch, .action for buttons, redirect on select menu combobox listbox pagination, Corex.List.Item.new with to redirect :href :navigate :patch, language_switch locale paths, or guides/localize language switcher pattern.