tencent-news
- Repo stars 1
- Author updated Live
- Author repo workbuddy
- Domain
- Other · news · tencent · headlines
- Compatible agents
-
- Claude Code
- Cursor
- Cline
- Codex
- Windsurf
- Gemini CLI
- +20
- Trust score
- 93 / 100 · audit passed
- Author / version / license
- @zhizhunbao · v1.0.1 · no license declared
- Token usage
- Lean
- Setup complexity
- Manual integration
- External API key
- Required · Vendor-specific
- Operating systems
- macOS · Linux · Windows
- Runtime requirements
- Node.js · Bun · Python
- Permissions
-
- Read-only
- Write / modify
- Shell exec
- Network behavior
- External requests
- Install commands
- 26 variants
Profile is derived at build time from SKILL.md and install vectors. Subject to drift from author intent.
Heads up: 检出高风险片段:pipe_curl_to_shell
---
name: tencent-news
description: 通过 tencent-news-cli 获取腾讯新闻内容。 所有平台统一通过 bun 运行 TypeScript 脚本,不依赖 Node.js、Python 或平台特定 Shell。 执行任何…
category: other
runtime: Node.js / Bun / Python
---
# tencent-news output preview
## PART A: Task fit
- Use case: 通过 tencent-news-cli 获取腾讯新闻内容。 所有平台统一通过 bun 运行 TypeScript 脚本,不依赖 Node.js、Python 或平台特定 Shell。 执行任何脚本之前,先检测 bun 是否可用:bun --version。若不可用,安装 bun: curl -fsSL https://bun.sh/install | bash requires Vendor-specific API key; runs on Node.js. Works with Claude Code, Cursor, Cline and 23 more..
- Inputs: target material, constraints, expected output, and acceptance criteria.
- Evidence boundary: follow “Workflow / 前置:确保 bun 可用 / Output Format” and do not present inference as author intent.
## PART B: Execution result
- **01** The card summarizes the use case; runtime output centers on “通过 tencent-news-cli 获取腾讯新闻内容。 所有平台统一通过 bun 运行 TypeScript 脚本,不依赖 Node.js、Python 或平台特定 Shell。 执行任何脚本之前,先检测 bun 是否可用:bun --version。若不可用,安装 bun: curl -fsSL https://bun.sh/install | bash requires Vendor-specific API key; runs on Node.js. Works with Claude Code, Cursor, Cline and 23 more.”.
- **02** When the source has headings, the agent prioritizes “Workflow / 前置:确保 bun 可用 / Output Format” so the result follows the author’s structure.
- **03** Typical output includes task judgment, concrete steps, required commands or file edits, validation, and follow-up options.
- **04** Risk context follows the fingerprint: read files, write/modify files, run shell commands; may access external network resources; requires Vendor-specific API keys.
## Running Rules
- read files, write/modify files, run shell commands; may access external network resources; requires Vendor-specific API keys.
- Validate with a small sample before expanding scope.
- Return the result, validation criteria, and next iteration options. The source does not require a stable slash command. After installation, invoke the skill by name and describe the task.
Name target files or source material, expected output, forbidden changes, and whether network or shell access is allowed. Permission fingerprint: read files, write/modify files, run shell commands.
Start with a small task and check whether the result follows “Workflow / 前置:确保 bun 可用 / Output Format”. Inspect diffs, logs, previews, or tests before expanding scope.
Confirm the final output includes a concrete result, evidence, and next action. If it stays generic, tighten inputs, boundaries, and acceptance criteria.
---
name: tencent-news
description: 通过 tencent-news-cli 获取腾讯新闻内容。 所有平台统一通过 bun 运行 TypeScript 脚本,不依赖 Node.js、Python 或平台特定 Shell。 执行任何…
category: other
source: zhizhunbao/workbuddy
---
# tencent-news
## When to use
- 通过 tencent-news-cli 获取腾讯新闻内容。 所有平台统一通过 bun 运行 TypeScript 脚本,不依赖 Node.js、Python 或平台特定 Shell。 执行任何脚本之前,先检测 bun 是否可用:bun…
- Use it when the task has clear inputs, repeatable steps, and validation criteria.
## What to provide
- Target material, scope, expected result, and forbidden changes.
- Whether network, commands, file writes, or external services are allowed.
## Execution rules
- Organize steps around “Workflow / 前置:确保 bun 可用 / Output Format” and keep inference separate from source facts.
- read files, write/modify files, run shell commands; may access external network resources; requires Vendor-specific API keys.
- Validate with a small sample before expanding the task.
## Output requirements
- Return the deliverable, key evidence, validation method, and next action.
- Mark missing information as unknown; do not invent commands, platforms, or dependencies. The author source anchors workflow facts; repository files anchor sources and commands; Fluxly only adds fit, limitations, and quality judgment.
skill "tencent-news" {
input -> user goal + target files + boundaries + acceptance criteria
context -> Workflow / 前置:确保 bun 可用 / Output Format
rules -> SKILL.md triggers / order / output contract
runtime -> Node.js / Bun / Python | read files, write/modify files, run shell commands | may access external network resources
guardrails -> requires Vendor-specific API keys + small-sample validation + diff/log review
output -> copyable result + checklist + next iteration
} 腾讯新闻内容订阅
通过 tencent-news-cli 获取腾讯新闻内容。
核心原则:基础设施流程(安装、更新、Key 配置)交给脚本处理;智能体只负责选择 CLI 子命令和组合参数——始终先读
help,不要硬编码。
Workflow
所有平台统一通过 bun 运行 TypeScript 脚本,不依赖 Node.js、Python 或平台特定 Shell。
前置:确保 bun 可用
执行任何脚本之前,先检测 bun 是否可用:bun --version。若不可用,安装 bun:
macOS / Linux:
curl -fsSL https://bun.sh/install | bash
Windows:
powershell -c "irm bun.sh/install.ps1 | iex"
安装后若当前终端找不到 bun,需重启终端或手动刷新 PATH,再次 bun --version 确认。
运行状态检查
bun scripts/cli-state.ts解析返回 JSON,重点关注platform.cliPath、platform.helpCommand、cliExists、needsUpdateCheck、apiKey.present。安装 CLI(
cliExists为false时)bun scripts/install-cli.ts若脚本失败,阅读references/installation-guide.md。更新 CLI(
needsUpdateCheck为true,或 CLI 提示版本过旧时)bun scripts/check-update.ts --apply脚本内部通过version判断是否有新版本,有则下载覆盖,无则跳过。配置 API Key(
apiKey.present为false时) 检查:bun scripts/api-key.ts设置:bun scripts/api-key.ts --set KEY- 解析返回 JSON 中
apiKey部分,按以下优先级恢复 Key:apiKey.present为true→ Key 已在环境变量中,无需操作。apiKey.present为false且apiKey.configFileHasKey为true→ 直接复制 JSON 中restoreCommand的完整值并执行,将 Key 导入当前 Shell。示例:脚本返回"restoreCommand": "export TENCENT_NEWS_APIKEY='eyJhbGci...'"时,直接在终端执行:
原样执行export TENCENT_NEWS_APIKEY='eyJhbGci...'restoreCommand,不要修改或重新拼接。apiKey.present为false且apiKey.configFileHasKey为false→ 不要自动获取 Key,不要用工具打开浏览器,不要执行open/xdg-open/start等命令。 只需向用户输出以下引导文案,让用户自己操作:请使用浏览器打开 API Key 获取页面 获取 Key
- 首次设置 Key:
bun scripts/api-key.ts --set KEY- KEY 是裸值,不要加引号。 从用户消息中仅提取纯 Key 字符串(去掉
API Key:等前缀、去掉首尾引号和空白),直接拼在--set后面。 - 示例:用户说
API Key: abcdefg123456,则执行:bun scripts/api-key.ts --set abcdefg123456 - 脚本会同时写入 Shell Profile(
~/.zshrc/~/.bashrc/~/.profile,Windows 为用户环境变量)和配置文件(~/.config/tencent-news-cli/config.json),双份存储确保跨会话、跨沙箱可用。
- KEY 是裸值,不要加引号。 从用户消息中仅提取纯 Key 字符串(去掉
- 设置后必须执行返回的
sessionCommand让当前终端生效。不需要额外存入永久记忆。 - 详细配置与故障排查见
references/env-setup-guide.md。
- 解析返回 JSON 中
执行
help优先使用platform.helpCommand;自行拼命令时确保正确引用platform.cliPath,Windows 使用 PowerShell 调用形式。根据
help输出选择子命令执行,按下方 Output Format 输出结果。
Output Format
CLI 返回的每条新闻通常包含标题、摘要、来源、链接等字段。输出时必须按以下结构展示:
1. **标题文字**
来源:作者或媒体名称
摘要内容……
[查看原文](https://…)
2. **标题文字**
来源:作者或媒体名称
摘要内容……
[查看原文](https://…)
**来源:腾讯新闻**
- 标题:
序号. **标题**,序号从 1 开始,标题加粗。 - 来源:
来源:后跟 CLI 返回的作者或媒体名称;CLI 无该字段时可省略。 - 摘要:来源下方紧跟;CLI 无摘要字段时可省略。
- 原文链接:如果有链接,则输出
[查看原文](URL),确保链接可点击,没有则不输出。 - 其他有价值字段(发布时间、标签等)可在来源下方补充。
- 多条新闻间用空行分隔。
- 列表末尾:所有新闻条目之后,另起一行加粗展示
**来源:腾讯新闻**。
CLI 执行失败处理
CLI 命令失败后,立即停止,绝不通过 WebSearch 或其他方式获取新闻作为替代。
- CLI 返回非零退出码、超时或输出含权限/安全错误时,不要重试,不要换方式。
- 根据错误信息判断原因并引导用户操作:
- macOS Gatekeeper(
cannot be opened、not verified)→ 系统设置 → 隐私与安全性 → 「仍要打开」→ 确认框「打开」 - 企业安全软件(
connection refused、防火墙拦截)→ 安全提示中点击「信任」/「允许」 - 权限不足(
permission denied)→chmod +x <cliPath> - 其他 → 展示完整错误,请用户处理
- macOS Gatekeeper(
- 用户确认操作完成后再重试。即使多次失败,也只能告知用户无法获取新闻并说明原因,绝不回退到其他信息源。
Gotchas
- 所有平台统一通过
bun运行 TypeScript 脚本,不依赖 Node.js 或 Python。 - 32 位架构不支持,脚本会直接报错。
- 不要缓存 CLI 的存在状态,每次查询前通过
cli-state重新验证。
Scripts
| 脚本 | 功能 |
|---|---|
cli-state.ts |
输出安装状态、更新检查状态、API Key 状态 |
install-cli.ts |
下载当前平台 CLI 并验证 |
check-update.ts |
版本检查,带 --apply 时自动更新 |
api-key.ts |
检查或设置 TENCENT_NEWS_APIKEY |
References
- 手动安装与下载规则:
references/installation-guide.md - 更新字段说明与手动回退:
references/update-guide.md - API Key 获取与手动配置:
references/env-setup-guide.md
Decide Fit First
Design Intent
How To Use It
Boundaries And Review