Agent skill

Content Collector

by LeoYeAI in LeoYeAI/openclaw-master-skills

Automatically collect and archive content from shared links in group chats.

MITAuto-check passedKnowledge Management

Install Content Collector

skills CLI
$ npx skills add LeoYeAI/openclaw-master-skills --skill content-collector -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install LeoYeAI/openclaw-master-skills content-collector --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/LeoYeAI/openclaw-master-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/content-collector-skill .claude/skills/content-collector && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
content-collector
GitHub stars
2.2k
Token cost
~4.8k tokens
SKILL.md length
935 words
Files
2
Skills in repo
1,235
Repo updated
First seen
Licence
MIT

At a glance

Automatically collect and archive content from shared links in group chats.

  • Works in 9 steps: 飞书权限清单 → 预检流程 (Pre-flight Check) → Detect and Parse Link → …
  • Fetch the content
  • SKILL.md covers Overview, When to Use, Supported Link Types and Global Availability (全局可用配置), plus 7 more sections
  • Reaches xxx.feishu.cn and mp.weixin.qq.com

What it does

Content Collector is an agent skill from LeoYeAI/openclaw-master-skills. Automatically collect and archive content from shared links in group chats. When a user shares a link (WeChat articles, Feishu docs, web pages, etc.) in any group chat and asks to archive/collect/save it, this skill triggers to fetch the content, create a Feishu document, and update the knowledge base table. Use when: (1) User shares a link and asks to "收录/转存/保存" content, (2) Need to archive web content to Feishu docs, (3) Building a personal knowledge base from shared links, (4) Organizing learning materials…

Its SKILL.md is about 4.8k tokens, which your agent loads only when the skill is triggered. The skill folder holds 1 other file (for example `_meta.json`).

It sits in Knowledge Management, covering Messaging and chat bots, Second brain and Knowledge bases. It works with Feishu (Lark) and WeChat. The repository describes itself as: 🧠 Curated collection of 1209+ best OpenClaw skills — weekly updated by MyClaw.ai. The licence is MIT.

When your agent uses it

  • Fetch the content
  • Create a Feishu document
  • Update the knowledge base table
  • User shares a link and asks to 收录/转存/保存 content

Example prompts

  • “收录/转存/保存”
  • “/content-collector”

Requirements

  • Python 3

Workflow steps

9 steps, taken from the step headings in SKILL.md.

  1. 飞书权限清单
  2. 预检流程 (Pre-flight Check)
  3. Detect and Parse Link
  4. Fetch Content
  5. Analyze and Categorize
  6. Process Images (图片处理)
  7. Create Feishu Document (按知识库规则存储)
  8. Update Knowledge Base Table
  9. Update Content Index Document

What it can do on your machine

Read from SKILL.md and the folder at commit e5199b5. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are python, markdown and json).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • xxx.feishu.cn
    • mp.weixin.qq.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Content Collector loads about 4.8k tokens when it runs. Until then it costs about 139 tokens; SKILL.md has 935 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~139
When it runs · the whole SKILL.md, loaded when a task matches
~4.8k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from LeoYeAI/openclaw-master-skills at commit e5199b5, republished under its MIT licence (© LeoYeAI). 935 words, ~4,832 tokens.

Download SKILL.mdSave it as .claude/skills/content-collector/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
content-collector
description
Automatically collect and archive content from shared links in group chats. When a user shares a link (WeChat articles, Feishu docs, web pages, etc.) in any group chat and asks to archive/collect/save it, this skill triggers to fetch the content, create a Feishu document, and update the knowledge base table. Use when: (1) User shares a link and asks to "收录/转存/保存" content, (2) Need to archive web content to Feishu docs, (3) Building a personal knowledge base from shared links, (4) Organizing learning materials from various sources.

Content Collector - 链接内容自动收录技能

Overview

This skill enables automatic collection and archiving of content from shared links into a structured knowledge base.

Core Workflow:

Detect Link → Fetch Content → Create Feishu Doc → Update Table

When to Use

模式1:主动触发(显式关键词)

当用户消息包含以下触发词时,立即执行收录:

  • "收录" / "转存" / "保存" / "存档" / "存一下" / "归档" / "备份" / "收藏"
  • "存到知识库" / "加入知识库" / "转飞书"

示例:

  • "这个链接收录一下"
  • "存到知识库"
  • "转存这篇教程"
模式2:静默收录(自动检测)

在群聊场景中,自动检测以下链接并静默收录:

  • 飞书文档/表格/Wiki(feishu.cn)
  • 微信公众号文章(mp.weixin.qq.com)
  • 技术博客/教程站点
  • 知识分享类链接

静默收录条件:

  1. 消息来自群聊(非私聊)
  2. 消息包含可识别的知识类链接
  3. 用户没有明确拒绝的意图

两种模式优先级:

检测到主动触发词 → 立即收录(显式模式)
未检测到触发词但检测到链接 → 静默收录(隐式模式)
TypeExampleFetch Method
WeChat Articlehttps://mp.weixin.qq.com/s/xxxkimi_fetch
Feishu Dochttps://xxx.feishu.cn/docx/xxxfeishu_fetch_doc
Feishu Wikihttps://xxx.feishu.cn/wiki/xxxfeishu_fetch_doc
Web PageGeneral URLskimi_fetch / web_fetch

Global Availability (全局可用配置)

生效范围:所有用户、所有群聊

本技能已配置为全局可用,支持以下对象:

对象类型支持状态说明
所有用户✅ 可用任何用户分享的链接均可被收录
所有群聊✅ 可用支持技能中心群、养虾群、学习群等所有群组
私聊消息✅ 可用用户私信分享链接也可触发收录
多渠道✅ 可用飞书、其他渠道统一支持

权限说明:

  • 任何用户均可触发收录(无需管理员权限)
  • 收录的文档统一存储到指定的知识库目录
  • 所有用户均可查看已收录的文档

Installation & Permission Check (安装与权限检查)

在正式使用本技能前,系统必须自动或引导用户完成以下权限校验,以确保流程不中断:

1. 飞书权限清单
权限项验证工具目的
OAuth 授权feishu_oauth获取操作飞书文档和表格的用户凭证
知识库写入权限feishu_create_doc确保能在指定的 Space ID 下创建节点
多维表格编辑权限feishu_bitable_app_table_record确保能向指定的 app_token 写入记录
图片上传权限feishu_im_bot_upload允许将本地图片同步至飞书素材库
2. 预检流程 (Pre-flight Check)

每次“安装”或配置更新后,执行以下检查:

  1. 验证 Space ID 可访问性:尝试在指定目录下获取节点列表。
  2. 验证 Table 结构:检查 关键词、原链接 等必需字段是否存在。
  3. 静默测试:如果权限不足,立即通过 feishu_oauth 弹出授权引导,而非在执行收录时报错。

Configuration

Before using, ensure these are configured in MEMORY.md:

markdown
## Content Collector Config
- **Knowledge Base Table**: `[Your Bitable App Token]` (Bitable app_token)
- **Table URL**: [Your Bitable Table URL]
- **Default Table ID**: `[Your Table ID]` (will auto-detect if available)
- **Knowledge Base Space ID**: `[Your Space ID]` (所有文档创建在此知识库下)
- **Knowledge Base URL**: [Your Knowledge Base Homepage URL]
- **Content Categories**: 技术教程, 实战案例, 产品文档, 学习笔记
- **Global Access**: 所有用户可用,所有群聊可用

Note:

  1. This skill updates ONLY the configured knowledge base table. Do not create or update any other tables.
  2. All created documents must be saved under the designated Knowledge Base using wiki_node parameter.
  3. Global Access: 所有用户、所有群聊均可使用本技能,收录的文档对全员可见。

📚 知识库文档存储规则(必遵守)

所有收录的文档必须按照以下规则分类存储到知识库对应目录:

知识库目录结构

请参考各项目或团队定义的知识库标准目录结构进行存储。收录的文档通常存放在“素材”或“归档”类目录下。

文档分类映射规则
内容分类存储目录 (wiki_node)命名前缀示例
技术教程F9pFw9dxTiXmpsk5bNlco704nag (内容文档)📖📖 [标题]
实战案例F9pFw9dxTiXmpsk5bNlco704nag (内容文档)🛠️🛠️ [标题]
产品文档F9pFw9dxTiXmpsk5bNlco704nag (内容文档)📄📄 [标题]
学习笔记F9pFw9dxTiXmpsk5bNlco704nag (内容文档)💡💡 [标题]
热点资讯F9pFw9dxTiXmpsk5bNlco704nag (内容文档)🔥🔥 [标题]
设计技能F9pFw9dxTiXmpsk5bNlco704nag (内容文档)🎨🎨 [标题]
工具推荐F9pFw9dxTiXmpsk5bNlco704nag (内容文档)🔧🔧 [标题]
训练营F9pFw9dxTiXmpsk5bNlco704nag (内容文档)🎓🎓 [标题]
文档命名规范
[Emoji前缀] [原标题] | 收录日期

示例:
📖 OpenClaw保姆级教程 | 2026-03-08
🛠️ 火山方舟自动化报表案例 | 2026-03-08
🔥 GPT-5.4发布解读 | 2026-03-08
文档模板
markdown
# [Emoji] [原标题]

> 📌 **元信息**
> - 来源:[原始来源]
> - 原文链接:[原始URL]
> - 收录时间:YYYY-MM-DD
> - 内容分类:[技术教程/实战案例/产品文档/学习笔记/热点资讯/设计技能/工具推荐/训练营]
> - 关键词:[关键词1, 关键词2, 关键词3]

---

## 📋 核心要点

[3-5条核心内容摘要]

---

## 📝 正文内容

[完整的转存内容]

---

## 🔗 相关链接

- 原文链接:[原始URL]
- 知识库索引:[素材池文档索引链接]

---

📚 **收录时间**:YYYY-MM-DD  
🏷️ **分类**:[分类名]  
🔖 **关键词**:[关键词]
自动更新素材索引

每次收录完成后,必须:

  1. 更新多维表格 - 添加新记录到素材池表格
  2. 更新素材索引文档 - 在「📚 内容素材池文档索引」中添加条目
  3. 更新分类统计 - 更新各分类的文档数量和占比

Workflow

Extract URL from user message using regex or direct extraction.

Step 2: Fetch Content

Choose appropriate fetch method based on URL pattern:

For WeChat articles:

python
kimi_fetch(url="https://mp.weixin.qq.com/s/xxx")

For Feishu docs:

python
feishu_fetch_doc(doc_id="https://xxx.feishu.cn/docx/xxx")

For general web pages:

python
kimi_fetch(url="https://example.com/article")
# or
web_fetch(url="https://example.com/article")
Step 3: Analyze and Categorize

智能分类判断: 根据内容特征自动判断分类:

判断依据分类
包含"安装/配置/部署/教程"等词📖 技术教程
包含"案例/实战/项目/演示"等词🛠️ 实战案例
包含"安全/公告/版本/功能"等词📄 产品文档
包含"学习/成长/指南/笔记"等词💡 学习笔记
包含"发布/新功能/热点"等词🔥 热点资讯
包含"设计/Prompt/美学"等词🎨 设计技能
包含"工具/CLI/插件"等词🔧 工具推荐
包含"训练营/课程/教学"等词🎓 训练营
Step 4: Process Images (图片处理)

When content contains images, download and upload them to Feishu:

Image Processing Workflow:

python
# 1. Extract image URLs from markdown
import re
image_urls = re.findall(r'!\[.*?\]\((https?://[^\)]+)\)', markdown_content)

# 2. Download and upload each image
for img_url in image_urls:
    try:
        # Download image
        local_path = f"/tmp/img_{hash(img_url)}.jpg"
        download_image(img_url, local_path)
        
        # Upload to Feishu
        upload_result = feishu_im_bot_upload(
            action="upload_image",
            file_path=local_path
        )
        
        # Replace URL in markdown
        new_url = upload_result.get("image_key") or img_url
        markdown_content = markdown_content.replace(img_url, new_url)
        
    except Exception as e:
        # Keep original URL if upload fails
        print(f"Failed to process image {img_url}: {e}")
        continue

Fallback Strategy:

  • If image upload fails, keep original URL
  • Add warning note in document
  • Include original source link for reference
Step 5: Create Feishu Document (按知识库规则存储)

Convert processed markdown to Feishu document with proper organization:

python
# 1. 确定分类和参数
content_category = classify_content(markdown_content)  # 📖/🛠️/📄/💡/🔥/🎨/🔧/🎓
emoji_prefix = get_emoji_prefix(content_category)  # 根据分类获取emoji
wiki_node = get_wiki_node_by_category(content_category)  # 获取存储目录

# 2. 生成文档标题
doc_title = f"{emoji_prefix} {original_title} | {today_date}"

# 3. 生成文档内容(使用标准模板)
doc_content = f"""# {emoji_prefix} {original_title}

> 📌 **元信息**
> - 来源:{source_name}
> - 原文链接:{original_url}
> - 收录时间:{today_date}
> - 内容分类:{content_category}
> - 关键词:{keywords}

---

## 📋 核心要点

{extract_key_points(markdown_content, 5)}

---

## 📝 正文内容

{processed_markdown_content}

---

## 🔗 相关链接

- 原文链接:{original_url}
- 知识库索引:[Your Index Document URL]

---

📅 **收录时间**:{today_date}  
🏷️ **分类**:{content_category}  
🔖 **关键词**:{keywords}
"""

# 4. 创建文档到知识库对应目录
feishu_create_doc(
    title=doc_title,
    markdown=doc_content,
    wiki_node=wiki_node  # 必须指定存储目录
)

存储目录映射:

分类wiki_node目录名
所有素材F9pFw9dxTiXmpsk5bNlco704nag04-内容素材

IMPORTANT:

  1. All documents MUST be created under the designated Knowledge Base using wiki_node parameter.
  2. Documents must follow the naming convention: [Emoji] [Title] | [Date]
  3. Documents must use the standard template with metadata section.
Step 6: Update Knowledge Base Table

Add record to the Bitable knowledge base (ONLY update this specific table):

python
feishu_bitable_app_table_record(
    action="create",
    app_token="[Your App Token]",  # Configured in MEMORY.md
    table_id="[Your Table ID]",  # Will use correct table ID from the base
    fields={
        "关键词": keywords,
        "内容分类": content_category,
        "文档标题": [{"text": original_title, "type": "text"}],
        "来源": [{"text": source_name, "type": "text"}],
        "核心要点": [{"text": key_points, "type": "text"}],
        "飞书文档链接": {"link": new_doc_url, "text": "飞书文档", "type": "url"},
        "原链接": {"link": original_url, "text": "原文链接", "type": "url"}  # 新增:存储原始链接
    }
)

Table Fields:

FieldTypeDescription
关键词TextSearch keywords for the content
内容分类Single SelectCategory: 📖技术教程/🛠️实战案例/📄产品文档/💡学习笔记/🔥热点资讯/🎨设计技能/🔧工具推荐/🎓训练营
文档标题TextTitle of the archived document
来源TextOriginal source name
核心要点TextKey points summary (3-5 items)
飞书文档链接URLLink to the created Feishu document
原链接URLOriginal source URL - 新增字段,存储采集的原始链接

IMPORTANT: Only update the configured knowledge base table. Never create or modify other tables.

Step 7: Update Content Index Document

After creating the document and updating the table, MUST update the index document:

python
# 1. 获取当前索引文档内容
index_doc = feishu_fetch_doc(doc_id="[Your Index Doc ID]")

# 2. 在对应分类表格中添加新行
new_index_entry = f"| {original_title} | {source_name} | [查看]({new_doc_url}) |\n"

# 3. 更新分类统计
update_category_stats(content_category)

# 4. 更新总计数
update_total_count()

或者直接追加到索引文档的末尾:

python
feishu_update_doc(
    doc_id="[Your Index Doc ID]",
    mode="append",
    markdown=f"""
| {original_title} | {source_name} | [查看]({new_doc_url}) |
"""
)

Content Categorization Guide

CategoryEmojiDescriptionExamples
技术教程📖Step-by-step technical guidesInstallation, configuration, API usage
实战案例🛠️Real-world implementation examplesCase studies, project demos
产品文档📄Product features, security noticesRelease notes, security advisories
学习笔记💡Conceptual knowledge, methodologiesBest practices, architecture guides
热点资讯🔥Breaking news, releasesGPT-5.4, new features
设计技能🎨Design, prompts, aestheticsAJ's prompts, design guides
工具推荐🔧Tools, CLI, pluginsgws, trae, autotools
训练营🎓Courses, bootcamps, tutorialsOpenClaw bootcamp

分类判断优先级:

  1. 优先根据用户指定分类
  2. 其次根据标题关键词
  3. 最后根据内容特征自动判断
  4. 不确定时标记为"待分类",请用户确认
Show full SKILL.md (340 more words)Show less

Delete Record Process

When user replies "删除" or "删除 [keyword]":

python
# 1. Search records by keyword
feishu_bitable_app_table_record(
    action="list",
    app_token="[Your App Token]",
    table_id="[Your Table ID]",
    filter={
        "conjunction": "and",
        "conditions": [
            {"field_name": "关键词", "operator": "contains", "value": [keyword]}
        ]
    }
)

# 2. Confirm deletion
# If multiple found → list for user to select
# If single found → ask for confirmation

# 3. Execute deletion
feishu_bitable_app_table_record(
    action="delete",
    app_token="[Your App Token]",
    table_id="[Your Table ID]",
    record_id="record_id_to_delete"
)

Error Handling

Common Issues
ErrorCauseSolution
Fetch timeoutNetwork issue or heavy contentRetry with longer timeout, or use alternative fetch method
UnauthenticatedOAuth token expired or not authedTrigger feishu_oauth to refresh user credentials
Permission deniedNo write access to Space/TableCheck if user/bot has 'Editor' role in Feishu
Content too longExceeds API limitsTruncate or split into multiple documents
Table update failedWrong app_token or table_idVerify configuration in MEMORY.md
Field Missing"原链接" field not in tableAdd the field to Bitable manually or via API
Recovery Steps
  1. If fetch fails → Try alternative method (kimi_fetch → web_fetch)
  2. If Feishu doc creation fails → Check OAuth status
  3. If table update fails → Verify table structure and field names
  4. Always report partial success (doc created but table not updated)

Response Template

收录成功响应(流式Post格式)
json
{
  "msg_type": "post",
  "content": {
    "post": {
      "zh_cn": {
        "title": "✅ 收录完成",
        "content": [
          [
            {"tag": "text", "text": "📄 "},
            {"tag": "text", "text": "{emoji} {原标题} | {日期}", "style": {"bold": true}}
          ],
          [{"tag": "text", "text": ""}],
          [
            {"tag": "text", "text": "💡 文档亮点:", "style": {"bold": true}}
          ],
          [
            {"tag": "text", "text": "• {亮点1}"}
          ],
          [
            {"tag": "text", "text": "• {亮点2}"}
          ],
          [
            {"tag": "text", "text": "• {亮点3}"}
          ],
          [{"tag": "text", "text": ""}],
          [
            {"tag": "text", "text": "🔗 "},
            {"tag": "a", "text": "查看飞书文档", "href": "{文档URL}"}
          ]
        ]
      }
    }
  }
}

简洁输出示例:

✅ 收录完成

📄 📖 OpenClaw配置指南 | 2026-03-08

💡 文档亮点:
• 完整配置示例,含9大模块详解
• 多Agent扩展配置方案
• 生产环境安全配置建议

🔗 查看飞书文档 → [点击打开](https://xxx.feishu.cn/docx/xxx)
静默收录响应(流式Post格式)
json
{
  "msg_type": "post",
  "content": {
    "post": {
      "zh_cn": {
        "title": "✅ 已自动收录",
        "content": [
          [
            {"tag": "text", "text": "📄 "},
            {"tag": "text", "text": "{emoji} {原标题}", "style": {"bold": true}}
          ],
          [{"tag": "text", "text": ""}],
          [
            {"tag": "text", "text": "💡 亮点:{亮点摘要}"}
          ],
          [{"tag": "text", "text": ""}],
          [
            {"tag": "a", "text": "📎 查看文档", "href": "{文档URL}"}
          ]
        ]
      }
    }
  }
}
批量收录响应(流式Post格式)
json
{
  "msg_type": "post",
  "content": {
    "post": {
      "zh_cn": {
        "title": "✅ 批量收录完成({N}份)",
        "content": [
          [
            {"tag": "text", "text": "📄 {emoji1} {标题1}", "style": {"bold": true}}
          ],
          [
            {"tag": "text", "text": "   💡 {亮点1}"}
          ],
          [
            {"tag": "a", "text": "   🔗 查看", "href": "{链接1}"}
          ],
          [{"tag": "text", "text": ""}],
          [
            {"tag": "text", "text": "📄 {emoji2} {标题2}", "style": {"bold": true}}
          ],
          [
            {"tag": "text", "text": "   💡 {亮点2}"}
          ],
          [
            {"tag": "a", "text": "   🔗 查看", "href": "{链接2}"}
          ]
        ]
      }
    }
  }
}

输出原则:

  1. 必须流式Post格式 - 使用 msg_type: post
  2. 只包含3个核心要素:
    • 文件名称(📄 Emoji + 标题 + 日期)
    • 文档亮点(💡 3-5条核心要点)
    • 飞书链接(🔗 点击查看)
  3. 不输出其他信息 - 不显示分类、不显示表格更新、不显示统计
  4. 保持简洁 - 每份文档3-5行内容

Best Practices

  1. Always verify content was fetched correctly before creating documents
  2. Extract key insights from the content for the summary
  3. Use appropriate category based on content nature
  4. Generate relevant keywords for better searchability
  5. Keep source attribution clear for copyright respect
  6. Handle partial failures gracefully - document what succeeded and what failed
  7. Update index document - Every new document must be added to the index
  8. Follow naming convention - Use [Emoji] [Title] | [Date] format
  9. Store in correct directory - Use wiki_node to place in right category

收录完成检查清单 (Checklist)

每次收录必须完成以下所有步骤:

  • 执行权限预检(验证 OAuth 及 Space/Table 写入权限)
  • 获取并处理原始内容(含图片)
  • 智能分类并确定 Emoji 前缀
  • 提取核心要点(3-5条)
  • 生成关键词
  • 创建飞书文档(使用标准模板,指定 wiki_node)
  • 更新多维表格(添加完整记录,包含原链接字段)
  • 更新文档索引(在素材索引中添加条目)
  • 发送收录完成通知给用户

任何一步未完成,视为收录失败!

Integration with Memory

After each collection, update MEMORY.md:

markdown
### YYYY-MM-DD - Content Collection
- **新增收录**: [Title]
- **来源**: [Source]
- **分类**: [Category]
- **知识库状态**: 共[N]条记录
- **索引更新**: ✅ 已更新

This skill is part of the core knowledge management system. Execute with care and attention to detail.


附录:图片处理解决方案

问题

原始网页中的图片无法直接显示在飞书文档中(外链限制)

解决方案
方案1:自动下载上传(推荐)

实现步骤:

python
import re
import requests
import os

def process_images_in_content(markdown_content):
    """
    处理 Markdown 内容中的图片:
    1. 提取图片URL
    2. 下载到本地
    3. 上传到飞书
    4. 替换为飞书图片链接
    """
    
    # 正则匹配 Markdown 图片: ![alt](url)
    img_pattern = r'!\[(.*?)\]\((https?://[^\)]+)\)'
    
    def replace_image(match):
        alt_text = match.group(1)
        img_url = match.group(2)
        
        try:
            # 1. 下载图片
            local_path = f"/tmp/img_{abs(hash(img_url)) % 100000}.jpg"
            
            headers = {
                'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36'
            }
            response = requests.get(img_url, headers=headers, timeout=30)
            response.raise_for_status()
            
            with open(local_path, 'wb') as f:
                f.write(response.content)
            
            # 2. 上传到飞书
            upload_result = feishu_im_bot_upload(
                action="upload_image",
                file_path=local_path
            )
            
            image_key = upload_result.get("image_key")
            
            # 3. 清理临时文件
            os.remove(local_path)
            
            # 4. 返回飞书图片格式
            if image_key:
                return f"![{alt_text}]({image_key})"
            else:
                # 上传失败,保留原链接并添加警告
                return f"![{alt_text}]({img_url})\n\n> ⚠️ 图片上传失败,已保留原链接: {img_url}"
                
        except Exception as e:
            # 处理失败,保留原链接
            return f"![{alt_text}]({img_url})\n\n> ⚠️ 图片处理失败: {str(e)[:50]}"
    
    # 执行替换
    processed_content = re.sub(img_pattern, replace_image, markdown_content)
    
    return processed_content

使用方式: 在创建文档之前调用:

python
# 获取原始内容
raw_content = kimi_fetch(url=link)

# 处理图片
processed_content = process_images_in_content(raw_content)

# 创建文档(使用处理后的内容)
feishu_create_doc(
    title=title,
    markdown=processed_content
)
方案2:保留原链接 + 备用方案
python
def add_image_fallback_notice(markdown_content, original_url):
    """
    在文档末尾添加图片查看说明
    """
    notice = f"""

---

## 📎 原始图片资源

本文档中的图片已保留原始链接。
如图片无法显示,请查看原文:
[{original_url}]({original_url})

"""
    return markdown_content + notice
方案3:批量图片归档

创建一个独立的「图片资源库」多维表格:

python
# 收录时同时记录图片信息
feishu_bitable_app_table_record(
    action="create",
    app_token="图片资源库_token",
    fields={
        "文档标题": doc_title,
        "图片URL": img_url,
        "图片描述": alt_text,
        "原文链接": original_url,
        "收录状态": "待上传/已上传/失败"
    }
)
建议实施顺序
  1. 短期(立即):使用方案2,保留原链接并添加查看提示
  2. 中期(本周):实施方案1,自动下载上传核心文章的图片
  3. 长期(可选):建立独立的图片资源库管理系统
注意事项
  1. 图片大小限制:飞书图片上传通常限制 10MB
  2. 格式支持:JPG、PNG、GIF 等常见格式
  3. 网络超时:下载图片时设置合理的超时时间(30秒)
  4. 失败处理:单张图片失败不应影响整篇文档收录
  5. 版权注意:确保有权限使用原网页中的图片

图片处理方案 v1.0 - 2026-03-05

© LeoYeAI, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file in skills/content-collector-skill of LeoYeAI/openclaw-master-skills.

  • SKILL.md
  • _meta.json

Open the folder on GitHubat commit e5199b5

Compare with similar skills

Content Collector next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Content Collector compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Content Collector this skillLeoYeAI/openclaw-master-skills2.2k—~4.8kAutomated safety check: PassMIT
Greenbubbles Personal Memorybojieli/greenbubbles365—~669Automated safety check: PassMIT
Web To Markdownrookie-ricardo/erduo-skills935—~894Automated safety check: PassMIT
Claude To Imop7418/Claude-to-IM-skill2.9k—~3.4kAutomated safety check: NotesMIT
Content CollectorvigorX777/content-collector-skill240—~2kAutomated safety check: PassNone
Yichen Wechat Mp Batch Exportermcncarl/yichen-skills4.4k—~1.5kAutomated safety check: PassCustom licence

Similar skills

  • Greenbubbles Personal Memory

    bojieli/greenbubbles

    Build or revise private, cited Markdown notes from the user's WeChat history in the current agent session.

    365 GitHub stars~669 tokensUpdated 8 days ago
    Knowledge ManagementAuto-check passed
  • Web To Markdown

    rookie-ricardo/erduo-skills

    Convert a web URL into cleaned Markdown with deterministic routing.

    935 GitHub stars~894 tokensUpdated 2 mo ago
    Productivity & AutomationAuto-check passed
  • Claude To Im

    op7418/Claude-to-IM-skill

    Bridge THIS Claude Code or Codex session to Telegram, Discord, Feishu/Lark, QQ, or WeChat so the user can chat with Claude from their phone.

    2.9k GitHub stars~3.4k tokensUpdated 6 mo ago
    Productivity & AutomationAuto-check: notes
  • Content Collector

    vigorX777/content-collector-skill

    Collect social media content (X/Twitter, WeChat, Jike, Reddit, etc.) into Feishu bitable.

    240 GitHub stars~2k tokensUpdated 6 mo ago
    Productivity & AutomationAuto-check passed
  • Yichen Wechat Mp Batch Exporter

    mcncarl/yichen-skills

    批量下载微信公众号文章正文、历史文章列表、原创文章筛选、历史计数口径、阅读量、点赞/转发等指标、评论和评论回复。Use when the user asks to batch fetch mp.weixin.qq.com articles, export WeChat public-account history, distinguish publish groups vs expanded…

    4.4k GitHub stars~1.5k tokensUpdated 6 days ago
    Productivity & AutomationAuto-check passed
  • Static Deploy

    nexu-io/nexu

    Deploy static pages to nexu.space. An agent skill from nexu-io/nexu.

    3.3k GitHub stars~989 tokensUpdated 5 mo ago
    Frontend & DesignAuto-check passed

More from LeoYeAI/openclaw-master-skills

All 1,200 skills in this repo
  • DevOps Pipeline Management

    LeoYeAI/openclaw-master-skills

    Manages pipelines on a DevOps quality and efficiency platform through its OpenAPI: list workspaces and templates, create, update, run and cancel pipelines, and read run records.

    2.2k GitHub stars~4.2k tokensUpdated 2 mo ago
    Auto-check: notes
  • Feishu Document Collaboration

    LeoYeAI/openclaw-master-skills

    Patches OpenClaw's Feishu extension so an edited document triggers an isolated agent session that reads the doc and replies inline, turning it into a live chat space.

    2.2k GitHub stars~2k tokensUpdated 2 mo ago
    Auto-check passed
  • Files Memory System

    LeoYeAI/openclaw-master-skills

    Multi-context memory management system for OpenClaw agents with group-isolated storage, global shared memory, workspace organization, and group-specific skills isolation.

    2.2k GitHub stars~3.8k tokensUpdated 2 mo ago
    Auto-check passed
  • GEO-Claw AI Visibility Agent

    LeoYeAI/openclaw-master-skills

    Runs a brand's AI-search visibility work end to end: diagnosing how AI platforms represent it, repositioning it, producing AI-optimized content and monitoring ongoing mentions.

    2.2k GitHub stars~4.7k tokensUpdated 2 mo ago
    Auto-check passed
  • Google Workspace CLI

    LeoYeAI/openclaw-master-skills

    Installs and authenticates the gws CLI, then automates Gmail, Drive, Sheets, Calendar, Docs, Chat and Tasks with ready-made recipes, persona bundles and security audits.

    2.2k GitHub stars~2.6k tokensUpdated 2 mo ago
    Auto-check: notes
  • HealthFit Health Advisors

    LeoYeAI/openclaw-master-skills

    Runs four advisor roles, a fitness coach, nutritionist, data analyst and TCM practitioner, to build a health profile and track workouts, diet and wellness over time.

    2.2k GitHub stars~4.4k tokensUpdated 2 mo ago
    Auto-check passed

Questions about Content Collector

What does Content Collector do?

Automatically collect and archive content from shared links in group chats. Content Collector is an agent skill from LeoYeAI/openclaw-master-skills. Automatically collect and archive content from shared links in group chats.

When should I use Content Collector?

Content Collector fits situations like: fetch the content; create a Feishu document; update the knowledge base table; user shares a link and asks to 收录/转存/保存 content.

How do I install Content Collector in Claude Code?

Run `npx skills add LeoYeAI/openclaw-master-skills --skill content-collector -a claude-code`. Or copy the skill folder (skills/content-collector-skill in LeoYeAI/openclaw-master-skills) into .claude/skills/content-collector in your project. Claude Code loads it when a task matches its description.

How do I install Content Collector in Codex?

Run `npx skills add LeoYeAI/openclaw-master-skills --skill content-collector -a codex`. Or copy the skill folder (skills/content-collector-skill in LeoYeAI/openclaw-master-skills) into .agents/skills/content-collector in your project. Codex loads it when a task matches its description.

Can I use Content Collector in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add LeoYeAI/openclaw-master-skills --skill content-collector -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/content-collector, .gemini/skills/content-collector, .github/skills/content-collector and .opencode/skills/content-collector in your project.

What does Content Collector need to run?

SKILL.md names no scripts, command-line tools or credentials: Content Collector is instructions for the agent only. Our summary lists: Python 3.

Does Content Collector access the network?

SKILL.md names 2 domains. In commands or code: xxx.feishu.cn and mp.weixin.qq.com; the agent is likely to contact these when it follows the instructions. This is read from the text; nothing was executed.

Is Content Collector safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Content Collector use?

Content Collector is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Content Collector use?

About 4.8k tokens (SKILL.md is roughly 19k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Content Collector?

Skills that share tags, products or a category with Content Collector: Greenbubbles Personal Memory (bojieli/greenbubbles, 365 stars), Web To Markdown (rookie-ricardo/erduo-skills, 935 stars), Claude To Im (op7418/Claude-to-IM-skill, 2.9k stars) and Content Collector (vigorX777/content-collector-skill, 240 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Content Collector?

LeoYeAI (a GitHub user) maintains it in LeoYeAI/openclaw-master-skills, which has 2,161 GitHub stars. The repository holds 1,235 skills in this directory. The repository was last updated on July 20, 2026.

Source: LeoYeAI/openclaw-master-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.