$npx -y skills add SafeAI-Lab-X/ClawKeeper --skill feishu-permFeishu permission management for documents and files. Activate when user mentions sharing, permissions, collaborators.
| 1 | # Feishu Permission Tool |
| 2 | |
| 3 | Single tool `feishu_perm` for managing file/document permissions. |
| 4 | |
| 5 | ## Actions |
| 6 | |
| 7 | ### List Collaborators |
| 8 | |
| 9 | ```json |
| 10 | { "action": "list", "token": "ABC123", "type": "docx" } |
| 11 | ``` |
| 12 | |
| 13 | Returns: members with member_type, member_id, perm, name. |
| 14 | |
| 15 | ### Add Collaborator |
| 16 | |
| 17 | ```json |
| 18 | { |
| 19 | "action": "add", |
| 20 | "token": "ABC123", |
| 21 | "type": "docx", |
| 22 | "member_type": "email", |
| 23 | "member_id": "user@example.com", |
| 24 | "perm": "edit" |
| 25 | } |
| 26 | ``` |
| 27 | |
| 28 | ### Remove Collaborator |
| 29 | |
| 30 | ```json |
| 31 | { |
| 32 | "action": "remove", |
| 33 | "token": "ABC123", |
| 34 | "type": "docx", |
| 35 | "member_type": "email", |
| 36 | "member_id": "user@example.com" |
| 37 | } |
| 38 | ``` |
| 39 | |
| 40 | ## Token Types |
| 41 | |
| 42 | | Type | Description | |
| 43 | | ---------- | ----------------------- | |
| 44 | | `doc` | Old format document | |
| 45 | | `docx` | New format document | |
| 46 | | `sheet` | Spreadsheet | |
| 47 | | `bitable` | Multi-dimensional table | |
| 48 | | `folder` | Folder | |
| 49 | | `file` | Uploaded file | |
| 50 | | `wiki` | Wiki node | |
| 51 | | `mindnote` | Mind map | |
| 52 | |
| 53 | ## Member Types |
| 54 | |
| 55 | | Type | Description | |
| 56 | | ------------------ | ------------------ | |
| 57 | | `email` | Email address | |
| 58 | | `openid` | User open_id | |
| 59 | | `userid` | User user_id | |
| 60 | | `unionid` | User union_id | |
| 61 | | `openchat` | Group chat open_id | |
| 62 | | `opendepartmentid` | Department open_id | |
| 63 | |
| 64 | ## Permission Levels |
| 65 | |
| 66 | | Perm | Description | |
| 67 | | ------------- | ------------------------------------ | |
| 68 | | `view` | View only | |
| 69 | | `edit` | Can edit | |
| 70 | | `full_access` | Full access (can manage permissions) | |
| 71 | |
| 72 | ## Examples |
| 73 | |
| 74 | Share document with email: |
| 75 | |
| 76 | ```json |
| 77 | { |
| 78 | "action": "add", |
| 79 | "token": "doxcnXXX", |
| 80 | "type": "docx", |
| 81 | "member_type": "email", |
| 82 | "member_id": "alice@company.com", |
| 83 | "perm": "edit" |
| 84 | } |
| 85 | ``` |
| 86 | |
| 87 | Share folder with group: |
| 88 | |
| 89 | ```json |
| 90 | { |
| 91 | "action": "add", |
| 92 | "token": "fldcnXXX", |
| 93 | "type": "folder", |
| 94 | "member_type": "openchat", |
| 95 | "member_id": "oc_xxx", |
| 96 | "perm": "view" |
| 97 | } |
| 98 | ``` |
| 99 | |
| 100 | ## Configuration |
| 101 | |
| 102 | ```yaml |
| 103 | channels: |
| 104 | feishu: |
| 105 | tools: |
| 106 | perm: true # default: false (disabled) |
| 107 | ``` |
| 108 | |
| 109 | **Note:** This tool is disabled by default because permission management is a sensitive operation. Enable explicitly if needed. |
| 110 | |
| 111 | ## Permissions |
| 112 | |
| 113 | Required: `drive:permission` |