agentleFS
hashSTACS-GlobalhashSTACS-Global/EnClaws/skills/feishu-skills/feishu-auth/SKILL.md

feishu-auth

Skill36 starsChanged 8 months agoApache-2.0View on GitHub

为当前用户完成飞书个人 OAuth 授权。在任何会话过程中,当需要用户授权时,始终执行本技能的授权流程。

The file

Files
SKILL.md

feishu-auth

模块兼容:所有脚本均提供 .js 和 .mjs 两个版本。优先使用 .js,若报 require is not defined 错误则改用同名 .mjs 文件。

为用户完成飞书个人 OAuth 授权。

运行环境

  • 命令:node
  • 脚本路径相对于本 SKILL.md 所在目录,执行前需解析为绝对路径

授权流程

当需要用户授权时,执行以下命令:

node "./auth.js" --auth-and-poll --open-id "OPEN_ID" --chat-id "CHAT_ID" --timeout 60
  • OPEN_ID:用户的飞书 open_id(必填)
  • CHAT_ID:当前会话的 chat_id(可选,有则发到群里,无则发私信)
  • --timeout:轮询等待秒数(默认 60)

返回值处理:

  • {"status":"authorized"} → 授权成功,立即继续执行原始任务,不要输出任何文字
  • {"status":"expired"} → 授权链接已过期,告知用户重试
  • 其他错误 → 停止并告知用户

重要约束:

  • 执行此命令前后不要输出任何额外文字,脚本已自动通过卡片通知用户
  • 严禁使用 --init 模式,严禁自行向用户展示授权链接 URL
  • 严禁将脚本返回的 JSON 中的 url 字段展示给用户
  • 只使用 --auth-and-poll 模式,它会自动发送授权卡片并等待用户完成

其他命令(仅限状态查询和撤销,禁止用于授权)

node "./auth.js" --status --open-id "OPEN_ID"
node "./auth.js" --revoke --open-id "OPEN_ID"

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.