← Back to Skills Marketplace
near2sea

Generate News Article

by near2sea · GitHub ↗ · v1.0.0
cross-platform ⚠ suspicious
575
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install generate-news-article
Description
Generate individual Markdown articles from SerpAPI Google search results with images
README (SKILL.md)

Generate News Article

自动从 SerpAPI Google 搜索结果生成多篇独立的 Markdown 文章。

功能

  1. 接收搜索关键词(默认:AI助手)
  2. 调用 SerpAPI Google 搜索(默认获取 5 条结果)
  3. 为每条结果生成独立的 Markdown 文件
  4. 自动下载缩略图到 assets 目录
  5. 以时间目录结构保存文章

使用

# 使用默认关键词 "AI助手"
generate.sh

# 指定关键词
generate.sh "AI大模型"

# 指定关键词和结果数量
generate.sh "ChatGPT" 10

输出结构

生成的文章保存在 agent 根目录的 output 文件夹中:

/Users/lihaijian/.openclaw/workspace-wechat-publisher/output/
└── 2026-02-22/
    ├── 文章标题1.md
    ├── 文章标题2.md
    ├── 文章标题3.md
    ├── 文章标题4.md
    ├── 文章标题5.md
    └── assets/
        ├── image1.jpg
        ├── image2.jpg
        └── ...

文章格式

每篇 Markdown 文件包含:

---
title: 文章标题
cover: ./assets/image.jpg
---

# 文章标题

摘要内容...

[原文链接](https://example.com/article)

特性

  • ✅ 每条搜索结果生成独立文件
  • ✅ 文件名使用搜索标题(自动清理特殊字符)
  • ✅ 自动下载缩略图
  • ✅ 支持指定文章数量
  • ✅ 按日期归档

依赖

  • SerpAPI skill(必须已安装)
  • SERPAPI_API_KEY 环境变量
  • Python 3(用于 JSON 解析和图片下载)

注意事项

  • 如果搜索结果没有缩略图,cover 字段会留空
  • 文件名会自动清理特殊字符
  • 文章按搜索结果的序号生成
  • 搜索使用 Google 搜索引擎(不是 Google News)
Usage Guidance
Do not run this skill without reviewing and editing the script. Specific recommendations: - The script contains a hard-coded SerpAPI API key. Remove this key and ensure the script uses the SERPAPI_API_KEY from your environment (or prompt you). If you or your organization already exposed this key somewhere, rotate it immediately. - Change the absolute paths to relative or configurable paths (avoid /Users/xyz/...). Confirm the referenced serp.py exists in your environment before running; otherwise the script exits. - Verify that downloading images from arbitrary external URLs is acceptable for your environment (network and storage). The script will fetch external resources referenced in search results. - Because the skill overrides the environment key, it could cause calls to SerpAPI to be billed to the embedded account. Only proceed after you replace the embedded key with your own or remove it entirely. - Prefer installing a maintained SerpAPI client or using the official SerpAPI skill interface rather than relying on another skill's script path. Given the embedded credential and path issues, treat this as suspicious: fix the problems above or use a different, audited skill implementation.
Capability Analysis
Type: OpenClaw Skill Name: generate-news-article Version: 1.0.0 The skill is classified as suspicious primarily due to the hardcoded `SERPAPI_API_KEY` found in `scripts/generate.sh`. This constitutes a critical credential leak, exposing a sensitive API key (`9cda299d6f3c24995d727709d33fd8a2ae9b6287be51667802acb4edb7b16796`) to anyone with access to the skill bundle. While the key is used for the skill's stated purpose (SerpAPI searches), its direct inclusion in the script violates security best practices and creates a severe vulnerability. Additionally, the script uses hardcoded paths for dependencies and output, reducing portability.
Capability Assessment
Purpose & Capability
The SKILL.md and README state the skill needs a SerpAPI key and the SerpAPI skill, but the registry metadata lists no required env vars or credentials. The code does call SerpAPI (via another skill's serp.py), so requiring SerpAPI is reasonable — however the mismatch between declared requirements and actual behavior is inconsistent and could mislead users.
Instruction Scope
The runtime script writes to a hard-coded agent root (/Users/lihaijian/.openclaw/workspace-wechat-publisher), expects another skill's script at a fixed absolute path, and downloads images from external URLs. These actions go beyond a simple, portable generator: the absolute paths make the script environment-specific and it overrides environment-based configuration (see below).
Install Mechanism
There is no network install spec (instruction-only), and the script is delivered with the skill (no remote download or extract). That lowers install risk, but the shipped script will be copied to the user's skills directory and executed locally — review it before running.
Credentials
SKILL.md says SERPAPI_API_KEY is required, but the bash script embeds a long SerpAPI API key inline and sets SERPAPI_API_KEY to that value when invoking the serp.py command. Embedding someone else's API key is unexpected and disproportionate: it overrides the user's key, leaks a credential to anyone who inspects the script, and could lead to billing/abuse of that account.
Persistence & Privilege
The skill does not request always:true and does not modify other skills' configurations. It writes files to an output directory (normal for a generator). The main privilege concern is the script's use of absolute paths into another skill's folder, but it does not alter system-wide settings.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install generate-news-article
  3. After installation, invoke the skill by name or use /generate-news-article
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
Initial release - generate Markdown news articles from Google search results. - Automatically generates individual Markdown articles from SerpAPI Google search results with images. - Supports keyword input and result count customization. - Downloads thumbnails into assets directory and links them in articles. - Saves articles in date-based folders with clean file names. - Each article includes title, cover image, summary, and source link. - Requires SerpAPI skill, API key, and Python 3 for execution.
Metadata
Slug generate-news-article
Version 1.0.0
License
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is Generate News Article?

Generate individual Markdown articles from SerpAPI Google search results with images. It is an AI Agent Skill for Claude Code / OpenClaw, with 575 downloads so far.

How do I install Generate News Article?

Run "/install generate-news-article" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Generate News Article free?

Yes, Generate News Article is completely free (open-source). You can download, install and use it at no cost.

Which platforms does Generate News Article support?

Generate News Article is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Generate News Article?

It is built and maintained by near2sea (@near2sea); the current version is v1.0.0.

💬 Comments