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

feishu-quick-setup

Skill36 starsChanged 8 months agoApache-2.0View on GitHub

One-click Feishu bot creation. Uses the Feishu App Registration API (Device Flow) to create a new Feishu Bot and save credentials to the OpenClaw config file. Trigger when the user says "配置飞书", "安装飞书插件", "setup feishu", "创建飞书应用", etc. For users who have not yet configured appId/appSecret. Note: this skill creates a NEW Feishu app — it is different from feishu-auth (OAuth user authorization).

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 3 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Create a Feishu Bot for the user by executing the commands below step by step.

    line 16
  2. Distinctive:

    After showing the link, proceed directly to Step 4 (no need to wait for user reply).

    line 58
  3. Distinctive:

    Always use the commands above.

    line 90
  4. Very specific:

    Always show the verificationUrl exactly as returned by the script.

    line 93

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

feishu-quick-setup

Module compatibility: Scripts are provided in both .js and .mjs. Prefer .mjs; if you get a module error, fall back to .js.

Create a Feishu Bot for the user by executing the commands below step by step. All script output is single-line JSON.

Runtime

  • Command: node
  • Resolve script paths relative to this SKILL.md directory to absolute paths before execution.

Steps

Step 1 — Check existing config

node "{script_dir}/quick-setup.mjs" --status
FieldAction
configured: trueTell the user Feishu is already configured (show appId), ask if they want to reconfigure
configured: falseProceed to Step 2

Step 2 — Start registration

node "{script_dir}/quick-setup.mjs" --begin --domain "feishu"
  • --domain: feishu (mainland China, default) or lark (international)
  • On error: false — you get verificationUrl and deviceCode. Proceed to Step 3.
  • On error: true — show the error message to the user and stop.

Step 3 — Show the link

Display the verificationUrl from Step 2 to the user as-is:

请点击以下链接完成飞书授权: {verificationUrl}

点击后在飞书中点击"确认创建"即可。

The correct link format is https://open.feishu.cn/page/openclaw?user_code=.... Do not modify or reconstruct the URL. This flow uses a link, not a QR code.

After showing the link, proceed directly to Step 4 (no need to wait for user reply).

Step 4 — Poll for completion

node "{script_dir}/quick-setup.mjs" --poll --wait --timeout 300

The script polls internally every 5 seconds until the user completes authorization or the timeout (default 5 min) is reached.

ResultAction
status: "completed"Take appId and appSecret from the response, proceed to Step 5
status: "error", expired_tokenLink expired — restart from Step 2
status: "error", access_deniedUser denied the request — inform the user
status: "timeout"Timed out — suggest the user retry

Step 5 — Save config

node "{script_dir}/quick-setup.mjs" --save --app-id "APP_ID" --app-secret "APP_SECRET" --domain "feishu"

Replace APP_ID and APP_SECRET with the values from Step 4.

ResultAction
success: trueShow the message field from the response to the user (it contains next-step instructions and a permissions link)
success: falseShow the failure reason to the user

Notes

  • Always use the commands above; do not call Feishu APIs directly or construct URLs manually.
  • This skill creates a new app. For user-level OAuth on an existing app, use feishu-auth instead.
  • Execute each step — do not skip steps or only describe them.
  • Always show the verificationUrl exactly as returned by the script.

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.