# @devflow-tools/plugin-electron

> Electron 专家插件 — IPC 通信、窗口管理、原生模块、自动更新、安全配置。（v0.17.8）

## 安装

```bash
npm install @devflow-tools/plugin-electron
```

## 使用

插件通过 DevFlow/Claude Code 使用：

```text
/devflow:electron <你的任务>
```

## 能力与知识源

## MCP Tools

| Tool | 说明 | 关键参数 |
|------|------|---------|
| `electron_diagnose_bug` | Bug 诊断：进程分类 → IPC 追踪 → 原生调试 | `projectRoot`, `errorMessage`, `stackTrace` |

## Knowledge Sources

| 来源 | URL | SPA |
|------|-----|-----|
| Electron 官方文档 | https://www.electronjs.org/docs | Yes |

## Memory

插件自动注入以下最佳实践：
- 主进程 vs 渲染进程职责分离
- IPC 通信使用 `contextBridge` + `ipcRenderer/ipcMain`
- `preload.js` 只暴露最小必要 API
- `BrowserWindow` 安全配置（`nodeIntegration: false`, `contextIsolation: true`）
- 自动更新使用 `electron-updater`


## 兼容性

需要 Node.js >= 18，并与同版本 @devflow-tools/sdk、DevFlow CLI 配合使用。插件不是独立 HTTP 服务。

## 相关链接

- [仓库](https://github.com/shilongfeicool/dev-flow)
- [插件目录](https://github.com/shilongfeicool/dev-flow/tree/main/plugins)

## License

MIT


## 兼容性

需要 Node.js >= 18，并与同版本 @devflow-tools/sdk、DevFlow CLI 配合使用。插件不是独立 HTTP 服务。

## 相关链接

- [仓库](https://github.com/shilongfeicool/dev-flow)
- [插件目录](https://github.com/shilongfeicool/dev-flow/tree/main/plugins)

## License

MIT


## 兼容性

需要 Node.js >= 18，并与同版本 @devflow-tools/sdk、DevFlow CLI 配合使用。插件不是独立 HTTP 服务。

## 相关链接

- [仓库](https://github.com/shilongfeicool/dev-flow)
- [插件目录](https://github.com/shilongfeicool/dev-flow/tree/main/plugins)

## License

MIT


## 兼容性

需要 Node.js >= 18，并与同版本 @devflow-tools/sdk、DevFlow CLI 配合使用。插件不是独立 HTTP 服务。

## 相关链接

- [仓库](https://github.com/shilongfeicool/dev-flow)
- [插件目录](https://github.com/shilongfeicool/dev-flow/tree/main/plugins)

## License

MIT
