Skip to content
Agentmart
Submit a tool

feishu-perm

飞书文档权限管理。用于添加/移除协作者、设置公开分享、检查访问级别。当用户提到分享(分享/共享)、权限、协作者、访问控制、链接分享、「把文档分享给XX」时触发。注意:创建/编辑文档内容用 feishu-doc。

Skill by MidnightV1

IndexedMIT
Write a review

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/midnightv1-feishu-perm

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.

We use your email only for this newsletter. Privacy

About

飞书文档权限管理。用于添加/移除协作者、设置公开分享、检查访问级别。当用户提到分享(分享/共享)、权限、协作者、访问控制、链接分享、「把文档分享给XX」时触发。注意:创建/编辑文档内容用 feishu-doc。

Use cases: documents

No 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. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found
Runs as
Python package

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/feishu-perm

What's inside

Skill name
feishu-perm
Description
飞书文档权限管理。用于添加/移除协作者、设置公开分享、检查访问级别。当用户提到分享(分享/共享)、权限、协作者、访问控制、链接分享、「把文档分享给XX」时触发。注意:创建/编辑文档内容用 feishu-doc。
License
MIT
Instructions
99 lines in SKILL.md · view on GitHub

Before installing

  • Ships executable scripts

Agent Skills spec issues

  • name: "feishu-perm" does not match folder "feishu_perm"

Files (4)

  • SKILL.md
  • __init__.py
  • __init__.py · lib/
  • perm_ops.py · lib/

SKILL.md (first lines)

# Feishu Permission Manager

管理文档/文件权限——添加协作者、设置公开链接分享、查看访问级别。

**边界**:feishu-perm 管理"谁能访问",feishu-doc 管理文档内容本身。转移所有权走 feishu-doc 的 `transfer_owner`。

---

## CLI 调用方式

```bash
cd ~/Agent\ Space/agentic-feishu && python3 tools/builtin/skill_perm.py <action> --params '<json>'
```

示例:
```bash
python3 tools/builtin/skill_perm.py list --params '{"doc_token": "xxx"}'
```

## Actions

调用方式:`python3 tools/builtin/skill_perm.py <action> --params '<json>'`

| Action | 说明 | 必填参数 | 可选参数(含默认值) |
|--------|------|----------|----------------------|
| `list` | 列出文档所有协作者及权限级别 | `doc_token` | `doc_type="docx"` |
| `get_sharing` | 获取当前公开分享设置 | `doc_token` | `doc_type="docx"` |
| `add` | 添加协作者 | `doc_token`, `member_id` | `perm="full_access"`, `member_type="openid"`, `doc_type="docx"` |
| `remove` | 移除协作者(不可逆) | `doc_token`, `member_id` | `member_type="openid"`, `doc_type="docx"` |
| `set_sharing` | 设置链接分享模式 | `doc_token` | `link_share_entity="tenant_readable"`, `doc_type="docx"` |

---

## Permission Levels (`perm`)

| 值 | 说明 |
|----|------|
| `view` | 只读 |
| `edit` | 可编辑 |
| `comment` | 可评论 |
| `full_access` | 完全控制(可管理权限) |

---

## Doc Types (`doc_type`)

有效值:`docx`、`sheet`、`bitable`、`folder`、`file`、`mindnote`、`slides`、`wiki`

`doc_type` 必须与文档实际类型匹配,否则 API 返回错误。

---

## Member Types (`member_type`)

| 值 | 说明 |
|----|------|
| `openid`(默认) | 用户 open_id |
| `userid` | 用户 user_id |
| `chatid` | 群组 ID |
| `departmentid` | 部门 ID |

`member_type` 决定 `member_id` 的解释方式,必须与实际 ID 类型一致。

---

## Link Sharing Options (`link_share_entity`)

| 值 | 说明 |
|----|------|
| `tenant_readable` | 组织内可查看(默认) |
| `tenant_editable` | 组织内可编辑 |
| `anyone_readable` | 链接可查看 |
| `anyone_editable` | 链接可编辑 |
| `closed` | 仅协作者可访问 |

---

## Coded Behaviors

- **枚举校验**:`perm`、`member_type`、`doc_type`、`link_share_entity` 传入无效值时抛出 `ValueError`,message 说明有效值列表。
- `member_type` 影响 `member_id` 的解释方式,两者必须一致。
- `doc_type` 必须与文档实际类型匹配。
- Bot 需要 `drive:permission` 和 `drive:permission:readonly` scope。

---

## Examples

```python
feishu_perm("list", {"doc_token": "xxx", "doc_type": "docx"})

feishu_perm("add", {"doc_token": "xxx", "member_id": "ou_yyy", "perm": "edit", "doc_type": "docx"})

feishu_perm("remove", {"doc_token": "xxx", "member_id": "ou_yyy"})

feishu_perm("set_sharing", {"doc_token": "xxx", "link_share_entity": "anyone_readable", "doc_type": "sheet"})
```

From MidnightV1/agentic-feishu, MIT.

More from MidnightV1/agentic-feishu

Signals

Stars
0
Forks
0
Open issues
0
Last commit (this folder)
Mar 25, 2026 (7 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from MidnightV1

Cite this page

feishu-perm skill. Agent Mart. https://agentmart.dev/skills/midnightv1-feishu-perm (last updated 2026-10-24)