本文へスキップ
Skillpedia
その他5.2k · #15037

yichen-mac-wechat-dual-open

できること

WeChatのアプリをコピーし、バンドル識別子を変えて再署名します。2つのアプリを見分けやすくするため、アイコンの色を変えることもできます。2つのWeChatアカウントにログインしたいMacユーザーが対象です。

使う場面

  • ✓Macで2つのWeChatアカウントを同時に開きたいとき。
  • ✓オンラインで見つけた同時起動の方法が信頼できるか尋ねたいとき。
  • ✓コピーした2つ目のWeChatアプリのアイコンを、別の色に変えたいとき。

スキルのリンク

https://github.com/mcncarl/yichen-skills/blob/main/yichen-mac-wechat-dual-open/SKILL.md

コピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。

使い方

いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/mcncarl/yichen-skills/blob/main/yichen-mac-wechat-dual-open/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

AIへの頼み方の例

“Macに2つ目のWeChatアプリを作り、仕事用のアカウントを、個人用のアカウントと並べてログインできるようにしてください。”

毎週5つの新しいスキル。1分で読めます。

仕組み

エージェントは、WeChatアプリをコピーし、そのコピーの識別子だけを変えて、再署名します。エージェントはWeChatを起動しないので、準備されたコピーはあなた自身が開きます。

技術的な内容(元のSKILL.md)

作者による元のテキスト(英語)をGitHubからそのまま表示しています。

Mac WeChat Dual Open

Core Judgment

Prefer the copy + bundle id + ad-hoc signing method over injection/tweak tools when the user wants a cleaner second WeChat:

  1. Copy /Applications/WeChat.app to a user-owned app such as ~/Applications/WeChat-2.app.
  2. Change only the copy's CFBundleIdentifier, usually to com.tencent.xin2.
  3. Re-sign the copy with codesign --force --deep --sign -.
  4. Stop and have the user open the prepared copy manually. The agent never launches WeChat.

This is generally workable, but not permanent. Updates, push notifications, keychain isolation, Gatekeeper/signing policy, and Tencent-side app checks can break or degrade it. Read references/reliability-and-risks.md when evaluating a public tutorial or explaining tradeoffs.

Prerequisites

  • macOS 12+ with WeChat installed at /Applications/WeChat.app
  • Python 3.10+ (system python works)
  • Pillow: required for recolor-icon. Install with pip3 install Pillow if missing.
  • Xcode Command Line Tools: xcode-select --install provides codesign, iconutil, sips.

Locating the Script

This skill contains a helper script at scripts/wechat_dual_open.py relative to the skill directory. Different agents install skills to different paths:

  • Claude Code: ~/.claude/skills/yichen-mac-wechat-dual-open/scripts/wechat_dual_open.py
  • Codex CLI: ~/.codex/skills/yichen-mac-wechat-dual-open/scripts/wechat_dual_open.py
  • Others: locate the skill directory by finding SKILL.md for yichen-mac-wechat-dual-open

When executing commands, construct the script path dynamically:

# Auto-detect: find the script regardless of agent platform
SKILL_DIR="$(dirname "$(find ~ -path '*/yichen-mac-wechat-dual-open/SKILL.md' -maxdepth 4 2>/dev/null | head -1)")"
SCRIPT="$SKILL_DIR/scripts/wechat_dual_open.py"
python3 "$SCRIPT" status

Or if you know your skill path, use it directly:

SCRIPT="<skill-dir>/scripts/wechat_dual_open.py"
python3 "$SCRIPT" status

Quick Commands

python3 "$SCRIPT" status
python3 "$SCRIPT" create
python3 "$SCRIPT" set-language --languages zh-Hans en
python3 "$SCRIPT" recolor-icon --blue "#1296db"
# The user opens ~/Applications/WeChat-2.app manually; the agent never runs launch.

Default paths:

  • Source app: /Applications/WeChat.app
  • Second app: ~/Applications/WeChat-2.app
  • Second bundle id: com.tencent.xin2

Pass --source-app, --target-app, or --bundle-id when the user's setup differs.

Workflow

  1. Run status first. Confirm the source version, target path, bundle ids, active processes, and whether an existing WeChat-2.app is already present.
  2. If no second app exists, run create. If it exists, avoid deleting it. Use repair to re-apply bundle id, language preference, signing, registration, and cache refresh.
  3. If the second instance appears in English, run set-language --languages zh-Hans en, then restart the second WeChat.
  4. If the user wants a blue icon, run recolor-icon. This extracts the original WeChat icon, changes green pixels to blue in HSV/HLS space, preserves white chat bubbles and shape, replaces both outer and embedded icon files, removes CFBundleIconName to avoid stale Assets.car green icons, clears Finder custom-icon detritus before signing, re-signs, adds a Finder custom icon back, and refreshes caches. If the Finder custom icon tools (DeRez, Rez, SetFile) are unavailable on newer macOS, the script skips that step gracefully — icns replacement alone is usually sufficient.
  5. Stop before launch. Tell the user to open ~/Applications/WeChat-2.app manually. If Dock still shows the old icon, the user may quit and reopen it; the agent must not control either WeChat app.

Icon Pitfalls

Do not stop after replacing only Contents/Resources/AppIcon.icns. WeChat also has:

  • Contents/MacOS/WeChatAppEx.app/Contents/Resources/app.icns
  • Contents/Resources/Assets.car with AppIcon renditions
  • Finder/Dock/LaunchServices icon caches

For reliable Finder "Applications" display, the script also writes a Finder custom icon to WeChat-2.app/Icon\r and sets the Custom Icon attribute. If the user says "Finder still shows green," inspect the real selected path with Finder or open -R ~/Applications/WeChat-2.app; they may be looking at /Applications/WeChat.app or a cached Dock/Launchpad tile.

Important ordering: codesign must run before adding the Finder custom icon, or after clearing it. Otherwise macOS can reject the bundle w

よくある質問

更新の後も、2つ目のコピーは動き続けますか?

必ずしもそうではありません。スキルは、更新、通知、アプリの確認によって、その仕組みが壊れたり弱くなったりすることがあると述べています。

エージェントはWeChatを開いてくれますか?

いいえ。準備されたコピーは、あなた自身が開きます。

元のWeChatアプリは変わりますか?

いいえ。コピーの識別子だけが変わるので、元のアプリはそのままです。

詳細

作者による元の説明

Create, inspect, repair, and polish a second WeChat app on macOS by copying WeChat, changing the bundle identifier, ad-hoc re-signing, preparing it for the user to open manually, setting Chinese language preferences, and recoloring only the copied app icon from WeChat green to blue. Use when the user asks whether Mac WeChat dual-open methods from X/Twitter or scripts are reliable, asks to prepare a second WeChat app, fix WeChat-2 language/icon/cache issues, or make the copied app visually distinct without installing third-party injection tools. Never launch or control WeChat.

repo: mcncarl/yichen-skills

人気

GitHubのスター
5.2k
ランキング
#15037
ライセンス
—
更新日
2026/11/1

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル