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:
CODEBLOCK0
Write to file:
CODEBLOCK1
Limit to 10 items:
CODEBLOCK2
Use full template with summaries:
CODEBLOCK3
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:
CODEBLOCK4
Script options
- -
-o, --output <file>: write markdown to file - INLINECODE7 : max number of articles
- INLINECODE8 : exclude summaries
- INLINECODE9 : truncate summary length
- INLINECODE10 :
short (default) or INLINECODE12
RSS/Atom 转 Markdown
当任务需要将 RSS/Atom 订阅源 URL 转换为 Markdown 格式时,使用此技能。
技能功能
- - 通过内置本地脚本将订阅源 URL 转换为 Markdown
- 支持标准输出或写入 Markdown 文件
- 支持限制文章数量和摘要控制
输入参数
- 输出路径
- 最大条目数
- 模板预设(short 或 full)
使用方法
运行本地脚本:
bash
python3 scripts/feedtomd.py
写入文件:
bash
python3 scripts/feedtomd.py https://example.com/feed.xml --output feed.md
限制为 10 条:
bash
python3 scripts/feedtomd.py https://example.com/feed.xml --limit 10
使用包含摘要的完整模板:
bash
python3 scripts/feedtomd.py https://example.com/feed.xml --template full
安全规则(必需)
- - 切勿将原始用户输入直接插入 shell 字符串。
- 始终将参数作为独立的 argv 令牌直接传递给脚本。
- URL 必须为 http 或 https 协议,且不得解析到 localhost/私有地址。
- 每个 HTTP 重定向目标(及最终 URL)均需重新验证,且必须解析到公网 IP。
- 输出路径必须为工作空间相对路径,并以 .md 结尾。
- 请勿使用 shell 重定向进行输出;应使用 --output。
安全命令模式:
bash
cmd=(python3 scripts/feedtomd.py $feed_url)
[[ -n ${outputpath:-} ]] && cmd+=(--output $outputpath)
[[ -n ${limit:-} ]] && cmd+=(--limit $limit)
[[ ${template:-short} = full ]] && cmd+=(--template full)
${cmd[@]}
脚本选项
- - -o, --output <文件>:将 Markdown 写入文件
- --limit <数字>:最大文章数量
- --no-summary:排除摘要
- --summary-max-length <数字>:截断摘要长度
- --template <预设>:short(默认)或 full