Feishu doc creator with permission

From wulaosiji/skills · View interactive version

Feishu doc creator with permission is an AI agent skill from the GitHub repository wulaosiji/skills. 文档创建+权限管理子技能 / Feishu doc creator with permission sub-skill. 在飞书创建文档并自动完成权限分配(添加协作者+转移所有权),两步原子操作。 Use when: "创建飞书文档带权限", "create feishu doc with permission", "添加协作者", "add collaborator", "转移所有权", "transfer ownership", "文档权限分配", "doc permission assignment". 内部组件,由 feishu-doc-orchestrator 编排调用,确保每次创建

How to use this skill

Skill file

Feishu Doc Creator with Permission (Sub-skill)

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

When to Use

Use this skill when:

Do NOT use this skill if:

Typical triggers:

Workflow

  1. 探查 (Probe)

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

  1. 约束 (Constrain)

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

  1. 执行 (Execute)

三步原子操作:

  1. 创建文档:使用 tenant_access_token 创建新文档,应用成为创建者
  2. 添加协作者权限:使用 tenant_access_token 添加协作者,用户获得编辑权限
  3. 转移所有权:使用 user_access_token 转移所有权,用户获得完全控制权
python scripts/doc_creator_with_permission.py "文档标题" output
  1. 验证 (Verify)

检查权限状态:collaborator_added 和 owner_transferred 均为 true,确认 user_has_full_control。

  1. 交付 (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

Constraints

Related Skills

About UniqueClub

Part of the UniqueClub toolkit.

🌐 https://uniqueclub.ai

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.