Pinvou/pinvou-agent / pinvou3-app/src-tauri/resources/common/bundle/lark-skills/lark-drive
lark-drive
Verified【何时用:仅当用户明确指向飞书/Lark(发到飞书、飞书文档等)时使用;泛指做个文档或PPT或表格或方案默认走本地工具,不要误用飞书】飞书云空间:管理 Drive 文件/文件夹,上传下载、复制移动删除、评论、权限、密级标签、版本、改标题,导入 Word/Markdown/Excel/CSV/PPTX/.base 为在线文档;doubao.com 云空间 URL 同走本 skill,不回退 WebFetch。不负责:文档内容编辑(lark-doc)、表格/Base 表内数据(lark-sheets/lark-base)、知识库节点(lark-wiki)。
references/lark-drive-member-remove.md
View on GitHub# drive +member-remove(移除协作者权限)
> 这是高风险写操作。真实执行会移除权限,需要核对资源和成员后显式加 `--yes`。
## 命令
```bash
lark-cli drive +member-remove \
--token "<bare_token_or_url>" \
--type docx \
--member-id "ou_xxx" \
--member-type openid \
--yes
```
## 参数
| 参数 | 必填 | 说明 |
|------|------|------|
| `--token` | 是 | 裸 token 或完整 URL。路径支持 `/drive/folder/`、`/docx/`、`/doc/`、`/sheets/`、`/base/`、`/bitable/`、`/wiki/`、`/file/`、`/mindnotes/`、`/slides/`、`/minutes/`、`/page/`;URL 可从路径推断类型,裸 token 必须同时传 `--type`。 |
| `--type` | 条件必填 | 资源类型:`docx` / `doc` / `sheet` / `bitable` / `file` / `folder` / `wiki` / `mindnote` / `slides` / `minutes` / `apps`。完整 URL 可省略。 |
| `--member-id` | 是 | 要移除的单个协作者 ID。逗号分隔的多成员输入会被拒绝;批量场景应逐个调用。 |
| `--member-type` | 是 | ID 类型:`email` / `openid` / `openchat` / `opendepartmentid` / `userid` / `unionid` / `groupid` / `appid` / `wikispaceid`。 |
| `--member-kind` | 条件必填 | 仅 `--member-type=wikispaceid` 使用:未启用知识库成员分组时传 `wiki_space_member`,启用后根据权限传 `wiki_space_viewer` 或 `wiki_space_editor`。 |
| `--perm-type` | 否 | 仅 wiki 协作者使用:`container`(默认,当前页面及子页面)或 `single_page`(仅当前页面)。 |
| `--dry-run` | 否 | 只预览 DELETE URL、query 和 body,不调用接口。 |
| `--yes` | 真实执行时是 | 确认高风险权限移除操作。 |
## 输出
以移除 `openid` 类型的用户协作者为例,成功后返回:
```json
{
"ok": true,
"identity": "user",
"data": {
"removed": true,
"resource_token": "doxcnxxx",
"resource_type": "docx",
"member_id": "ou_xxx",
"member_type": "openid",
"member_kind": "user"
}
}
```
Wiki 普通协作者还会返回 `perm_type`;`wikispaceid` 返回所传的 `member_kind`。
`removed: true` 表示删除请求成功完成,不保证该权限此前一定存在。
## 行为说明
- **身份支持**:支持 `--as user` 和 `--as bot`。
- **应用协作者**:使用 `--member-type=appid`,`--member-id` 传应用 ID(通常为 `cli_xxx`)。
- **部门协作者**:`--member-type=opendepartmentid` 只能配合 `--as user`;bot 身份会在客户端提前拒绝。
- **安全编码**:资源 token 和 member ID 都作为独立 path segment 编码。
- **Wiki 范围**:普通 wiki 协作者默认删除 `container` 权限;只删除当前页面权限时显式传 `single_page`。
- **Wiki 空间成员**:`--member-type=wikispaceid` 仅支持 `--type=wiki`;必须用 `--member-kind` 指明成员角色,并且不能同时传 `--perm-type`。
- **错误处理**:OpenAPI 返回的 typed error 原样透传,可根据错误信封中的 subtype、code、hint 和权限信息处理。
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| deprecation-and-migrationaddyosmani/agent-skillsManages deprecation and migration. Use when removing old systems, APIs, or features. Use when migrating users from one implementation to another. Use when migrating a database schema in production, such as renaming or dropping a column without downtime (expand/contract). Use when deciding whether to maintain or sunset existing code. | Stars: 119k | Updated | Claude CodeCodex | Verified | Install |
| performance-optimizationaddyosmani/agent-skillsOptimizes application performance across frontend, backend, queries, and databases. Use when performance requirements exist, when you suspect performance regressions, when Core Web Vitals or load times need improvement, when N+1 query patterns need fixing, or when profiling reveals bottlenecks. | Stars: 119k | Updated | Claude CodeCodex | Verified | Install |
| agent-cost-reportthedotmack/claude-memBelievable agent cost report for any period, default the last 7 full days PT, not counting today. Measured tokens from Claude Code transcripts priced at OpenRouter list prices (ESTIMATED), measured provider spend when a sanctioned source exists, note-taker cost separate, Timing-style HTML/PDF plus report.json, line-items.csv, evidence.json. | Stars: 118k | Updated | Claude CodeCodex | Verified | Install |
| agent-cost-reportthedotmack/claude-memBelievable agent cost report for any period, default the last 7 full days PT, not counting today. Measured tokens from Claude Code transcripts priced at OpenRouter list prices (ESTIMATED), measured provider spend when a sanctioned source exists, note-taker cost separate, Timing-style HTML/PDF plus report.json, line-items.csv, evidence.json. | Stars: 118k | Updated | Claude CodeCodex | Verified | Install |