agentleFS
hope1569hope1569/wechat-claude-code/SKILL.md

wechat-claude-code

Skill1 starsChanged 5 months agoMITView on GitHub

微信消息桥接 - 在微信中与 Claude Code 聊天。支持文字对话、图片识别、权限审批、斜杠命令。

  • Reads credentials
  • Installs packages

2 other projects use a version of this, 1 of them edited.

Adopted by

Most recently taken up by

  • Other versions2 projects use a version of this.

    Word for word · 1

    1. jidechao/Wechat-ClaudeCode-Skill★ 2100% same

    Edited · 1

    1. Wechat-ggGitHub/wechat-claude-code★ 68459% same

    Wrote their own version · 0

    None found.

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

The file

Files
SKILL.md

WeChat Claude Code Bridge

通过个人微信与本地 Claude Code 进行对话。

前置条件

  • Node.js >= 18
  • macOS(daemon 使用 launchd 管理)
  • 个人微信账号(需扫码绑定)
  • 已安装 Claude Code(@anthropic-ai/claude-agent-sdk)

安装

cd ~/.claude/skills/wechat-claude-code
npm install

postinstall 脚本会自动执行 npm run build 编译 TypeScript。

触发场景

用户提到"微信桥接"、"微信聊天"、"wechat bridge"、"连接微信"、"微信状态"、"停止微信"等与微信桥接相关的话题时触发。

触发后的执行流程

被触发时,不要直接执行任何操作,先探查当前状态再给出可用操作。

按顺序检查以下状态:

第 1 步:检查是否已安装

cd ~/.claude/skills/wechat-claude-code && test -d node_modules && echo "installed" || echo "not_installed"
  • 如果 not_installed:提示用户运行 cd ~/.claude/skills/wechat-claude-code && npm install 安装依赖,然后停止。

第 2 步:检查是否已绑定微信账号

ls ~/.wechat-claude-code/accounts/*.json 2>/dev/null | head -1
  • 如果没有账号文件:提示用户需要先执行 setup 扫码绑定,询问是否现在执行。
  • 如果有账号文件:继续下一步。

第 3 步:检查 daemon 运行状态

cd ~/.claude/skills/wechat-claude-code && npm run daemon -- status

第 4 步:根据状态展示信息

如果 daemon 未运行:

微信桥接已绑定但未运行。

可用操作:
  setup    重新扫码绑定(换号或过期时使用)
  start    启动服务
  logs     查看上次运行的日志

如果 daemon 正在运行:

微信桥接正在运行(PID: xxx)。

可用操作:
  stop     停止服务
  restart  重启服务(代码更新后使用)
  logs     查看运行日志

微信端命令(直接在微信中发送):
  /help    显示帮助
  /clear   清除当前会话,开始新对话
  /status  查看当前会话状态
  /model   切换 Claude 模型
  /skills  查看已安装的 skill

如果用户明确指定了操作(如"启动微信"、"停止微信服务"、"看看日志"等),跳过状态展示直接执行对应命令。

子命令参考

所有命令的工作目录为 ~/.claude/skills/wechat-claude-code。

命令执行说明
setupnpm run setup首次安装向导:生成 QR 码 → 微信扫码 → 配置工作目录
startnpm run daemon -- start启动 launchd 守护进程(开机自启、自动重启)
stopnpm run daemon -- stop停止守护进程
restartnpm run daemon -- restart重启守护进程
statusnpm run daemon -- status查看运行状态
logsnpm run daemon -- logs查看最近日志(tail -100)

权限审批

当 Claude 请求执行工具时,微信会收到权限请求消息:

  • 回复 y 或 yes 允许
  • 回复 n 或 no 拒绝
  • 60 秒未回复自动拒绝并通知

数据目录

所有数据存储在 ~/.wechat-claude-code/:

~/.wechat-claude-code/
├── accounts/       # 绑定的微信账号数据(每个账号一个 JSON)
├── config.env      # 全局配置(工作目录、模型、权限模式)
├── sessions/       # 会话数据(每个账号一个 JSON)
├── get_updates_buf # 消息轮询同步缓冲
└── logs/           # 运行日志(每日轮转,保留 30 天)

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.