简介
本地多源信息聚合工具,支持新闻、RSS、社交媒体和金融数据的发现、订阅、同步与查询,适合需要统一内容管道的数据工作者。
原始描述
Use when the user wants to discover, track, sync, or query news, RSS, social, financial, or other external sources through agent-data-cli and any configured...
通过你的 Agent 添加
安装目录:using-data-cli/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。
点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。
或者手动安装
包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可;
目录名不用换,也不要把包直接解压到 skills 根目录。
技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。
中文使用说明 来自收录源
核心用法
agent-data-cli(简称 ADC)是一个基于 Python 的本地信息中心,采用 source/channel/content 三层模型管理多源内容。核心工作流涵盖五个环节:
- 发现(Discovery):
channel search和content search用于远程探索可用的频道和内容,仅读取不写入 - 订阅(Subscription):通过
content search找到目标后,使用content interact --verb subscribe建立持续跟踪关系 - 同步(Sync):
content update是唯一将远程内容写入本地数据库的命令,支持 cron 定时调度 - 本地查询(Query):
content query完全基于本地 SQLite,可配合--jsonl输出与jq/awk进行管道处理 - 远程交互(Interact):
content interact执行明确的远程副作用操作(如点赞、评论),需显式指定 source 和 ref
典型命令链示例:
# 发现 → 订阅 → 同步 → 查询
uv run -m adc channel search --source cryptocompare --query BTC
uv run -m adc content search --source cryptocompare --channel BTC --limit 10
uv run -m adc content interact --source cryptocompare --verb subscribe --ref cryptocompare:content/BTC
uv run -m adc content update --source cryptocompare
uv run -m adc content query --source cryptocompare --channel BTC --limit 50 --jsonl | jq '.price'
显著优点
- 统一抽象:单一 CLI 覆盖新闻、RSS、Twitter/X、小红书、加密货币行情等异构源
- 本地优先:所有内容落地本地数据库,支持离线查询和长期归档
- 管道友好:
--jsonl 输出原生适配 Unix 哲学,与 jq、awk、sponge 等工具无缝衔接
- 配置灵活:支持 source 级和 CLI 级代理配置,可细粒度控制网络行为
- 可扩展:通过
source_workspace 机制可接入 agent-data-hub 生态,安装官方或自定义源
潜在缺点与局限性
- 非即开即用:需要 Python + uv 环境,且需手动配置
source_workspace 和代理
- 源质量依赖:内容质量取决于各 source 实现,无内置内容清洗或去重机制
- 无可视化:纯 CLI 工具,无 Web UI 或图形浏览器
- 同步延迟:
content update 为拉模式,非实时推送,最小粒度受 cron 限制
- 硬边界约束:
content query 绝不触发远程搜索,若本地无数据则返回空集,新手易误解
适合人群
- 需要聚合多平台信息的数据分析师、量化研究员、舆情监测人员
- 偏好本地存储、可编程查询的技术用户
- 已在使用
agent-data-hub 生态的进阶玩家
- 不适合:追求开箱即用体验的非技术用户,或需要实时流式数据的场景
常规风险
- 代理泄露风险:
proxy_url 可能含敏感凭证,需避免提交至版本控制
- 频率限制:远程
search/update/interact 可能触发源站限流,建议配置合理 cron 间隔
- 数据一致性:
content query 反映的是上次 update 的快照,非实时状态
- 第三方源信任:通过
data_hub 安装的 source 需审计其网络行为和权限请求
--jsonl 输出原生适配 Unix 哲学,与 jq、awk、sponge 等工具无缝衔接source_workspace 机制可接入 agent-data-hub 生态,安装官方或自定义源- 非即开即用:需要 Python + uv 环境,且需手动配置
source_workspace和代理 - 源质量依赖:内容质量取决于各 source 实现,无内置内容清洗或去重机制
- 无可视化:纯 CLI 工具,无 Web UI 或图形浏览器
- 同步延迟:
content update为拉模式,非实时推送,最小粒度受 cron 限制 - 硬边界约束:
content query绝不触发远程搜索,若本地无数据则返回空集,新手易误解
适合人群
- 需要聚合多平台信息的数据分析师、量化研究员、舆情监测人员
- 偏好本地存储、可编程查询的技术用户
- 已在使用
agent-data-hub 生态的进阶玩家
- 不适合:追求开箱即用体验的非技术用户,或需要实时流式数据的场景
常规风险
- 代理泄露风险:
proxy_url 可能含敏感凭证,需避免提交至版本控制
- 频率限制:远程
search/update/interact 可能触发源站限流,建议配置合理 cron 间隔
- 数据一致性:
content query 反映的是上次 update 的快照,非实时状态
- 第三方源信任:通过
data_hub 安装的 source 需审计其网络行为和权限请求
agent-data-hub 生态的进阶玩家- 代理泄露风险:
proxy_url可能含敏感凭证,需避免提交至版本控制 - 频率限制:远程
search/update/interact可能触发源站限流,建议配置合理 cron 间隔 - 数据一致性:
content query反映的是上次update的快照,非实时状态 - 第三方源信任:通过
data_hub安装的 source 需审计其网络行为和权限请求
技能正文
name: using-data-cli
description: Use when the user wants to discover, track, sync, or query news, RSS, social, financial, or other external sources through agent-data-cli and any configured source workspace such as agent-data-hub.
Using agent-data-cli
Overview
Overview
agent-data-cli is a local information center for multi-source content.
This skill is for discovering sources, searching channels, subscribing, syncing remote content, querying the local database, and running explicit interactions against news, RSS, social media, and financial data sources.
Use it for:
- news
- social media
- financial data
- RSS feeds
- other sources that fit the
source/channel/contentmodel
This skill is operational, not explanatory. When the user's goal is clear, execute the CLI flow directly instead of only suggesting commands.
When to Use
Use this skill when the user wants to:
- inspect available sources or channels
- discover remote content before subscribing
- subscribe to channels for ongoing tracking
- sync subscribed channels into the local database
- query locally stored content
- run explicit remote interactions on content refs
Do not use this skill for:
- implementing or redesigning a source
- changing the command surface or core protocol
- free-form scraping outside the
agent-data-climodel
Install From skills.sh
Install this skill directly from skills.sh:
npx skills add https://github.com/severinzhong/agent-data-cli --skill using-data-cli
Install And Repo Setup
If agent-data-cli is not present locally, install it first:
git clone https://github.com/severinzhong/agent-data-cli
cd agent-data-cli
uv sync
Then:
- Load the bundled skills from this repository's
skills/directory. - Use the repo root that contains
pyproject.toml,cli/, andstore/. - Treat
source_workspaceas external configuration. The default path is./sources, and it is typically backed by the separateagent-data-hubworkspace. - Execute commands from the repo root.
Always prefer:
uv run -m adc ...
Operating Rules
- Translate natural language into the smallest correct CLI flow.
- Respect the command semantics exactly.
- Do not invent fallback behavior when a capability is unsupported.
- Do not hide remote side effects behind search or update.
- Do not turn
content query into a remote search.
- Do not auto-subscribe unless the user's goal implies ongoing tracking.
- For
content interact, require an explicit source and explicit refs.
content query into a remote search.content interact, require an explicit source and explicit refs.Read references/command-semantics.md before using a command family you have not touched in the current session.
Read references/task-patterns.md when the user request is ambiguous and needs stable intent-to-command mapping.
Read references/result-reporting.md before reporting back after a multi-step run.
Usage Tips
Configure Proxy
proxy_url uses one field with three states:
- unset: use the user's current network environment
http://127.0.0.1:7890: force that proxydirect: force direct connection and break CLI-level proxy inheritance
When one source needs its own proxy behavior, configure it explicitly:
uv run -m adc config source set <source> proxy_url http://127.0.0.1:7890
uv run -m adc config source set <source> proxy_url direct
If multiple sources should share one proxy, set the CLI-level default:
uv run -m adc config cli set proxy_url http://127.0.0.1:7890
uv run -m adc config cli unset proxy_url
If a source needs to bypass an inherited CLI proxy, set that source to direct.
Inspect current source config:
uv run -m adc config source list <source>
Configure source_workspace
Core only loads sources that exist in the current workspace.
uv run -m adc config cli explain source_workspace
uv run -m adc config cli set source_workspace ./sources
uv run -m adc config cli set source_workspace /abs/path/to/agent-data-hub
If the workspace contains data_hub, use it to discover, install, or uninstall official sources:
uv run -m adc content search --source data_hub --channel official --query xiaohongshu
uv run -m adc content interact --source data_hub --verb install --ref data_hub:content/xiaohongshu
uv run -m adc content interact --source data_hub --verb uninstall --ref data_hub:content/xiaohongshu
Schedule Updates with cron
Use a system scheduler when you want periodic local syncs. Keep the repo path explicit and append logs so the run can be inspected later:
30 8 * * * cd /abs/path/to/agent-data-cli && /abs/path/to/uv run -m adc content update --source bbc >> /abs/path/to/agent-data-cli/update.log 2>&1
If you need tighter OS integration, the same pattern can also be implemented with launchd or systemd.
Use --jsonl with jq or awk
For machine filtering, prefer --jsonl and pipe to shell tools:
uv run -m adc content query --source cryptocompare --channel BTC --limit 30 --jsonl | jq '.title'
uv run -m adc content query --source cryptocompare --channel BTC --limit 30 --jsonl | jq 'select(.channel=="BTC")'
uv run -m adc content query --source cryptocompare --channel BTC --limit 30 --jsonl | awk -F'"' '/"channel": "BTC"/ {print $0}'
uv run -m adc content query --source xiaohongshu --children xiaohongshu:content/note%3A123 --depth -1 --jsonl | jq '.relation_depth'
The same pattern works for remote discovery:
uv run -m adc channel search --source cryptocompare --query BTC --limit 5 --jsonl | jq '.channel_key'
Save Output with > and >>
Use > to overwrite a file and >> to append:
uv run -m adc content query --source cryptocompare --channel BTC --limit 100 --jsonl > btc.jsonl
uv run -m adc content query --source cryptocompare --channel ETH --limit 100 --jsonl >> btc.jsonl
uv run -m adc channel search --source cryptocompare --query BTC --limit 20 --jsonl > channels.jsonl
This is useful when you want to:
- keep a snapshot for later analysis
- feed results into
jq,awk, or other CLI tools - accumulate multiple command outputs into one JSONL file
Execution Flow
- Classify the request as discovery, subscription, sync, local query, or remote interact.
- Check whether the task should stay local or requires remote execution.
- If needed, inspect source capability and config state before executing the main command.
- Run the shortest correct command chain.
- Report what was done, what was found, and what next action is now available.
Hard Boundaries
channel search is remote channel discovery only.
content search is remote content discovery only and does not write to the database.
content update is the only remote sync path that writes to the database.
content query is local-only and never triggers remote work.
content interact is explicit remote side effect execution only.
- installing source runtime dependencies must stay out of the core project manifest; use
uv pip install or source-local init.sh, not uv add
channel searchis remote channel discovery only.content searchis remote content discovery only and does not write to the database.content updateis the only remote sync path that writes to the database.content queryis local-only and never triggers remote work.content interactis explicit remote side effect execution only.- installing source runtime dependencies must stay out of the core project manifest; use
uv pip installor source-localinit.sh, notuv add
If a task does not fit these boundaries, say so directly instead of approximating.
正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。