switch-appleid

switch-appleid is a skill for Claude Code, Codex from tobemaster56/liam-skills. It costs 111 tokens per session (1,551 once invoked), scanned A, original, MIT.

Un conjunto de scripts para cambiar rápidamente entre cuentas de Apple de distintas regiones en la App Store de macOS, como China, Estados Unidos o Turquía. Guarda las credenciales en el llavero de macOS y usa AppleScript para cambiar la sesión.

In plain words
What is it for?
Sirve para guardar cuentas regionales en el llavero, verificar sus entradas y cambiar la cuenta activa de la App Store mediante un parámetro de región.
Why use it?
Evita introducir repetidamente las credenciales y realizar manualmente el cierre y la apertura de sesión. Mantiene las contraseñas fuera de los scripts, en el llavero del sistema.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: reads .claude/ paths; positional $N argument; installed under .agents/ (shared by several agents).

Good fit Sirve para guardar cuentas regionales en el llavero, verificar sus entradas y cambiar la cuenta activa de la App Store mediante un parámetro de región.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/tobemaster56/liam-skills/switch-appleid
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add tobemaster56/liam-skills --skill switch-appleid
Clone the repo
git clone --depth 1 https://github.com/tobemaster56/liam-skills

Made for: Claude Code, Codex.

Its marketplace also offers this one on its own, as the plugin switch-appleid/plugin install switch-appleid after adding the marketplace above.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for switch-appleid

README.md
[![agentmods](https://agentmods.dev/badge/skills/tobemaster56/liam-skills/switch-appleid/github.svg)](https://agentmods.dev/skills/tobemaster56/liam-skills/switch-appleid)
Your own site
<a href="https://agentmods.dev/skills/tobemaster56/liam-skills/switch-appleid"><img src="https://agentmods.dev/badge/skills/tobemaster56/liam-skills/switch-appleid/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for switch-appleid

Your own site · 80×15
<a href="https://agentmods.dev/skills/tobemaster56/liam-skills/switch-appleid"><img src="https://agentmods.dev/badge/skills/tobemaster56/liam-skills/switch-appleid.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 111 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,551 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00111 $0.01551
Opus 5 $0.00056 $0.00776
Sonnet 5 $0.00022 $0.00310
Haiku 4.5 $0.00011 $0.00155

Measured 9d ago against content hash 3cd022558be8, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

switch-appleid scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.agents/skills/switch-appleid/SKILL.md · 92 lines

How it starts

The opening of the file, as written. The whole thing — 92 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Switch Apple ID Region (macOS App Store)

帮助用户在 macOS App Store 里一键切换不同区域的 Apple ID。整体流程:

  1. 凭据存到钥匙串 —— 每个区域一条 generic password 条目
  2. 运行 AppleScript —— 从钥匙串读账号密码,驱动 App Store 退出登录并重新登录

资产文件:switch-appleid-zone.applescript(同目录下的模板脚本)。


Step 1:把账号存入钥匙串

约定 service 名为 AppleId_<REGION>。脚本内置三个映射:AppleId_CNAppleId_USAppleId_TU(即 cn / us / tu 参数)。新增区域时先在脚本 keychainItemFor 里加一行 if region is "xx" then return "AppleId_XX",再在钥匙串里加同名条目。

为每个区域执行一次(-U 表示若已存在则更新):

security add-generic-password -a "<[email protected]>" -s "AppleId_CN" -w "<password>" -U
security add-generic-password -a "<[email protected]>" -s "AppleId_US" -w "<password>" -U
security add-generic-password -a "<[email protected]>" -s "AppleId_TU" -w "<password>" -U

含特殊字符(双引号、反斜杠、$! 等)的密码用单引号包裹,钥匙串里存的是原文,AppleScript 不需要再转义。

验证:

security find-generic-password -s "AppleId_CN" | awk -F'"' '/acct/{print $4}'   # 看账号
security find-generic-password -s "AppleId_CN" -w                                # 看密码

第一次读取时系统会弹钥匙串授权框,可以选 "Always Allow",之后 osascript 静默读取。


Step 2:运行 AppleScript

脚本接受一个参数 cn / us / tu,自动映射到 AppleId_CN/US/TU。直接对 skill 目录下的脚本文件 osascript 即可,无需移动或安装:

osascript /path/to/switch-appleid-zone.applescript cn

Agent 调用时会自己解析到 skill 目录的绝对路径。手动跑时,把 /path/to/ 换成 skill 实际所在目录(plugin 安装通常落在 ~/.claude/plugins/... 下)。

新增区域只需在脚本 keychainItemFor 里加一行 if 映射,并在钥匙串里加对应条目。

脚本会:

  1. 把 App Store 提到最前,并清理上一次可能残留的登录对话框
  2. 打开"商店 / Store"菜单:已登录 → 先退出登录,然后点登录
  3. 通过 accessibility 元素(而非屏幕坐标)定位登录对话框:先填 Apple ID 回车,待密码框出现后再填密码回车
  4. 等对话框关闭以确认登录成功(放宽到约 20 秒,容忍慢网络验证)
  5. 如果开启了两步验证,需要用户手动输入验证码

提交用「在字段内按回车」而非点 Sign In 按钮——实测点按钮会提交未 commit 的旧值导致卡住,回车会先 commit 再提交,可靠得多。


注意事项

  • 本地化:脚本读取 AppleLocale(失败回退 user locale)选择菜单文案。简体中文 (zh*) 用「商店 / 登录 / 退出登录」,其他语言(含英文及未识别语言)默认按英文界面处理,并对带省略号的菜单项做了兜底。如需精确支持其他语言,在 localeMenuNames 里加一个分支即可。
  • 辅助功能权限:第一次运行时 macOS 会要求触发 osascript 的终端(Terminal / iTerm 等)获得 Accessibility 权限。系统设置 → 隐私与安全性 → 辅助功能 里勾上。
  • UI 元素定位:脚本不写死字段序号,而是动态遍历登录 sheet 的 text fields,按 descriptionsecure text field = 密码框)区分账号框与密码框,对 App Store 版本升级更鲁棒。若大版本改版后仍失效,可用 tell process "App Store" to get entire contents 重新核对结构。
  • iCloud 不受影响:只切换 App Store 的 Apple ID,不会动 iCloud 登录。

Read the full file on GitHub · 92 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 92 lines · 111 tokens per session scan A 3cd022558be8

Subscribe to this mod's changes

switch-appleid is a skill published in the GitHub repository tobemaster56/liam-skills (5 stars, last pushed 2mo ago), licensed MIT. It adds 111 tokens to every session and 1,551 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

local-ai-agents

Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…

microsoft/ai-agents-for-beginners · 200 tokens

next-cache-components-adoption

Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…

vercel/next.js · 95 tokens

insight-error-page

Write or audit an insight-kind error page for the Next.js dev overlay. Use when creating a new errors/ .mdx page, auditing an existing one, or checking that a page matches the framework fix cards. Covers page structure, title alignment, FixCard cards with Copy prompt button, code snippets, terminology verification…

vercel/next.js · 83 tokens

next-cache-components-optimizer

Drive a Next.js route to instant navigation by setting up an agentic loop, under Cache Components / PPR, on initial load (hard navigation) and client-side navigation (soft navigation). Encode the goal as a failing @next/playwright instant() e2e and work it to green, one verified route at a time; the shipped test then…

vercel/next.js · 170 tokens

next-partial-prefetching-adoption

Turn on Partial Prefetching in a Next.js app and work through the insights it surfaces. Use when the user wants to enable or adopt Partial Prefetching, flip the partialPrefetching flag, opt routes in with export const prefetch = 'partial', audit Link prefetch={true} behavior, preserve existing prefetched UI with…

vercel/next.js · 103 tokens