mubu-integration
幕布(mubu)与 Obsidian 集成:将幕布大纲导入 Obsidian、把 Markdown 同步到幕布、查询/导出幕布笔记。触发词:幕布、mubu、幕布导入 Obsidian、mubu 同步、幕布笔记导出
Skill by liuboacean
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/liuboacean-mubu-integration
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: documents
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md and code. Checked Oct 26, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
- Runs as
- Python package
Network hosts it talks to 3
api2.mubu.com· found in codecodeload.github.com· found in install commandmubu.com· found in code
Files it touches
~/.claude/skills/mubu-integration~/.ssh/id_rsa/etc/passwd/Library/Fonts/Menlo.ttf/Users/liubo/WorkBuddy/2026-07-14-06-18-40/mubu-integration/assets- Your home directory (~)
What's inside
- Skill name
mubu-integration- Description
- 幕布(mubu)与 Obsidian 集成:将幕布大纲导入 Obsidian、把 Markdown 同步到幕布、查询/导出幕布笔记。触发词:幕布、mubu、幕布导入 Obsidian、mubu 同步、幕布笔记导出
- License
- MIT
- Instructions
- 433 lines in SKILL.md · view on GitHub
Before installing
- Ships executable scripts
Files (30)
- dependabot.yml · .github/
- test.yml · .github/workflows/
- .gitignore
- CHANGELOG.md
- CONTRIBUTING.md
- LICENSE
- README.md
- README.zh-CN.md
- SKILL.md
- demo.gif · assets/
- social-preview.png · assets/
- demo.vhs
- hellogithub-pitch.md · docs/
- positioning.md · docs/
- v2ex-post.md · docs/
- xiaoshuopai-tutorial.md · docs/
- weekly.md · examples/
- requirements-dev.in
- requirements-dev.txt
- requirements.in
- requirements.txt
- ruff.toml
- gen_assets.py · scripts/
- __init__.py · scripts/mubu/
- cli.py · scripts/mubu/
- client.py · scripts/mubu/
- config.py · scripts/mubu/
- convert.py · scripts/mubu/
- mubu_api.py · scripts/
- test_mubu_api.py · tests/
SKILL.md (first lines)
# 幕布集成 Skill
幕布(mubu.com)是一款极简大纲工具,支持将大纲一键转为思维导图。本 Skill 提供 API 集成能力。
## 权限与安全边界
本 Skill 以你的幕布账号身份操作**远程真实内容**,使用前请知悉其权限边界:
- **读取**:仅读取环境变量 `MUBU_PHONE` / `MUBU_PASSWORD` / `MUBU_MEMBER_ID`(环境变量未设置时,才由仓库外的 `~/.workbuddy/.env.mubu` 补全;`MUBU_MEMBER_ID` 即幕布 colla 成员 ID,仅 `save` 写回需要。**该值任何 API 都不返回,无法自动获取,必须手动设置 `MUBU_MEMBER_ID` 或提前写入 token 缓存的 `member_id`**)。
- **写入**:仅在本地写入 Token 缓存文件 `~/.mubu_token`(权限 `0o600` + 跨进程 `fcntl` 锁),不写入其它文件。
- **网络**:仅访问 `api2.mubu.com`(base URL 可由 `MUBU_BASE_URL` 覆盖,但仅限 `mubu.com` 家族域名,防 MITM),**无第三方服务、无遥测、无数据外发**。
- **写操作需确认**:真实会改动幕布内容的写操作为 `create`(新建)、`rename_folder`(重命名文件夹)、`save`(保存文档,端点 `/colla/events`,需 `member_id`)、`move`(移动,端点 `/list/custom/drag`)、`rename_doc`(文档重命名,端点 `/list/rename_doc`)、`purge`(彻底删除,唯一真实调用服务端删除,不可逆);`delete` 现为**软删除**(仅标记进本地回收站,云端副本仍在)。`save` / `move` / `rename_doc` 已在 v1.3.9 经真机验证可用。所有真实写操作均需显式传 `--yes` 才执行,否则中止并提示。
- **信任边界**:Skill 不读取你的其它本地文件、不执行与幕布无关的 shell 命令;它只做「登录 → 读写你的幕布文档」这一件事。
## 功能概览
| 功能 | 接口 | 说明 |
|------|------|------|
| 用户登录 | `POST /user/phone_login` | 手机号密码登录获取 Token |
| Token 刷新 | 自动处理 | access_token 2小时过期,临近过期自动重新登录(重登仅重试 1 次,杜绝死循环) |
| 创建文件夹 | `POST /list/create_folder` | 在指定位置创建文件夹 |
| 创建文档 | `POST /list/create_doc` | 创建新的大纲文档 |
| 获取列表 | `POST /list/get` | 获取文件夹下的文档列表 |
| 获取文档 | `POST /document/edit/get` | 获取文档详细内容(真实端点;body 为 docId+password+isFromDocDir,返回 data.definition 为 JSON 字符串需二次解析) |
| 更新文档 | `POST /colla/events` | 保存/更新文档内容(v1.3.9 起可用;colla 协同端点,`events` 承载 changeset;需 `member_id`,私人文档由 `MUBU_MEMBER_ID` 或 token 缓存提供)|
| 删除文档 | `POST /list/delete_doc` | 删除文档(按类型区分端点) |
| 删除文件夹 | `POST /list/delete_folder` | 删除文件夹(原 `/list/delete` 实测非法,已弃用) |
| 移动文档 | `POST /list/custom/drag` | 移动文档/文件夹到其他位置(v1.3.9 起可用;body `dst/src/folderId`,已真机验证)|
| 导出 Markdown | 本地转换 | 将大纲结构转换为 Markdown |
## API 基础信息
- **Base URL**: `https://api2.mubu.com/v3/api`
- **认证方式**: JWT Token,通过请求头 `Jwt-Token` 传递
- **Content-Type**: `application/json;charset=UTF-8`
## 环境变量配置
在使用前,需要配置以下环境变量:
```bash
export MUBU_PHONE="your_phone_number" # 幕布账号手机号
export MUBU_PASSWORD="your_password" # 幕布账号密码
# 可选:幕布 colla 成员 ID(仅 save 写回需要;任何 API 都不暴露,必须手动设置,缺失时 save 会明确报错)
export MUBU_MEMBER_ID="your_collab_member_id"
```
> 切勿在脚本或代码中硬编码明文密码;凭据仅通过环境变量或仓库外的
> `~/.workbuddy/.env.mubu` 提供。
---
## 使用说明
### 1. 使用 MubuClient
所有操作都通过 `scripts/mubu/client.py` 中的 `MubuClient` 类完成(`scripts/mubu_api.py` 仅为向后兼容的重新导出 shim,不再建议直接使用;**不再有**独立的
`login()` / `create_folder()` / `create_doc()` / `get_list()` / `get_doc()` / `save_doc()` /
`delete_item()` 模块级函数)。实例化时自动读取 `MUBU_PHONE` / `MUBU_PASSWORD`
环境变量(或 `~/.workbuddy/.env.mubu`)并加载本地缓存 Token:
```python
from mubu.client import MubuClient
# 登录:凭据来自环境变量;返回扁平 data(token / id / name)
client = MubuClient()
info = client.login()
print(info["user_id"], info["username"]) # 注意是扁平 data["id"],非 data["user"]["id"]
# 按名称本地搜索文档/文件夹(递归遍历,大小写不敏感)
results = client.search("项目", max_depth=3, limit=50)["results"]
for r in results:
print(r["type"], r["name"], r["path"])
```
> 登录返回结构为**扁平** `data`:`data["id"]`=用户 ID,`data["name"]`=用户名,
> `data["token"]`=令牌。这与旧版嵌套 `result["data"]["user"]["id"]` 不同。
---
## 大纲内容格式
幕布文档内容使用特定的 JSON 格式表示大纲结构:
```json
{
"name": "文档标题",
"nodes": [
{
"id": "node_1",
"text": "一级标题",
"children": [
{
"id": "node_1_1",
"text": "二级标题",
"children": []
}
],
"collapsed": false,
"finish": false,
"modified": 0
},
{
"id": "node_2",
"text": "另一个一级标题",
"children": [],
"collapsed": false,
"finish": false,
"modified": 0
}
]
}
```
---
## Token 管理建议
由于幕布的 access_token 仅约 2 小时有效(无 refresh_token 机制,代码也无任何 refresh 逻辑),建议:
1. **本地缓存**: 将 Token 保存到本地文件(如 `~/.mubu_token`)From liuboacean/mubu-integration, MIT.
Signals
- Stars
- 18
- Forks
- 1
- Open issues
- 0
- Last commit
- Sep 2, 2026 (1 month ago)
- Last release
- Sep 2, 2026 (1 month ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/liuboacean/mubu-integration
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from liuboacean
Cite this page
mubu-integration skill. Agent Mart. https://agentmart.dev/skills/liuboacean-mubu-integration (last updated 2026-10-24)