← 返回 Skills 市场
mewic

Content News Thai

作者 mewic · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
296
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install content-news-thai
功能描述
Generate news-style social media images (1080x1350) with Thai text overlay and matching captions. Use when asked to create content, make a news post image, g...
使用说明 (SKILL.md)

Content News Thai

Generate news-style post images with Thai text overlay + captions for social media.

Setup (first time only)

Run the setup script to install dependencies (canvas, Thai fonts):

bash \x3CSKILL_DIR>/scripts/setup.sh

On Docker/VPS this installs: libcairo2, libpango, Thai fonts (Kanit, Prompt, Sarabun). On macOS: uses Homebrew for cairo/pango.

Generate News Image

cd \x3CSKILL_DIR>/scripts && node gen-news.mjs '\x3Cjson>'

Parameters

Param Required Description
headline Main headline (Thai/English, auto-wraps)
sub Sub-headline text
badge Badge label (default: "AI NEWS")
badgeColor Badge color (default: "#CC0000")
bgImage Background image path or URL
bgColor Fallback bg gradient color (default: "#0a0a1a")
source Source attribution at bottom
output Output file path (.jpg)
brandName Watermark text (bottom-right)
accentColor Bottom bar color (default: "#CC0000")

Example

cd \x3CSKILL_DIR>/scripts && node gen-news.mjs '{"headline":"AI กำลังเปลี่ยนวงการค้าปลีก","sub":"ยอดขายพุ่ง 40% ใน 6 เดือน","badge":"BREAKING NEWS","source":"Reuters • มี.ค. 2026","brandName":"MY BRAND","output":"/tmp/news_post.jpg"}'

Output: JSON {"status":"done","output":"/tmp/news_post.jpg","size":"1080x1350","type":"image"}

Background Image

Two approaches:

  1. With bgImage — provide a path/URL to a photo. The script covers it with dark gradient for text readability.
  2. Without bgImage — generates a dark gradient background with subtle grid pattern. Good for text-focused posts.

For best results, generate a background image first (use the AI model's image generation), save it, then pass the path as bgImage.

Workflow: Full Content Set

When asked to create a complete content set:

  1. Write headline + sub — short, punchy, Thai-friendly
  2. Generate background — use AI image gen or use bgColor for clean look
  3. Run gen-news.mjs — creates 1080x1350 image with Thai text overlay
  4. Write caption — storytelling style, short sentences, end with engaging question
  5. Return — image path + caption to user

Caption Style Guide

  • Open with a scroll-stopping hook (short, impactful)
  • Tell the story with short sentences, reveal layer by layer
  • Include the brand's perspective/opinion
  • End with: impact summary → specific question → soft share cue (if appropriate)
  • Add 3-5 relevant hashtags
  • Do NOT end with generic "คิดเห็นยังไงคอมเมนต์มา"

Troubleshooting

  • "canvas" error → rerun setup.sh
  • Fonts look wrong → check assets/fonts/ has .ttf files, rerun setup.sh
  • bgImage not found → use absolute path or URL
安全使用建议
This skill appears to do what it claims: generate Thai news-style images. Before installing or running setup.sh, consider: 1) setup.sh installs system packages (apt/brew), npm dependencies (canvas) and downloads fonts from GitHub — run it in a controlled environment (docker container or VM) if you want to avoid changing your host. 2) The script copies fonts to a system font directory and may use sudo; expect system-wide changes. 3) gen-news.mjs can load bgImage URLs (it may fetch remote images) and writes output files to disk — only pass URLs/paths you trust and choose a safe output directory. 4) npm canvas requires native build tools; review the package.json and the npm install output. If you are comfortable with those actions, the skill is coherent and reasonable for its purpose; otherwise run it in an isolated environment or inspect/run the scripts manually before use.
功能分析
Type: OpenClaw Skill Name: content-news-thai Version: 1.0.0 The skill bundle contains several high-risk behaviors and potential vulnerabilities. The `setup.sh` script performs system-level modifications, including installing packages via `apt-get` with `sudo` and installing fonts system-wide, which may be excessive for a standard skill. Additionally, `gen-news.mjs` is vulnerable to path traversal and arbitrary file writes because it uses unsanitized user input from a JSON string to define the `output` and `bgImage` file paths in `writeFileSync` and `loadImage`. While these actions align with the stated purpose of generating images, the lack of input validation and the requirement for elevated privileges during setup pose a security risk to the host environment.
能力评估
Purpose & Capability
Name/description match the code and instructions: gen-news.mjs renders 1080x1350 images with Thai fonts; setup.sh installs canvas and Thai fonts. There are no unrelated credentials, binaries, or config paths declared.
Instruction Scope
SKILL.md instructs running the provided setup.sh and calling node gen-news.mjs with a JSON param. The runtime will read optional bgImage paths/URLs and write an output file. This is within scope, but the setup step can install system packages, copy fonts system-wide, and requires network access to download fonts and (optionally) fetch remote bgImage URLs — users should be aware of those side-effects before running.
Install Mechanism
No packaged install spec in registry (instruction-only), but setup.sh performs system package installation (apt/brew), runs npm install (canvas), and downloads fonts from GitHub raw URLs. Fonts from Google Fonts on GitHub are expected; npm canvas is a normal dependency but requires native build tools. These are moderate-risk actions because they install system packages and node modules and write files to disk.
Credentials
The skill declares no required env vars or credentials. The code optionally reads OPENCLAW_WORKSPACE to locate fonts if present — this is benign and documented. No unrelated secrets or external service tokens are requested.
Persistence & Privilege
always is false. The setup script may install fonts system-wide (copies to /usr/local/share/fonts) and uses sudo if needed; that modifies system state and may require elevated privileges. The skill does not modify other skills or agent configs.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install content-news-thai
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /content-news-thai 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release: news-style image gen with Thai text overlay (Kanit/Prompt/Sarabun fonts), 1080x1350, canvas-based
元数据
Slug content-news-thai
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Content News Thai 是什么?

Generate news-style social media images (1080x1350) with Thai text overlay and matching captions. Use when asked to create content, make a news post image, g... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 296 次。

如何安装 Content News Thai?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install content-news-thai」即可一键安装,无需额外配置。

Content News Thai 是免费的吗?

是的,Content News Thai 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Content News Thai 支持哪些平台?

Content News Thai 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Content News Thai?

由 mewic(@mewic)开发并维护,当前版本 v1.0.0。

💬 留言讨论