Claude To Im Skill Fix — Git skill for Claude Code
这是一个 Claude Code Skill,用于自动修复 https://github.com/op7418/Claude-to-IM-skill 在 Windows上的已知兼容性问题.
How to install Claude To Im Skill Fix
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open 23whx/claude-to-im-skill-fix and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Claude To Im Skill Fix does
这是一个 Claude Code Skill,用于自动修复 https://github.com/op7418/Claude-to-IM-skill 在 Windows上的已知兼容性问题。原 skill 主要在 macOS/Linux 开发,在 Windows 上存在 5 个已知 bug(PowerShell 5.1语法不兼容、核心库缺失、环境变量未注入等)。本 skill 会先诊断你的环境,列出问题,经确认后自动修复。
Alternatives in Git
- Fix PR — by metabase - Fetches and fixes unresolved PR comments by automatically retrieving feedback, addressing review 46.5k ★
- Gh Fix CI — Debug and fix failing GitHub Actions PR checks using log inspection 14.6k ★
- Linting — Run rm -rf .mypy_cache && pre-commit run --all-files and fix the issues 3.1k ★
README
claude-to-im-skill-fix
这个 skill 用于修复 Claude-to-IM-skill 在 Windows 上的已知安装问题。
背景
Claude-to-IM-skill 是一个将 Claude Code 桥接到飞书、Telegram、Discord 等 IM 平台的工具。 它的原始代码主要在 macOS/Linux 上开发和测试,在 Windows 上存在若干兼容性问题, 需要手动修补才能正常运行。
本 skill 会自动诊断并修复这些问题。
使用方法
在 Claude Code 中说:
/claude-to-im-skill-fix
或者用自然语言,例如:
- "帮我修复飞书桥接"
- "Claude-to-IM 跑不起来"
- "fix claude to im"
skill 会先诊断你的环境,列出发现的问题,经你确认后再执行修复。
已知问题清单(Windows 专项)
1. 核心库 `Claude-to-IM` 目录缺失
**现象**:启动时报 `Could not resolve "claude-to-im/src/lib/bridge/..."` 构建错误。
**原因**:skill 通过 `npx skills add` 安装时,只下载了 `Claude-to-IM-skill-main`(技能包装层), 但它依赖的核心库 `Claude-to-IM`(`file:../Claude-to-IM`)是一个独立仓库, 需要单独克隆到同级目录。`npm install` 会创建一个指向该目录的 junction, 但如果目录不存在,junction 就是悬空的。
**修复**:通过 GitHub API 逐文件下载核心库源码,然后 `npm install && npm run build`。 (直接 `git clone` 在某些网络环境下会被重置,GitHub API 更稳定。)
2. PowerShell 5.1 不支持 `Join-Path` 三参数
**现象**:运行 `supervisor-windows.ps1` 时报 `找不到接受实际参数"bridge.log"的位置形式参数`。
**原因**:`Join-Path path1 path2 path3` 的三参数语法是 PowerShell 6+ 才支持的特性。 Windows 内置的 PowerShell 版本是 5.1,不支持这种写法。
**修复**:将所有三参数 `Join-Path` 改为嵌套调用:
# 修复前(PS6+)
$LogFile = Join-Path $CtiHome 'logs' 'bridge.log'
# 修复后(PS5.1 兼容)
$LogFile = Join-Path (Join-Path $CtiHome 'logs') 'bridge.log'
3. `Start-Process` 不能将 stdout 和 stderr 重定向到同一文件
**现象**:启动时报 `无法将 RedirectStandardOutput 和 RedirectStandardError 同时指定为同一文件`。
**原因**:PowerShell 5.1 的 `Start-Process` 不允许 `-RedirectStandardOutput` 和 `-RedirectStandardError` 指向同一个文件路径。
**修复**:将 stderr 重定向到单独的文件 `bridge-stderr.log`:
$StderrFile = Join-Path (Join-Path $CtiHome 'logs') 'bridge-stderr.log'
$proc = Start-Process ... -RedirectStandardOutput $LogFile -RedirectStandardError $StderrFile
4. `$pid` / `$Pid` 是 PowerShell 内置只读变量
**现象**:启动时报 `无法覆盖变量 PID,因为它是只读变量`。
**原因**:PowerShell 中 `$PID` 是自动变量(当前进程 ID),大小写不敏感, 因此 `$pid`、`$Pid`、`$PID` 都指向同一个只读变量,无法赋值。
**修复**:将脚本中所有用作局部变量的 `$pid` / `$Pid` 重命名为 `$bridgePid`
Related Skills
Claude Code Auth Switch
Note: This has only been tested on Linux. macOS and Windows may not work as expected — macOS in particular has
Klaussy Desktop
The agent-first IDE: run a fleet of coding agents (Claude Code, Codex, Gemini, Copilot, Antigravity) across is
Resolvr
Free, source-available desktop GraphQL client and IDE for macOS, Linux and Windows: tabs that survive crashes,
Vmctl
Agent skill to control VMware Workstation VMs via vmrun: power on/off, start, stop, suspend, reset, guest IP,
ClaudeCliSupplierSwitch
Windows 下 Claude Code 多供应商一键切换工具(ccs)——PowerShell 5.1/7 + Git Bash 三端统一菜单,多账号并行、退出自动还原,支持一句命令远程安装
Claude Code Statusline Ps
PowerShell 7 status line for Claude Code on Windows: context meter, cost, rate limits, git branch, mode badges
Related Agents
Byok Token Security Expert
BYOK (Bring-Your-Own-Key) and OAuth token security expert. Deep on cross-platform OS keychain integration (mac
Slim Wrapper
tfx-route.sh 경유 전용 래퍼 에이전트. 코드를 직접 읽거나 수정하지 않고 Bash(tfx-route.sh)를 통해 Codex/Antigravity에 위임하는 thin wrapper. OS
Bash Scripter
Use this agent when you need to write or fix bash/shell scripts — entrypoints, setup scripts, statusline scrip