360 Secure SkillHub
360 安全技能中心

Feed To Md

该技能用于把 RSS/Atom 订阅源 URL 转换为 Markdown。它通过本地 Python 脚本执行,可输出到标准输出或写入工作区内的 .md 文件,并支持限制条目数、排除摘要、截断摘要和 short/full 模板。脚本会校验 URL 及重定向目标,拒绝私网地址。

myx0m0p
myx0m0p
热度 94.08
最近更新 2026-05-11 17:26:57
分类:效率依赖:代码执行 / 读写文件 / 第三方 API应用场景:文件转换 / 自动化脚本

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add feed-to-md
Metadata
name
feed-to-md
title
Feed to Markdown
description
Convert RSS or Atom feed URLs into Markdown using the bundled local converter script. Use this when a user asks to turn a feed URL into readable Markdown, optionally limiting items or writing to a file.
metadata
{"clawdbot":{"emoji":"📰","requires":{"bins":["python3"]}}}

RSS/Atom to Markdown

Use this skill when the task is to convert an RSS/Atom feed URL into Markdown.

What this skill does

  • Converts a feed URL to Markdown via a bundled local script
  • Supports stdout output or writing to a Markdown file
  • Supports limiting article count and summary controls

Inputs

  • Required: RSS/Atom URL
  • Optional:
    • output path
    • max item count
    • template preset (short or full)

Usage

Run the local script:

python3 scripts/feed_to_md.py "<feed_url>"

Write to file:

python3 scripts/feed_to_md.py "https://example.com/feed.xml" --output feed.md

Limit to 10 items:

python3 scripts/feed_to_md.py "https://example.com/feed.xml" --limit 10

Use full template with summaries:

python3 scripts/feed_to_md.py "https://example.com/feed.xml" --template full

Security rules (required)

  • Never interpolate raw user input into a shell string.
  • Always pass arguments directly to the script as separate argv tokens.
  • URL must be http or https and must not resolve to localhost/private addresses.
  • Every HTTP redirect target (and final URL) is re-validated and must also resolve to public IPs.
  • Output path must be workspace-relative and end in .md.
  • Do not use shell redirection for output; use --output.

Safe command pattern:

cmd=(python3 scripts/feed_to_md.py "$feed_url")
[[ -n "${output_path:-}" ]] && cmd+=(--output "$output_path")
[[ -n "${limit:-}" ]] && cmd+=(--limit "$limit")
[[ "${template:-short}" = "full" ]] && cmd+=(--template full)
"${cmd[@]}"

Script options

  • -o, --output <file>: write markdown to file
  • --limit <number>: max number of articles
  • --no-summary: exclude summaries
  • --summary-max-length <number>: truncate summary length
  • --template <preset>: short (default) or full