lark-im
飛書(Lark)のチャット機能を使って、メッセージの送受信や検索、グループチャットの管理、ファイルの送受信、リアクションの管理など、ビジネスコミュニケーションに必要な機能を日本語でスムーズに実行するSkill。
📜 元の英語説明(参考)
飞书即时通讯:收发消息和管理群聊。发送和回复消息、搜索聊天记录、管理群聊成员、上传下载图片和文件、管理表情回复。当用户需要发消息、查看或搜索聊天记录、下载聊天中的文件、查看群成员时使用。
🇯🇵 日本人クリエイター向け解説
飛書(Lark)のチャット機能を使って、メッセージの送受信や検索、グループチャットの管理、ファイルの送受信、リアクションの管理など、ビジネスコミュニケーションに必要な機能を日本語でスムーズに実行するSkill。
※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o lark-im.zip https://jpskill.com/download/19581.zip && unzip -o lark-im.zip && rm lark-im.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/19581.zip -OutFile "$d\lark-im.zip"; Expand-Archive "$d\lark-im.zip" -DestinationPath $d -Force; ri "$d\lark-im.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
lark-im.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
lark-imフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-18
- 取得日時
- 2026-05-18
- 同梱ファイル
- 13
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
im (v1)
重要 — 開始前に必ず Read ツールで ../lark-shared/SKILL.md を読み込んでください。これには認証、権限処理が含まれています。
コアコンセプト
- Message: チャット内の単一のメッセージで、
message_id(om_xxx) で識別されます。テキスト、投稿、画像、ファイル、音声、動画、スタンプ、インタラクティブ (カード)、チャット共有、ユーザー共有、マージ転送などのタイプをサポートしています。 - Chat: グループチャットまたはP2P会話で、
chat_id(oc_xxx) で識別されます。 - Thread: メッセージの下にある返信スレッドで、
thread_id(om_xxx または omt_xxx) で識別されます。 - Reaction: メッセージに対する絵文字リアクションです。
リソースの関係
Chat (oc_xxx)
├── Message (om_xxx)
│ ├── Thread (返信スレッド)
│ ├── Reaction (絵文字)
│ └── Resource (画像 / ファイル / 動画 / 音声)
└── Member (ユーザー / ボット)
重要な注意事項
IDとトークンのマッピング
--as userはユーザーIDを意味し、user_access_tokenを使用します。呼び出しは認証されたエンドユーザーとして実行されるため、権限はアプリのスコープと、そのユーザーがターゲットのチャット/メッセージ/リソースにアクセスできるかどうかの両方に依存します。--as botはボットIDを意味し、tenant_access_tokenを使用します。呼び出しはアプリのボットとして実行されるため、動作はボットのメンバーシップ、アプリの可視性、利用範囲、およびボット固有のスコープに依存します。- IM API が
userとbotの両方をサポートしている場合、トークンタイプによってオペレーターが変わります。所有者/管理者ステータス、チャットメンバーシップ、テナント境界、またはアプリの可用性が現在の呼び出し元に対してチェックされるため、同じAPIが一方のIDでは成功し、もう一方では失敗する可能性があります。
ボットIDによる送信者名の解決
ボットID (--as bot) を使用してメッセージを取得する場合 (例: +chat-messages-list、+threads-messages-list、+messages-mget)、送信者名が解決されない (表示名ではなく open_id として表示される) ことがあります。これは、ボットがユーザーの連絡先情報にアクセスできない場合に発生します。
根本原因: ボットのアプリの可視性設定にメッセージ送信者が含まれていないため、連絡先APIが名前を返しません。
解決策: Lark Developer Console でアプリの可視性設定を確認し、アプリの表示範囲が名前を解決する必要があるユーザーをカバーしていることを確認してください。または、--as user を使用してユーザーIDでメッセージを取得すると、通常、より広範な連絡先アクセスが可能です。
カードメッセージ (インタラクティブ)
カードメッセージ (interactive タイプ) は、イベントサブスクリプションでのコンパクトな変換がまだサポートされていません。代わりに生のイベントデータが返され、stderr にヒントが出力されます。
ショートカット(推奨優先使用)
Shortcut は、常用操作に対する高度なカプセル化です(lark-cli im +<verb> [flags])。Shortcut がある操作は優先的に使用してください。
| ショートカット | 説明 |
|---|---|
+chat-create |
ボットIDでグループチャットを作成します。ボットのみ。プライベート/パブリックチャットを作成し、ユーザー/ボットを招待し、オプションでボットマネージャーを設定します。 |
+chat-messages-list |
チャットまたはP2P会話のメッセージを一覧表示します。ユーザー/ボット。--chat-id または --user-id を受け入れ、P2P chat_id を解決し、時間範囲/ソート/ページネーションをサポートします。 |
+chat-search |
キーワードやメンバーの open_id で表示可能なグループチャットを検索します (例: グループ名で chat_id を検索)。ユーザー/ボット。メンバー/タイプフィルター、ソート、ページネーションをサポートします。 |
+chat-update |
グループチャットの名前または説明を更新します。ユーザー/ボット。チャットの名前または説明を更新します。 |
+messages-mget |
IDでメッセージを一括取得します。ユーザー/ボット。最大50個の om_ メッセージIDを取得し、送信者名をフォーマットし、スレッドの返信を展開します。 |
+messages-reply |
ボットIDでメッセージに返信します (スレッド返信をサポート)。ボットのみ。テキスト/マークダウン/投稿/メディア返信、スレッド内返信、冪等性キーをサポートします。 |
+messages-resources-download |
メッセージから画像/ファイルをダウンロードします。ユーザー/ボット。message-id と file-key で画像/ファイルリソースを安全な相対出力パスにダウンロードします。 |
+messages-search |
ユーザーIDでチャット全体を横断してメッセージを検索します (キーワード、送信者、時間範囲フィルターをサポート)。ユーザーのみ。チャット/送信者/添付ファイル/時間でフィルターし、--page-all / --page-limit による自動ページネーションをサポートし、バッチmgetとチャットバッチクエリによって結果を強化します。 |
+messages-send |
ボットIDでチャットまたはダイレクトメッセージにメッセージを送信します。ボットのみ。chat-id または user-id にテキスト/マークダウン/投稿/メディアを送信し、冪等性キーをサポートします。 |
+threads-messages-list |
スレッド内のメッセージを一覧表示します。ユーザー/ボット。om/omt 入力を受け入れ、メッセージIDを thread_id に解決し、ソート/ページネーションをサポートします。 |
APIリソース
lark-cli schema im.<resource>.<method> # APIを呼び出す前に必ずパラメータ構造を確認してください
lark-cli im <resource> <method> [flags] # APIを呼び出します
重要:ネイティブAPIを使用する場合、
--data/--paramsパラメータ構造を確認するために、まずschemaを実行する必要があります。フィールド形式を推測しないでください。
chats
create— グループを作成します。Identity:botのみ (tenant_access_token)。get— グループ情報を取得します。Identity:userとbotをサポートします。呼び出し元は完全な詳細を取得するためにターゲットチャットに属している必要があり、内部チャットの場合は同じテナントに属している必要があります。link— グループ共有リンクを取得します。Identity:userとbotをサポートします。呼び出し元はターゲットチャットに属している必要があり、チャット共有が所有者/管理者に制限されている場合は所有者または管理者である必要があり、内部チャットの場合は同じテナントに属している必要があります。list— ユーザーまたはボットが属するグループのリストを取得します。Identity:userとbotをサポートします。update— グループ情報を更新します。Identity:userとbotをサポートします。
chat.members
create— ユーザーまたはボットをグループチャットに招待します。Identity:userとbotをサポートします。呼び出し元はターゲットチャットに属している必要があります。bot呼び出しの場合、追加されるユーザーはアプリの利用範囲内である必要があります。内部チャットの場合、オペレーターは同じテナントに属している必要があります。所有者/管理者のみがメンバーを追加できる場合、呼び出し元は所有者/管理者であるか、im:chat:operate_as_owner権限を持つチャット作成者ボットである必要があります。get— グループメンバーのリストを取得します。Identity:userとbotをサポートします。呼び出し元はターゲットチャットに属している必要があります。
(原文がここで切り詰められています)
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
im (v1)
CRITICAL — 开始前 MUST 先用 Read 工具读取 ../lark-shared/SKILL.md,其中包含认证、权限处理
Core Concepts
- Message: A single message in a chat, identified by
message_id(om_xxx). Supports types: text, post, image, file, audio, video, sticker, interactive (card), share_chat, share_user, merge_forward, etc. - Chat: A group chat or P2P conversation, identified by
chat_id(oc_xxx). - Thread: A reply thread under a message, identified by
thread_id(om_xxx or omt_xxx). - Reaction: An emoji reaction on a message.
Resource Relationships
Chat (oc_xxx)
├── Message (om_xxx)
│ ├── Thread (reply thread)
│ ├── Reaction (emoji)
│ └── Resource (image / file / video / audio)
└── Member (user / bot)
Important Notes
Identity and Token Mapping
--as usermeans user identity and usesuser_access_token. Calls run as the authorized end user, so permissions depend on both the app scopes and that user's own access to the target chat/message/resource.--as botmeans bot identity and usestenant_access_token. Calls run as the app bot, so behavior depends on the bot's membership, app visibility, availability range, and bot-specific scopes.- If an IM API says it supports both
userandbot, the token type changes who the operator is. The same API can succeed with one identity and fail with the other because owner/admin status, chat membership, tenant boundary, or app availability are checked against the current caller.
Sender Name Resolution with Bot Identity
When using bot identity (--as bot) to fetch messages (e.g. +chat-messages-list, +threads-messages-list, +messages-mget), sender names may not be resolved (shown as open_id instead of display name). This happens when the bot cannot access the user's contact info.
Root cause: The bot's app visibility settings do not include the message sender, so the contact API returns no name.
Solution: Check the app's visibility settings in the Lark Developer Console — ensure the app's visible range covers the users whose names need to be resolved. Alternatively, use --as user to fetch messages with user identity, which typically has broader contact access.
Card Messages (Interactive)
Card messages (interactive type) are not yet supported for compact conversion in event subscriptions. The raw event data will be returned instead, with a hint printed to stderr.
Shortcuts(推荐优先使用)
Shortcut 是对常用操作的高级封装(lark-cli im +<verb> [flags])。有 Shortcut 的操作优先使用。
| Shortcut | 说明 |
|---|---|
+chat-create |
Create a group chat with bot identity; bot-only; creates private/public chats, invites users/bots, optionally sets bot manager |
+chat-messages-list |
List messages in a chat or P2P conversation; user/bot; accepts --chat-id or --user-id, resolves P2P chat_id, supports time range/sort/pagination |
+chat-search |
Search visible group chats by keyword and/or member open_ids (e.g. look up chat_id by group name); user/bot; supports member/type filters, sorting, and pagination |
+chat-update |
Update group chat name or description; user/bot; updates a chat's name or description |
+messages-mget |
Batch get messages by IDs; user/bot; fetches up to 50 om_ message IDs, formats sender names, expands thread replies |
+messages-reply |
Reply to a message (supports thread replies) with bot identity; bot-only; supports text/markdown/post/media replies, reply-in-thread, idempotency key |
+messages-resources-download |
Download images/files from a message; user/bot; downloads image/file resources by message-id and file-key to a safe relative output path |
+messages-search |
Search messages across chats (supports keyword, sender, time range filters) with user identity; user-only; filters by chat/sender/attachment/time, supports auto-pagination via --page-all / --page-limit, enriches results via batched mget and chats batch_query |
+messages-send |
Send a message to a chat or direct message with bot identity; bot-only; sends to chat-id or user-id with text/markdown/post/media, supports idempotency key |
+threads-messages-list |
List messages in a thread; user/bot; accepts om/omt input, resolves message IDs to thread_id, supports sort/pagination |
API Resources
lark-cli schema im.<resource>.<method> # 调用 API 前必须先查看参数结构
lark-cli im <resource> <method> [flags] # 调用 API
重要:使用原生 API 时,必须先运行
schema查看--data/--params参数结构,不要猜测字段格式。
chats
create— 创建群。Identity:botonly (tenant_access_token).get— 获取群信息。Identity: supportsuserandbot; the caller must be in the target chat to get full details, and must belong to the same tenant for internal chats.link— 获取群分享链接。Identity: supportsuserandbot; the caller must be in the target chat, must be an owner or admin when chat sharing is restricted to owners/admins, and must belong to the same tenant for internal chats.list— 获取用户或机器人所在的群列表。Identity: supportsuserandbot.update— 更新群信息。Identity: supportsuserandbot.
chat.members
create— 将用户或机器人拉入群聊。Identity: supportsuserandbot; the caller must be in the target chat; forbotcalls, added users must be within the app's availability; for internal chats the operator must belong to the same tenant; if only owners/admins can add members, the caller must be an owner/admin, or a chat-creator bot withim:chat:operate_as_owner.get— 获取群成员列表。Identity: supportsuserandbot; the caller must be in the target chat and must belong to the same tenant for internal chats.
messages
delete— 撤回消息。Identity: supportsuserandbot; forbotcalls, the bot must be in the chat to revoke group messages; to revoke another user's group message, the bot must be the owner, an admin, or the creator; for user P2P recalls, the target user must be within the bot's availability.forward— 转发消息。Identity:botonly (tenant_access_token).merge_forward— 合并转发消息。Identity:botonly (tenant_access_token).read_users— 查询消息已读信息。Identity:botonly (tenant_access_token); the bot must be in the chat, and can only query read status for messages it sent within the last 7 days.
reactions
batch_query— 批量获取消息表情。Identity: supportsuserandbot.Must-readcreate— 添加消息表情回复。Identity: supportsuserandbot; the caller must be in the conversation that contains the message.Must-readdelete— 删除消息表情回复。Identity: supportsuserandbot; the caller must be in the conversation that contains the message, and can only delete reactions added by itself.Must-readlist— 获取消息表情回复。Identity: supportsuserandbot; the caller must be in the conversation that contains the message.Must-read
images
create— 上传图片。Identity:botonly (tenant_access_token).
pins
create— Pin 消息。Identity: supportsuserandbot.delete— 移除 Pin 消息。Identity: supportsuserandbot.list— 获取群内 Pin 消息。Identity: supportsuserandbot.
权限表
| 方法 | 所需 scope |
|---|---|
chats.create |
im:chat:create |
chats.get |
im:chat:read |
chats.link |
im:chat:read |
chats.list |
im:chat:read |
chats.update |
im:chat:update |
chat.members.create |
im:chat.members:write_only |
chat.members.get |
im:chat.members:read |
messages.delete |
im:message:recall |
messages.forward |
im:message |
messages.merge_forward |
im:message |
messages.read_users |
im:message:readonly |
reactions.batch_query |
im:message.reactions:read |
reactions.create |
im:message.reactions:write_only |
reactions.delete |
im:message.reactions:write_only |
reactions.list |
im:message.reactions:read |
images.create |
im:resource |
pins.create |
im:message.pins:write_only |
pins.delete |
im:message.pins:write_only |
pins.list |
im:message.pins:read |
同梱ファイル
※ ZIPに含まれるファイル一覧。`SKILL.md` 本体に加え、参考資料・サンプル・スクリプトが入っている場合があります。
- 📄 SKILL.md (9,538 bytes)
- 📎 references/lark-im-chat-create.md (6,258 bytes)
- 📎 references/lark-im-chat-identity.md (3,206 bytes)
- 📎 references/lark-im-chat-messages-list.md (7,095 bytes)
- 📎 references/lark-im-chat-search.md (5,827 bytes)
- 📎 references/lark-im-chat-update.md (3,281 bytes)
- 📎 references/lark-im-messages-mget.md (3,449 bytes)
- 📎 references/lark-im-messages-reply.md (10,469 bytes)
- 📎 references/lark-im-messages-resources-download.md (3,679 bytes)
- 📎 references/lark-im-messages-search.md (11,110 bytes)
- 📎 references/lark-im-messages-send.md (11,615 bytes)
- 📎 references/lark-im-reactions.md (9,941 bytes)
- 📎 references/lark-im-threads-messages-list.md (4,830 bytes)