with one click
add-platform
// Add support for a new target platform to acplugin (e.g., Windsurf, Zed, etc.)
// Add support for a new target platform to acplugin (e.g., Windsurf, Zed, etc.)
Add a new resource type converter to acplugin (e.g., adding support for converting a new Claude Code resource type)
Publish acplugin to npm with version bump, build, test, and 2FA handling
Publish acplugin to npm with version bump, build, test, and 2FA handling
Add a new resource type converter to acplugin (e.g., adding support for converting a new Claude Code resource type)
Add support for a new target platform to acplugin (e.g., Windsurf, Zed, etc.)
Publish acplugin to npm with version bump, build, test, and 2FA handling
| name | add-platform |
| description | Add support for a new target platform to acplugin (e.g., Windsurf, Zed, etc.) |
当需要支持新的 AI 编程工具作为转换目标时,按以下步骤操作。
了解目标平台的配置格式:
确认格式差异和降级策略
src/types.ts)在 Platform 联合类型中添加新值:
export type Platform = 'codex' | 'opencode' | 'cursor' | 'newplatform';
在所有 src/converter/*.ts 文件中,给 switch (platform) 添加新的 case。
参考现有平台的转换逻辑,特别关注:
src/writer/newplatform.ts)复制 cursor.ts 作为模板,修改平台名:
export function generateNewPlatform(scan: ScanResult): ConvertResult { ... }
src/index.ts)generateForPlatform() 添加新 casevalidPlatforms 数组添加新值src/tui.ts)在 selectPlatforms() 的 choices 中添加新选项。
src/__tests__/newplatform-writer.test.ts(可选)| 场景 | 推荐策略 |
|---|---|
| 平台无 Agent 系统 | 降级为指令/规则文件 |
| 平台无 Hooks | 记录为文档 + 输出 warning |
| 平台 MCP 格式不同 | 做字段映射转换 |
| 平台无 Skills 概念 | 转为命令或规则文件 |
| Claude 特有字段 | 保留为 HTML 注释 |