SkillsGrove
SkillsGrove/Продуктивность/wulaosiji/skills/feishu-doc-creator-with-permission

feishu-doc-creator-with-permission

Установка

$npx skills add https://github.com/wulaosiji/skills --skill feishu-doc-creator-with-permission
$git clone --depth 1 https://github.com/wulaosiji/skills.git /tmp/skills && mkdir -p ~/.claude/skills && cp -r /tmp/skills/feishu-doc-orchestrator/feishu-doc-creator-with-permission ~/.claude/skills/feishu-doc-creator-with-permission
Пожалуйста, установи для меня этот Agent Skill: https://github.com/wulaosiji/skills/tree/d733e1308915dcdcc52c9594853b10f497e7a4a0/feishu-doc-orchestrator/feishu-doc-creator-with-permission — сначала прочитай его SKILL.md и скрипты и устанавливай в мою папку навыков только после того, как убедишься, что он безопасен.

Кратко

Исходное описание · MIT文档创建+权限管理子技能 / Feishu doc creator with permission sub-skill. 在飞书创建文档并自动完成权限分配(添加协作者+转移所有权),两步原子操作。 Use when: "创建飞书文档带权限", "create feishu doc with permission", "添加协作者", "add collaborator", "转移所有权", "transfer ownership", "文档权限分配", "doc permission assignment". 内部组件,由 feishu-doc-orchestrator 编排调用,确保每次创建都正确分配权限。Cross-references: feishu-doc-orchestrator, feishu-doc-perm, feishu-block-adder. Built by UniqueClub 🌐 https://uniqueclub.ai
Приведённый ниже SKILL.md воспроизведён из wulaosiji/skills (коммит d733e13) под лицензией MIT. Текст не изменён; опущены только метаданные заголовка файла, изображения показаны как ссылки, а очень длинные файлы сокращены. Авторские права: 2025 Feishu Document Creation Skill. Лицензия: feishu-doc-orchestrator/LICENSE. Показан только файл с инструкциями; скрипты смотрите в исходном репозитории.

Feishu Doc Creator with Permission (Sub-skill)

在飞书创建新文档,并自动完成完整权限管理流程(添加协作者 + 转移所有权),确保用户获得完全控制权。内部组件。

When to Use

Use this skill when:

  • 需要创建飞书文档并确保用户获得完全控制权时
  • 需要在创建文档后自动添加协作者权限时
  • 需要将文档所有权转移给用户时

Do NOT use this skill if:

  • 需要独立创建文档而不需要权限管理 → use feishu-doc-creator instead
  • 需要管理已有文档的权限 → use feishu-doc-perm instead
  • 需要创建到知识库 → use feishu-wiki-orchestrator (parent) instead

Typical triggers:

  • 「创建文档并分配权限」「转移文档所有权」
  • "create doc with permission", "transfer document ownership"

Workflow

  1. 探查 (Probe) 确认文档标题(必需)和 Markdown 文件路径(可选,用于确定标题)。

  2. 约束 (Constrain) 创建文档和权限管理是强关联操作,必须合并执行。只有 tenant_token 可以添加协作者,只有 user_token 可以转移所有权。不降级——权限分配失败时报告错误,不创建无权限文档。

  3. 执行 (Execute) 三步原子操作:

  4. 创建文档:使用 tenant_access_token 创建新文档,应用成为创建者

  5. 添加协作者权限:使用 tenant_access_token 添加协作者,用户获得编辑权限

  6. 转移所有权:使用 user_access_token 转移所有权,用户获得完全控制权

python scripts/doc_creator_with_permission.py "文档标题" output
  1. 验证 (Verify) 检查权限状态:collaborator_added 和 owner_transferred 均为 true,确认 user_has_full_control。

  2. 交付 (Deliver) 保存文档信息和权限状态到 output/doc_with_permission.json。

Output

{
  "document_id": "U2wNd2rMkot6fzxr67ScN7hJn7c",
  "document_url": "https://feishu.cn/docx/U2wNd2rMkot6fzxr67ScN7hJn7c",
  "title": "文档标题",
  "created_at": "2026-01-22T10:30:00",
  "permission": {
    "collaborator_added": true,
    "owner_transferred": true,
    "user_has_full_control": true,
    "collaborator_id": "ou_xxx"
  }
}

Guardrails

Anti-patterns

  • NEVER 只创建文档而不分配权限(用户将看不到文档)
  • Do NOT 跳过所有权转移(用户可编辑但无法删除)
  • Do NOT 使用错误的 token 类型:添加协作者必须用 tenant_token,转移所有权必须用 user_token

Constraints

  • 权限管理的必要性:应用创建的文档用户默认无权限 → 添加协作者后可编辑但无法删除 → 转移所有权后获得完全控制权
  • 只传递文件路径,不传递内容
  • 输出给 feishu-block-adder、feishu-doc-verifier、feishu-logger

Related Skills

  • feishu-doc-orchestrator (parent) — 主编排技能,调用本子技能
  • feishu-doc-perm — 管理已有文档的权限
  • feishu-block-adder — 下游:向创建的文档添加块

About UniqueClub

Part of the UniqueClub toolkit. 🌐 https://uniqueclub.ai

Полный текст лицензии (MIT)
MIT License

Copyright (c) 2025 Feishu Document Creation Skill

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.