NewsPaper

v1.0.1

Render structured news content into a styled HTML newspaper page with optional AI-generated images using ComfyUI integration.

3· 141·0 current·0 all-time

Install

OpenClaw Prompt Flow

Install with OpenClaw

Best for remote or guided setup. Copy the exact prompt, then paste it into OpenClaw for spootmu/newspaper.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "NewsPaper" (spootmu/newspaper) from ClawHub.
Skill page: https://clawhub.ai/spootmu/newspaper
Keep the work scoped to this skill only.
After install, inspect the skill metadata and help me finish setup.
Use only the metadata you can verify from ClawHub; do not invent missing requirements.
Ask before making any broader environment changes.

Command Line

CLI Commands

Use the direct CLI path if you want to install manually and keep every step visible.

OpenClaw CLI

Bare skill slug

openclaw skills install newspaper

ClawHub CLI

Package manager switcher

npx clawhub@latest install newspaper
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
Name/description (HTML newspaper rendering + optional ComfyUI images) match the included files (server, comfy-client, Handlebars template). No unrelated environment variables, binaries, or config paths are required; package.json deps (express, axios, handlebars) are appropriate for the task.
Instruction Scope
SKILL.md and AGENT.md instruct the agent to POST to a local service (http://localhost:3000/render) and to contact a ComfyUI service at a local default (http://127.0.0.1:8000). The code only reads templates, writes HTML to ./output, and calls the ComfyUI endpoints /prompt, /history/{id}, and /queue. Potential privacy/information-leak note: comfy-client.js logs the full prompt to console (console.log('[ComfyUI] 开始生成图片,prompt:', prompt,...)), which contradicts the SKILL.md claim that logs only contain title and article count — image prompts (and thus any sensitive content included in prompts) can appear in logs and in requests to COMFY_BASE_URL. Also the rendered HTML embeds image URLs returned by ComfyUI (COMFY_VIEW_URL), so those URLs may point to external resources if COMFY_VIEW_URL is configured externally.
Install Mechanism
Instruction-only install (no install spec) and included source files — no external archives or unusual installers. Dependencies are standard npm packages trackable from package.json. This is a low-risk install mechanism.
Credentials
The skill declares no required environment variables; it documents optional COMFY_BASE_URL and COMFY_VIEW_URL to override local ComfyUI address. These are proportional to the advertised ComfyUI integration. No unrelated secrets/credentials are requested.
Persistence & Privilege
always:false; the skill runs as a normal service and writes output files to its own ./output directory. It does not modify other skills, system-wide agent settings, or request permanent platform-wide privileges.
Assessment
This skill appears to do what it says: render HTML and optionally call a ComfyUI image service. Before installing, consider: 1) By default it calls local ComfyUI (127.0.0.1:8000); if you set COMFY_BASE_URL/COMFY_VIEW_URL to a remote service, your image prompt text (and any sensitive content included in it or in article bodies) will be sent to that external endpoint. 2) comfy-client.js logs the full image prompt to console — do not include sensitive data in imagePrompt or article body if you expect logs to be retained or forwarded. 3) The service writes HTML files to ./output and serves them on localhost:3000; ensure appropriate filesystem permissions and that hosting this on a network-exposed machine is intended. If you need stronger privacy, run ComfyUI locally, avoid sensitive prompt content, and review/disable or redirect logging in comfy-client.js.
comfy-client.js:4
Environment variable access combined with network send.
Confirmed safe by external scanners
Static analysis detected API credential-access patterns, but both VirusTotal and OpenClaw confirmed this skill is safe. These patterns are common in legitimate API integration skills.

Like a lobster shell, security has layers — review code before you run it.

latestvk97339h84bh6g5dh3enfvxm54s83w2kf
141downloads
3stars
2versions
Updated 4w ago
v1.0.1
MIT-0

AI Newspaper Renderer Skill

工具描述

AI 报纸渲染服务 - 将结构化新闻内容渲染成仿实体报纸风格的 HTML 页面。支持 ComfyUI AI 图片生成。

服务地址: http://localhost:3000

API 端点

POST /render

渲染报纸 HTML。

请求格式:

POST http://localhost:3000/render
Content-Type: application/json

请求参数:

{
  "title": "string (必需) - 报纸标题",
  "subtitle": "string (可选) - 副标题",
  "articles": [
    {
      "headline": "string (必需) - 文章标题",
      "body": "string (必需) - 文章正文,用\\n\\n分隔段落",
      "imagePrompt": "string (可选) - AI 绘画提示词,最多 1 个"
    }
  ],
  "comfyOptions": {
    "enabled": "boolean (可选,默认 true)",
    "timeout": "number (可选,默认 120000ms)",
    "interval": "number (可选,默认 2000ms)",
    "width": "number (可选,默认 1024)",
    "height": "number (可选,默认 1024)"
  }
}

成功响应:

{
  "success": true,
  "id": "生成的唯一 ID",
  "url": "http://localhost:3000/output/{id}.html",
  "imageStatus": {
    "generated": "是否生成图片",
    "prompt": "使用的提示词",
    "imageUrl": "ComfyUI 图片地址",
    "articleIndex": "图片所在文章索引",
    "error": "错误信息(如有)"
  }
}

错误响应:

{
  "success": false,
  "errors": ["错误列表"]
}

使用规则

输入验证

  • title: 必需,非空字符串
  • articles: 必需,至少包含 1 篇文章
  • 每篇文章必须有 headlinebody
  • imagePrompt: 最多只能有 1 个(单图限制)

内容组织策略

头条文章(articles[0]):

  • 跨栏显示,最重要内容
  • 建议放置 imagePrompt(如有)
  • 正文建议 300-800 字

普通文章:

  • 次要新闻
  • 正文建议 100-500 字
  • 不需要 imagePrompt

正文格式

  • 使用 \n\n 分隔段落
  • 每段 50-200 字为宜
  • 首段不缩进,后续段落缩进

图片提示词指南

  • 使用英文描述
  • 具体详细,包含主体 + 环境 + 风格
  • 示例:"A futuristic AI robot scientist in high-tech laboratory, holographic displays, blue lighting, digital art"

调用示例

const response = await fetch('http://localhost:3000/render', {
    method: 'POST',
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify({
        title: "科技日报",
        subtitle: "前沿科技资讯",
        articles: [
            {
                headline: "AI 大模型迎来重大突破",
                body: "今日发布最新 AI 模型...\n\n研究团队表示...",
                imagePrompt: "A futuristic AI robot scientist, digital art"
            },
            {
                headline: "量子计算进展",
                body: "科学家实现新突破..."
            }
        ],
        comfyOptions: {
            enabled: true,
            timeout: 120000,
            interval: 2000,
            width: 1024,
            height: 512
        }
    })
});

const result = await response.json();
// result.url 为报纸页面地址
// result.imageStatus 包含图片生成状态

ComfyUI 集成

服务地址

  • ComfyUI 服务地址:http://127.0.0.1:8000
  • 提交任务:{COMFY_BASE_URL}/prompt
  • 查看图片:{COMFY_VIEW_URL}/view

环境变量配置

# 可选:自定义 ComfyUI 地址
export COMFY_BASE_URL="http://127.0.0.1:8000"
export COMFY_VIEW_URL="http://127.0.0.1:8000"

图片生成流程

  1. 检测 imagePrompt 字段
  2. 提交任务到 ComfyUI
  3. 轮询 /history/{prompt_id} 直到完成
  4. 提取图片 URL 嵌入 HTML

降级策略

  • ComfyUI 不可用时,使用占位图继续渲染
  • 生成超时/失败时,不中断渲染流程

输出布局

  • 4 栏布局(大屏幕)
  • 3 栏布局(中等屏幕)
  • 2 栏布局(小屏幕)
  • 1 栏布局(手机)

样式特点

  • 仿实体报纸风格
  • 宋体/楷体/黑体中文字体
  • 栏线分隔
  • 头条图文并排
  • 普通文章图片环绕

健康检查

GET http://localhost:3000/health

响应:{ "status": "ok", "timestamp": "..." }

错误处理

错误原因解决方案
缺少 title未提供标题从内容提取或询问用户
articles 为空没有文章确保至少 1 篇
多个 imagePrompt违反单图限制只保留 1 个
ComfyUI 超时生成时间长增加 comfyOptions.timeout
ComfyUI 不可用服务未启动检查 ComfyUI 或使用占位图

安全提示

  • 日志仅记录标题和文章数量,不记录完整内容
  • 避免在 body 中传递敏感信息
  • 渲染的 HTML 会引用 ComfyUI 返回的图片 URL

AI 规划流程

  1. 分析需求 → 确定报纸主题
  2. 收集内容 → 生成或整理文章
  3. 判断配图 → 生成 1 个英文 imagePrompt
  4. 组织内容 → 头条放最重要内容 + 图片
  5. 调用 API → POST /render
  6. 返回结果 → 提供 URL 和图片状态

Comments

Loading comments...