fetch-data

fetch-data is a skill for Claude Code, Codex from agentscope-ai/QwenPaw-Data. It costs 286 tokens per session (7,014 once invoked), scanned A, original, Apache-2.0.

A workflow that turns a plain-language request for business data into a database query, runs it in a data warehouse or lake, and returns the results for analysis.

In plain words
What is it for?
Use it when someone asks for metrics, records, SQL, exports, or missing data for business analysis, retention, conversion, cohort studies, exploration, modelling, or metadata checks.
Why use it?
It fills in missing details about the business question, metrics, time range, and data tables before generating a query, reducing errors caused by incomplete requests.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when someone asks for metrics, records, SQL, exports, or missing data for business analysis, retention, conversion, cohort studies, exploration, modelling, or metadata checks.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/agentscope-ai/qwenpaw-data/fetch-data
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add agentscope-ai/QwenPaw-Data --skill fetch-data
Clone the repo
git clone --depth 1 https://github.com/agentscope-ai/QwenPaw-Data

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for fetch-data

README.md
[![agentmods](https://agentmods.dev/badge/skills/agentscope-ai/qwenpaw-data/fetch-data/github.svg)](https://agentmods.dev/skills/agentscope-ai/qwenpaw-data/fetch-data)
Your own site
<a href="https://agentmods.dev/skills/agentscope-ai/qwenpaw-data/fetch-data"><img src="https://agentmods.dev/badge/skills/agentscope-ai/qwenpaw-data/fetch-data/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for fetch-data

Your own site · 80×15
<a href="https://agentmods.dev/skills/agentscope-ai/qwenpaw-data/fetch-data"><img src="https://agentmods.dev/badge/skills/agentscope-ai/qwenpaw-data/fetch-data.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 286 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 7,014 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00286 $0.07014
Opus 5.5 $0.00114 $0.02806
Sonnet 5.5 $0.00057 $0.01403
Haiku 4.5 $0.00029 $0.00701

Measured 15d ago against content hash be56ebfc40b4, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

fetch-data scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 15d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/_common.py, scripts/generate_nl2sql_prompt.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

packages/qwenpaw-data-skills/skills/workflows/fetch-data/SKILL.md · 280 lines

How it starts

The opening of the file, as written. The whole thing — 280 lines — stays where its author put it; the contents beside it link to each section on GitHub.

fetch-data

将用户的数据分析问题转为结构化意图,并补全取数所需完整语义上下文,生成 NL2SQL prompt 与 SQL,执行后返回查询结果供下游分析。

前置条件

  1. 确认用户的数据分析问题明确(要分析什么、大致时间/范围)。
  2. 检查当前 Session 产物目录(系统提示中给出的绝对路径)是否已包含全部所需分析数据:
    • 已全部存在 → 直接使用这些文件,结束取数,不执行取数流程。
    • 有缺失 → 继续。

取数流程

存储约定:落盘生成 NL2SQL prompt 所必需的产物,以及据此产出的 prompt / SQL 本身。文件命名由各步骤自行决定(建议语义清晰、便于追溯),但目录不能错位。

下文 {workdir} 即当前 Session 产物目录;绝对路径以系统提示中「当前 Session 产物目录」为准,在其下按相对布局落盘,不要写字面量占位符。

Step 产物 存储路径 性质
1 结构化问题(含 Step 3 改写后的版本) {workdir}/steps/ prompt 输入
2–3 → 4 指标信息 + 已选表元数据(合并为 context.json,Step 3 后一次性写入;Step 2 / 3 期间只留在对话中,不落盘) {workdir}/data/raw/ prompt 输入(业务图谱 / 物理表元数据)
4 NL2SQL prompt {workdir}/steps/ prompt 产出
5 生成的 SQL {workdir}/steps/ prompt 下游代码

Step 1. 问题结构化

从用户的自然语言分析问题中抽取字段,结构化产物落盘到 {workdir}/steps/(属于步骤过程产物)。缺失字段填 null,不要省略键。

示例:用户问「5月 app端某模型对话用户数,人均对话次数和点赞率分别是多少?」

{
  "question": "5月 app端某模型对话用户数,人均对话次数和点赞率分别是多少?",
  "domain": "产品A",
  "metrics": ["对话用户数", "人均对话次数", "点赞率"],
  "intention": "查询5月app端某模型的三个指标值:对话用户数、人均对话次数和点赞率",
  "tables": null,
  "scope": ["5月", "app端", "某模型"]
}
  • question:原始问题。
  • domain:问题面向的业务领域 / 数据来源,如 产品A、产品B。
  • metrics:涉及的关键指标,如 DAU、次日访问留存率。
  • intention:用户想完成的最终分析问题,如「数据在不同端的分布情况」。
  • tables:用户点名的数据表,如 ["dws_chat_dau_1d"];未点名为 null。
  • scope:数据限定范围(时间、地域、维度等);未知项用 null 占位或省略该元素。
  • metrics 写法:尽量使用数据分析问题中已存在的标准指标名(如 DAU / 对话用户数 / 次日访问留存率),不要用自由发挥的同义改写,以免造成歧义,导致后续步骤理解出错。
  • tables 写法:用户点名的表必须原样写入,禁止改写成「看起来像」的标准名或图谱里的近邻表。未点名则填 null,不要从指标公式反推填入。

Step 2. 业务数据信息补全

将 Step 1 的结构化问题作为输入,从可用知识源补全取数所需的业务语义。使用 CM 前加载 Skill(skill="cm-skills"),工具选择、参数、方言、配方和错误处理统一遵循该技能;系统提示「当前数据源」已绑定或用户已选择数据源时,从本步骤起遵循其「SQL 操作的数据源一致性」规则检索和核对元数据。下文引用的配方均指 cm-skills 内当前后端的业务配方。本步骤只负责查清,结果暂存于对话中,Step 3 消歧后由 Step 4 一次性写入 context.json;需要补齐哪些事实见 Step 4「context.json」。

知识源优先级(Step 2.1 和 Step 2.2 都遵循):

  1. 业务图谱语义区(Metric / MetricCaliber / Dataset / DatasetField / Dimension)——首选,结果可直接使用。
  2. 业务图谱物理区与数据源探针——语义区缺失或没有命中时回退:DataSource → Table → Column;图里仍没有的,用 execute_read 做只读元数据探针(如 information_schema / DESC 一类;取列值时带分区过滤和 LIMIT)补全 Step 2.2;对于 Step 2.1 的指标语义,需自行结合列注释 / 命名推断。
  3. 上下文信息(如对话历史、用户先前提供的口径说明等)——仅当上述两者都拿不到时才允许使用,并且必须满足下面两条硬约束:
    • 精确对应:上下文里出现的指标名 / 表名 / 列名必须与本次要探查的目标完全一致(同名同义、口径一致),不允许拿"看起来差不多"的旧上下文凑数;
    • 来源标注:在 context.json 中,每个来自上下文的指标 / 表条目都要加 "src": "context" 显式标出,便于 Step 3 复核。

任一字段若三个来源都拿不到,按"未知(省略该键)"处理,不得用模型先验或想象填充,不可捏造。

Read the full file on GitHub · 280 lines

Files

What ships with it

7 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 15d ago Changed · -8 lines · +10 tokens per session be56ebfc40b4
  2. 1mo ago Changed · +2 lines 3be23bfea48f
  3. 3mo ago First seen · 286 lines · 276 tokens per session scan A dcd21e059dbf

Subscribe to this mod's changes

fetch-data is a skill published in the GitHub repository agentscope-ai/QwenPaw-Data (213 stars, last pushed 2d ago), licensed Apache-2.0. It adds 286 tokens to every session and 7,014 once invoked, about $0.0011 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

fetch-data compared with skills from other repositories

fetch-data next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
fetch-dataagentscope-ai/QwenPaw-DataSkill2132d agoApache-2.0A286Claude Code, Codex
alembic-migrationvstorm-co/full-stack-ai-agent-templateSkill2.0ktodayMITA56Claude Code
knowledge_graph_skillNPC-Worldwide/npcpySkill1.5kyesterdayMITA474Claude Code, Codex
stripe-projectsstripe/aiSkill2.1kyesterdayMITA217Claude Code
tageszeitungellmos-ai/skillsSkill104d agoMITA112Claude Code, Codex
datasetsAryan-Jhaveri/mcp-statcanSkill829d agoMITA67Claude Code, Codex
brain-bitemporalinite-ai/inite-brain-serviceSkill45todayAGPL-3.0A74Claude Code