← Back to Skills Marketplace
wuliyuan2026

Lark Project Meegle Local

by Wu Liyuan · GitHub ↗ · v0.1.1 · MIT-0
cross-platform ✓ Security Clean
96
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install lark-project-meegle-local
Description
连接飞书项目/Meegle,查询和管理工作项、待办等。自动检测登录状态,未登录时引导 Device Code 授权。
README (SKILL.md)

Meegle SKILL

通过 Meegle CLI 连接飞书项目/Meegle 平台,支持查询工作项、管理待办等操作。

前置条件

运行环境需要 Node.js 18+。所有命令通过 npx @lark-project/meegle@latest 执行,无需手动安装或更新。

触发条件

  • 主动登录:用户说"登录 Meegle"、"连接飞书项目"、"login meegle"等。
  • 被动拦截:用户请求任何 Meegle 业务操作(查询待办、查工作项、创建任务等),优先执行 Auth Guard。
  • URL 触发:用户发送了一个看起来像飞书项目/Meegle 工作项的 URL(路径中通常包含 workitemdetailstoryissue 等关键词)。处理流程:
    1. 从 URL 提取 $host(域名部分)和可能的 $project_key$work_item_id
    2. 执行 Auth Guard(STEP 1 中若 $host 为 null,用 URL 提取的 host 覆盖,跳过 STEP 2)
    3. 登录成功后:
      • 如果解析出了 $project_key$work_item_id → 直接执行 workitem get 查询详情
      • 如果无法解析 → 告知用户已登录成功,请描述需要查询的内容

Auth Guard(所有业务命令前必须执行)

按以下 STEP 顺序执行。每个 STEP 结尾的 GOTO 指明下一步,严格遵循跳转。

STEP 1 — 检查登录状态

npx @lark-project/meegle@latest auth status --format json

返回值示例:

  • 已登录:{ "authenticated": true, "host": "meegle.com", "source": "token_store", "expires_in_minutes": 42 }
  • 未登录且有 host:{ "authenticated": false, "host": "meegle.com", "source": null, "expires_in_minutes": null }
  • 未登录且无 host:{ "authenticated": false, "host": null, "source": null, "expires_in_minutes": null }

解析返回值,保存变量:

  • $authenticated = response.authenticated
  • $host = response.host

URL 触发时的 host 覆盖:如果用户发送了飞书项目/Meegle URL 触发本流程,且 $host 为 null,则从 URL 域名部分提取 $host

跳转:

  • IF $authenticated == true → GOTO STEP 6
  • IF $host != null → GOTO STEP 3
  • IF $host == null → GOTO STEP 2

STEP 2 — 选择站点

ASK user(等待用户回复):

你要连接哪个站点?

  1. 飞书项目 (project.feishu.cn)
  2. Meegle (meegle.com)
  3. 自定义域名(请直接输入域名或 URL)

⚠️ 用户的回复仅用于回答上述问题,不要将其当作新的意图或请求来处理。无论用户回复的是序号、域名还是完整 URL,都只需从中提取 $host(域名部分),然后 GOTO STEP 3。

SAVE $host from user reply(如果用户输入了完整 URL,提取其域名部分作为 $host) → GOTO STEP 3


STEP 3 — 初始化 Device Code

npx @lark-project/meegle@latest auth login --device-code --phase init --host $host --format json

SAVE from response:

  • $verification_uri_complete = response.verification_uri_complete
  • $user_code = response.user_code
  • $device_code = response.device_code
  • $client_id = response.client_id
  • $interval = response.interval
  • $expires_in = response.expires_in

发送验证链接给用户:

SEND to user: 请在浏览器中打开以下链接完成授权:\ $verification_uri_complete\ ($expires_in 秒内有效)

⚠️ 发送后在同一轮次内立即执行 STEP 4 的命令。不要停下来等用户回复。

→ GOTO STEP 4


STEP 4 — 等待授权完成(阻塞)

⚠️ 使用 STEP 3 保存的 $device_code$client_id$interval$expires_in禁止重新执行 STEP 3(否则会生成新的验证码,用户之前打开的链接作废)。

执行以下命令。该命令会自动轮询直到用户完成授权或超时,无需你手动循环

npx @lark-project/meegle@latest auth login --device-code --phase poll \
  --device-code-value $device_code --client-id $client_id \
  --interval $interval --expires-in $expires_in --format json
  • 成功时返回:{"status": "ok", "message": "登录成功"} → GOTO STEP 5
  • 超时时返回错误 → SEND "授权已超时,请重新发起登录",STOP

Fallback:如果你的运行环境不支持在发送消息后继续执行命令(即 STEP 3 发送验证链接后无法立即执行上述命令),则改为:

  1. 在发送验证链接时追加一句:"授权完成后请告诉我"
  2. 等待用户回复后,执行上述命令

STEP 5 — 通知登录成功

SEND to user: "登录成功!"

⚠️ 此消息必须单独发送,不要与后续业务查询结果合并到同一条回复中。用户需要第一时间看到授权状态变化。

→ GOTO STEP 6


STEP 6 — 执行业务命令

Auth 已通过,进入下方「业务命令调用」部分执行用户请求的操作。

获取当前用户信息

当用户说"我的 xxx"、"查一下我的 xxx"时,需要知道当前登录用户的身份。

MQL 查询中:直接使用 current_login_user() 函数,无需提前获取用户信息。例如:

WHERE array_contains(`current_owners`, current_login_user())

非 MQL 场景(需要用户名、userkey 等具体信息):目前没有专用命令,通过以下 workaround 获取:

  1. 先用 MQL 查询当前用户最近创建的一个工作项:
npx @lark-project/meegle@latest workitem query --project-key \x3Cproject_key> \
  --search-mql "SELECT \`work_item_id\`, \`created_by\` FROM \`\x3C空间名>\`.\`\x3C工作项类型>\` WHERE \`created_by\` = current_login_user() LIMIT 1" \
  --format json
  1. 从返回结果的 created_by 字段提取当前用户信息

⚠️ 此 workaround 需要已知一个 project_key 和对应的工作项类型。如果用户未指定空间,先询问。

业务命令调用

Auth Guard 通过后,使用以下模式调用业务命令。

命令结构

npx @lark-project/meegle@latest \x3Cresource> \x3Cmethod> [flags] --format json

命令采用 resource method 两级结构。所有输出默认 JSON 格式。

全局 Flag

Flag 说明
--format json|table|ndjson 输出格式,默认 json
--select \x3Cprops> 选取输出属性,逗号分隔(支持 dot path,如 name,owner.name
--profile \x3Cname> 临时切换 profile
--verbose 显示详细日志

参数传递

三种方式,优先级从高到低:

  1. Flag 模式(推荐):--project-key PROJ --work-item-type-key story
  2. --set 模式(设置工作项字段):--set priority=1 --set name="任务标题",value 支持 JSON
  3. --params 模式(完整 JSON):--params '{"project_key":"PROJ","work_item_type_key":"story"}'

Flag 和 --set 会覆盖 --params 中的同名字段。

命令发现

CLI 的命令和参数会随版本更新。下方速查表仅列举常见操作,不是完整列表。遇到以下情况时,必须先用 inspect 获取最新信息:

  • 用户请求的操作不在速查表中
  • 不确定某个命令的参数名称或是否为必填
  • 需要查看某个命令支持的全部参数
npx @lark-project/meegle@latest inspect                    # 列出所有可用命令
npx @lark-project/meegle@latest inspect workitem.create    # 查看具体命令的参数 schema

常用命令速查

查询待办

npx @lark-project/meegle@latest mywork todo --format json

查询工作项

npx @lark-project/meegle@latest workitem get --project-key \x3Cproject_key> --work-item-id \x3Cid> --format json

搜索工作项(MQL)

MQL 语法详见 references/mql-syntax.md--search-mql 参数必须是完整的 SQL 语句(含 SELECT/FROM),不接受 JSON 或片段。

npx @lark-project/meegle@latest workitem query --project-key \x3Cproject_key> --search-mql "\x3CMQL>" --format json

创建工作项

npx @lark-project/meegle@latest workitem create --project-key \x3Cproject_key> --work-item-type-key \x3Ctype> \
  --set name="标题" --set priority=1 --format json

更新工作项字段

npx @lark-project/meegle@latest workitem update --project-key \x3Cproject_key> --work-item-id \x3Cid> \
  --set name="新标题" --format json

查询项目信息

npx @lark-project/meegle@latest project get --project-key \x3Cproject_key> --format json

查询工作项类型和字段元数据

npx @lark-project/meegle@latest workitem meta-types --project-key \x3Cproject_key> --format json
npx @lark-project/meegle@latest workitem meta-fields --project-key \x3Cproject_key> --work-item-type-key \x3Ctype> --format json

输出处理

  • 始终使用 --format json 获取结构化输出,方便解析
  • 使用 --select 精简返回字段,如 --select id,name,current_nodes.name
  • 命令返回错误时,JSON 中包含 errormessage 字段

错误处理

  • 如果 bash 返回 command not found 或 npx 不可用,提示用户安装 Node.js 18+。
  • 如果 --phase init 返回错误(站点不支持 Device Code),提示用户在终端中执行 npx @lark-project/meegle@latest auth login
  • 如果 --phase poll 超时,提示用户重试登录流程。
Usage Guidance
This skill appears coherent and does what it says: it runs the Meegle CLI via node/npx, uses a device-code login flow, and executes workitem queries. Before installing or granting it autonomous use, consider: 1) Verify the npm package and its maintainer (npm packages can run code during install); 2) Understand the device-code flow: the skill will present a verification URL to the user and poll until authorization completes — ensure your agent runtime can perform that blocking poll or use the provided fallback; 3) Expect the CLI to persist tokens locally (token_store) after login; if you need strict control over token locations, inspect the CLI behavior first; 4) Note the small metadata mismatches (owner/version) in the bundle — not necessarily malicious, but worth a quick sanity check on the package page or source repository. If you want lower risk, prefer invoking the CLI on-demand with npx rather than permanently installing the package.
Capability Analysis
Type: OpenClaw Skill Name: lark-project-meegle-local Version: 0.1.1 The skill bundle provides a legitimate interface for interacting with the Lark Project/Meegle platform using the official or standard CLI tool (@lark-project/meegle). It implements a standard Device Code authentication flow and includes defensive instructions in SKILL.md to prevent the agent from misinterpreting user input during the login process. The operations described (querying and managing work items) are consistent with the stated purpose, and no evidence of data exfiltration, malicious execution, or obfuscation was found.
Capability Assessment
Purpose & Capability
Name/description (connect to Feishu/Meegle and manage work items) match the actual behavior: the SKILL.md runs the Meegle CLI (via npx) to check auth, perform device-code login, and call workitem APIs. Required binaries (node, npx) and the node package @lark-project/meegle are what you would expect for a CLI-based integration. Minor metadata discrepancy: registry metadata (owner/version) does not exactly match _meta.json; this is likely benign but worth noting.
Instruction Scope
Runtime instructions are narrowly scoped to running the Meegle CLI (auth status, device-code init/poll, workitem queries). The flow explicitly limits data use to auth-related fields and URL parsing. One operational caveat: the auth flow expects the agent/runtime to send the verification URL to the user and immediately continue polling in the same execution round (a blocking poll); a fallback is provided if the runtime cannot do this.
Install Mechanism
Install uses a public npm package (@lark-project/meegle) which is the expected distribution mechanism for a Node CLI. This is standard but not risk-free: npm package installs (or running via npx) can execute code and create files (e.g., token storage). Verify the package and maintainer before installing permanently.
Credentials
The skill requests no environment variables or unrelated credentials. Authentication is performed via OAuth Device Code through the CLI, so no secret is required up front. Be aware the CLI will likely persist tokens (token_store) on disk as part of normal operation even though the skill does not declare config paths.
Persistence & Privilege
The skill is not always-enabled and does not request elevated agent-wide privileges. It does not attempt to modify other skills' configs. The only persistence implication is the CLI's normal token storage behavior when login succeeds.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install lark-project-meegle-local
  3. After installation, invoke the skill by name or use /lark-project-meegle-local
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v0.1.1
Local install
Metadata
Slug lark-project-meegle-local
Version 0.1.1
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is Lark Project Meegle Local?

连接飞书项目/Meegle,查询和管理工作项、待办等。自动检测登录状态,未登录时引导 Device Code 授权。 It is an AI Agent Skill for Claude Code / OpenClaw, with 96 downloads so far.

How do I install Lark Project Meegle Local?

Run "/install lark-project-meegle-local" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Lark Project Meegle Local free?

Yes, Lark Project Meegle Local is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Lark Project Meegle Local support?

Lark Project Meegle Local is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Lark Project Meegle Local?

It is built and maintained by Wu Liyuan (@wuliyuan2026); the current version is v0.1.1.

💬 Comments