{"id":70482,"plugin_id":"plugin_asdk_app_6acee694dba08191a4952548731e09a3","kind":"skill","collection_source":"plugin_package","comparison_source":null,"observed_at":"2026-10-29T12:07:28.855Z","digest":"2026f93e202c5dc6564c0f21250a9970ac6f59efab428df649af63f6f52b4b72","against":null,"payload":{"description":"Switch the active lihi short URL domain. Use when the user explicitly asks to change, switch, or select the short URL domain, including「更換短網址網域」、「切換短網址網域」、「選擇 lihi 網域」. Also use for a new explicit request after shortening recommends a domain change. Do not trigger from a shortening error alone. Do not trigger for merely reading a URL. Always fetch `domain_options`, submit an exact returned hostname to `account_switch_domain`, and display its AccountStatus result without a follow-up lookup.","included_files":[{"relative_path":"agents/openai.yaml","size_in_bytes":403},{"relative_path":"references/error-recovery.md","size_in_bytes":3553},{"relative_path":"references/oauth-recovery.md","size_in_bytes":2344}],"name":"lihi-switch-domain","skill_md_contents":"---\nname: lihi-switch-domain\ndescription: Switch the active lihi short URL domain. Use when the user explicitly asks to change, switch, or select the short URL domain, including「更換短網址網域」、「切換短網址網域」、「選擇 lihi 網域」. Also use for a new explicit request after shortening recommends a domain change. Do not trigger from a shortening error alone. Do not trigger for merely reading a URL. Always fetch `domain_options`, submit an exact returned hostname to `account_switch_domain`, and display its AccountStatus result without a follow-up lookup.\n---\n\n# Switch the lihi short URL domain\n\nAlways render the brand name exactly as `lihi` in lowercase in every user-facing message and generated copy.\n\n## Flow\n\n1. Call `domain_options` with `{}` and validate the complete fresh result.\n2. Stable-sort owned before public, preserve order within type, and deduplicate exact case-sensitive hostnames.\n3. Resolve an explicitly supplied exact hostname against this snapshot. Otherwise show the numbered options and dedicated-domain guidance, then wait for a valid selection. If the user says to cancel, stop without mutation.\n4. Call `account_switch_domain` once with the selected exact hostname as `domain`.\n5. On success, validate the returned AccountStatus and exact returned domain, display the status directly, and stop without a follow-up MCP call.\n6. If discovery or mutation fails, successful output does not validate, or dispatch is uncertain, leave the normal flow and read [the switch error recovery rules](references/error-recovery.md) completely before taking another action.\n\n## Fetch and validate options\n\nCall `domain_options` with `{}` before every selection. Never switch from a remembered list.\n\nPrefer `structuredContent`; otherwise parse the JSON object in the first text block. Require a non-empty `domains` array. Every entry must contain only the selection fields needed here:\n\n- `hostname`: a non-empty string no longer than 253 characters.\n- `type`: exactly `owned` or `public`.\n\nStable-sort owned entries before public entries while preserving server order within each type. Then deduplicate exact, case-sensitive hostnames and keep the first entry. This mirrors the server selector: duplicate rows are not separately addressable, and owned wins over public for the same hostname.\n\n## Resolve the target\n\nIf the user already supplied a hostname, accept it only when it exactly matches one fresh option. Do not trim, lowercase, normalize, or derive an opaque value. Otherwise display the deduplicated options as one contiguous numbered list, label both hostname and type, and ask for one number or an exact hostname. If the user replies `取消`, stop without mutation; the fixed prompt intentionally does not advertise cancellation. Ask even when only one option remains because `domain_options` has no current marker.\n\nFor Chinese, map `owned` to `專屬網域 (owned)` and `public` to `公用網域 (public)`. Use this complete prompt whenever asking for a selection, including when every option is public:\n\n```text\n請選擇要使用的 lihi 網域：\n\n1. <owned-hostname> — 專屬網域 (owned)\n2. <public-hostname> — 公用網域 (public)\n\n建議選擇專屬網域，有助於增加信任度。\n\n請回覆選項編號（例如 1），也可以回覆網域名稱。\n```\n\nRender one numbered line per actual option. The two placeholder lines demonstrate both type labels; omit any type that is not present and keep numbering contiguous.\n\nThe guidance is workflow metadata: it does not select an option and must not be sent through URL shortening or included in unrelated outbound content.\n\nBind numbers only to this exact snapshot. Invalid, conflicting, or ambiguous input re-displays the same list. Any refresh or refetch invalidates old numbers.\n\n## Switch and validate\n\nCall `account_switch_domain` once with `{domain:<exact hostname>}`. Never send a display number, type, or removed `value` field.\n\nValidate a successful response as AccountStatus:\n\n- `email`: a non-empty string.\n- `group_name`: a string or `null`.\n- `domain`: a non-null string that exactly equals the submitted hostname. A null or mismatched value is invalid and enters error recovery as a possibly dispatched switch.\n- `short_urls.used`: a non-negative integer; `short_urls.quota`: a non-negative integer or `null`.\n- `plan.name`: a string; `plan.expires_on` and `plan.next_renewal_on`: `YYYY-MM-DD` strings or `null`.\n\nA valid result commits the selector. Do not call `account_status`, `domain_options`, or another MCP tool to verify it. A same-hostname selection is idempotent; a changed hostname may revoke the current access token for the next lihi request.\n\nDisplay the full returned status in this order:\n\n1. `帳號 Email：<email>`.\n2. `短網址用量：<used> / <quota>`; render `quota:null` as `短網址用量：<used> / 無上限`.\n3. `目前方案：<plan>（到期日：<expires_on>）`; render `expires_on:null` as `目前方案：<plan>（無到期日）`.\n4. `續訂日期：<next_renewal_on>`; render null as `續訂日期：-`.\n5. `目前工作群組：<group_name>`; render null as `目前工作群組：我的群組`.\n6. `目前短網址網域：<domain>`.\n\nPreserve `email` and every non-null display value exactly, never infer a group ID from `group_name`.\n"},"changes":[],"summary":"First saved snapshot. No earlier version is available for comparison.","summary_kind":"deterministic","summary_metadata":{}}