Token导航 LogoToken导航TokenDH.com
图像处理操作浏览器clawhub未标认证来源可访问clear审计提醒

save-article-with-images保存带有图像的文章

Agent Skill

用于辅助图像生成、图片编辑、视觉素材处理或图像模型工作流。它适合让 Agent 根据文本生成图片、处理背景、整理视觉提示词或调用相关图像工具。使用时需要确认输入图片、版权来源、输出格式和模型限制;涉及人物、品牌、商品或公开展示素材时,应额外核对授权、真实性和内容合规边界。

总安装

3,588

周安装

148

GitHub Stars

公开资料未说明

下载量

1,172
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:save-article-with-images(保存带有图像的文章)
来源仓库:https://github.com/barryqin9999/save-article-with-images
安装命令:
openclaw skills install save-article-with-images
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install save-article-with-images

简介

网络文章与配图批量下载并转为 PDF 保存工具。

  • 自动提取微信公众号等平台的图文内容。
  • 适用于文献归档与离线阅读场景。save-article-with-images 属于图像处理类 Skill,可作为该场景下的辅助能力补充。
  • 安装命令:openclaw skills install save-article-with-images。
  • 注意遵守版权规定,禁止批量下载受保护内容。

SKILL.md

name
save-article-with-images
version
1.0.1
author
barryqin9999
description
>
Triggers
save article, save this article, download article, clip article, wechat article.

Save Article with Images

Save web articles to local storage, supporting articles with images. Automatically downloads images, generates Markdown, and converts to PDF.

Triggers

  • "save article"
  • "save this article"
  • "download article"
  • "clip article"

Quick Execution

Articles Without Images

1. Fetch article content (Jina Reader or browser)
2. Save to saved-articles/{title}-{date}.md
3. Send file to Feishu

Articles With Images

1. Create directory reports/{article-name}/
2. Create images/ subdirectory
3. Download all images to images/
4. Generate Markdown (relative path references)
5. Convert to PDF
6. Send PDF to Feishu

Complete Workflow

Step 1: Check if Article Has Images

Methods:

  • Jina Reader returns content with ![Image](URL) format
  • Or original webpage has <img> tags

Decision:

  • Images < 3 → Save Markdown directly, don't download images separately
  • Images ≥ 3 → Process with image workflow

Step 2: Create Directory Structure

mkdir -p ~/.openclaw/workspace/reports/{article-name}/images/

Directory Structure:

reports/{article-name}/
├── {article-name}.md      # Markdown file
├── {article-name}.html    # HTML intermediate (optional)
├── {article-name}.pdf     # Final output (optional)
└── images/                # Image directory
    ├── image1.jpg
    ├── image2.png
    └── ...

Step 3: Fetch Article Content

Method A: Jina Reader (Recommended)

curl -s "https://r.jina.ai/URL"

Pros: Auto-converts to Markdown, extracts image links Cons: Some sites blocked

Method B: Browser Fetch

# Open webpage
browser action=open url=URL

# Get content
browser action=act kind=evaluate fn='() => document.body.innerText'

# Get images
browser action=act kind=evaluate fn='() => {
  const imgs = document.querySelectorAll("img");
  return JSON.stringify(Array.from(imgs).map(img => ({
    src: img.src,
    alt: img.alt
  })));
}'

Step 4: Download Images

Single Image:

curl -o "images/image1.jpg" "https://example.com/image.jpg"

Batch Download (Python):

import requests
from pathlib import Path

def download_images(image_urls, output_dir):
    """Download image list"""
    output_dir = Path(output_dir)
    output_dir.mkdir(parents=True, exist_ok=True)
    
    for i, url in enumerate(image_urls, 1):
        try:
            # Get extension
            ext = url.split('.')[-1].split('?')[0]
            if ext not in ['jpg', 'jpeg', 'png', 'gif', 'webp']:
                ext = 'jpg'
            
            # Download
            resp = requests.get(url, timeout=30, headers={
                'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36'
            })
            
            if resp.status_code == 200:
                filename = f"image{i}.{ext}"
                (output_dir / filename).write_bytes(resp.content)
                print(f"✅ {filename}")
            else:
                print(f"❌ HTTP {resp.status_code}: {url}")
        except Exception as e:
            print(f"❌ {e}: {url}")

# Usage
# download_images(['url1', 'url2'], 'images/')

Image Naming:

  • Sequential: image1.jpg, image2.png, ...
  • By content: cover.jpg, screenshot.png, ...

Step 5: Generate Markdown

Template:

# {Article Title}

> Source: {URL}
> Author: {author}
> Published: {date}

---

![Cover](images/image1.jpg)

{Content}

---

## Images

![Figure 1: {description}](images/image2.jpg)
![Figure 2: {description}](images/image3.png)

---

*Saved: {timestamp}*

Image Reference Format:

![Description](images/filename.ext)

Step 6: Convert to PDF (Optional)

Using Preset Styles:

# CSS file
CSS_FILE=~/.openclaw/workspace/templates/mobile-friendly.css

# Convert to HTML
pandoc {article-name}.md -o {article-name}.html --standalone --css=$CSS_FILE

# Generate PDF
weasyprint {article-name}.html {article-name}.pdf

PDF Configuration:

  • Body: 16pt, line-height 1.8
  • Page: 6×9 inches, margins 1.5cm
  • Font: Noto Sans CJK SC

⚠️ Image Overflow Solution (Important)

Problem: Images too large (e.g., 1200px wide), exceed PDF page width (~432pt/6 inches)

Solution: Create CSS file to limit image max-width

Required CSS:

/* Prevent image overflow */
img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1em auto;
}

/* Images in images/ directory - 90% width */
img[src^="images/"] {
  max-width: 90%;
  margin: 0.5em auto;
}

/* Body styles */
body {
  max-width: 100%;
  padding: 1cm;
}

Correct PDF Generation Flow:

# 1. Create CSS file (in article directory)
cat > style.css << 'EOF'
img { max-width: 100%; height: auto; }
img[src^="images/"] { max-width: 90%; }
EOF

# 2. Generate HTML with CSS
pandoc {article-name}.md -o {article-name}.html --standalone --css=style.css

# 3. Generate PDF
weasyprint {article-name}.html {article-name}.pdf

Key Points:

  • ✅ Must add max-width: 100% or max-width: 90%
  • ✅ Use relative paths images/xxx.jpg
  • ❌ Don't render images at original size (will overflow)

Step 7: Send to Feishu

Send Markdown:

message action=send channel=feishu target="user:ou_xxx" filePath="path/to/file.md"

Send PDF:

message action=send channel=feishu target="user:ou_xxx" filePath="path/to/file.pdf"

Platform-Specific Handling

SourceFetch MethodImage Handling
Twitter/XJina ReaderDownload pbs.twimg.com images
WeChat Official Accountbrowser + CamoufoxDownload mmbiz.qpic.cn images
General WebpagesJina ReaderDownload all img tags
Login Required SitesbrowserUser manual screenshot

Twitter/X Articles

Image URL Format:

https://pbs.twimg.com/media/XXXXX?format=jpg&name=small

Download Command:

# Get best quality
curl -o "images/image1.jpg" "https://pbs.twimg.com/media/XXXXX?format=jpg&name=large"

WeChat Official Account Articles

Problem: WeChat has anti-hotlinking, direct download fails

Solutions:

  1. Use browser to open article
  2. Save screenshot
  3. Or use Camoufox tool
# Use tool from agent-reach
cd ~/.agent-reach/tools/wechat-article-for-ai
python3 main.py "https://mp.weixin.qq.com/s/ARTICLE_ID"

Checklist

After saving, verify:

□ Markdown file generated
□ All images downloaded successfully
□ Image relative paths correct
□ Images display correctly (local preview)
□ PDF generated successfully (optional)
□ File sent to Feishu

Error Handling

ErrorCauseSolution
Image download failedAnti-hotlinking/NetworkUse browser or lower quality
PDF generation failedMissing fonts/dependenciesCheck weasyprint installation
Markdown images not showingPath errorCheck relative paths
Jina Reader blockedSite restrictionUse browser fetch

File Locations

TypeDirectory
Simple articlessaved-articles/{title}-{date}.md
Articles with imagesreports/{article-name}/
Temporary files/tmp/article-{id}/

*Skill Version: 1.0.0* *Created: 2026-03-17*

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

70.56%
按下载量换算827

安全审计

VirusTotal

通过

ClawScan

可疑

Static analysis

通过

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills