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.
npx agentmods add skills/shanggqm/data-insight-agent/data-analysisnpx skills add shanggqm/data-insight-agent --skill data-analysisgit clone --depth 1 https://github.com/shanggqm/data-insight-agentWrote 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.
[](https://agentmods.dev/skills/shanggqm/data-insight-agent/data-analysis)<a href="https://agentmods.dev/skills/shanggqm/data-insight-agent/data-analysis"><img src="https://agentmods.dev/badge/skills/shanggqm/data-insight-agent/data-analysis.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00056 | $0.01477 |
| Opus 5 | $0.00028 | $0.00739 |
| Sonnet 5 | $0.00011 | $0.00295 |
| Haiku 4.5 | $0.00006 | $0.00148 |
Grade A, and why
data-analysis 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 5d ago.
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.
How it starts
The opening of the file, as written. The whole thing — 172 lines — stays where its author put it; the contents beside it link to each section on GitHub.
数据分析技能
标准化数据分析工作流,确保分析高效、结果可靠、输出规范。
激活条件
- 用户需要查询数据库并分析数据
- 用户需要生成数据分析报告
- 涉及"数据分析"、"统计"、"报告"、"洞察"等关键词
核心约束
1. 时区处理
首次分析时确认数据库时区设定,常见情况:
| 存储时区 | 查询处理 | 展示处理 |
|---|---|---|
| UTC | 查询条件转 UTC | 结果转本地时区 |
| 本地时区 | 直接使用 | 直接展示 |
| 时间戳 | 按需转换 | 转本地时区 |
确认后记录到对应的 schema 文件中,后续分析直接参考。
2. 输出规范
{workspace}/analysis-output/{topic}_{YYYYMMDD_HHmmss}/
├── raw_data/ # 原始查询结果(仅复杂场景)
├── processed_data/ # 计算后的分析数据(JSON格式,供HTML读取)
│ └── charts_data.json
├── report.md # Markdown 报告
└── report.html # 可视化报告(幻灯片样式)
3. 数据处理原则
- 禁止将大量原始数据读入对话上下文
- 优先通过 SQL 聚合直接得出统计结果
- 仅当数据量大或查询复杂时,才落地本地用代码处理
工作流程
Step 1: 需求理解与 Schema 获取
- 识别分析主题、时间范围、关注维度
- 查看
schemas/是否有对应表结构,无则通过工具获取并保存 - 确定查询范围:哪些表、哪些字段、什么条件
Schema 文件: schemas/{source}_{name}.md
Step 2: 设计分析方案
根据数据特点选择分析维度(参考 references/analysis_perspectives.md):
- 描述性分析:规模、分布、集中趋势、离散程度
- 时序分析:趋势、周期、同环比
- 对比分析:分群、分类、交叉对比
- 关联分析:相关性、因果推断
- 异常分析:离群值、突变点
输出简要分析方案后再执行查询。
Step 3: 数据查询与计算
可用工具参考 dbtool/README.md,根据用户指定或默认使用 MySQL。
策略选择
简单场景(优先):直接用 SQL 聚合
-- 通过 GROUP BY、COUNT、SUM、AVG 等直接得出统计结果
-- 多个统计需求可并行发起多条查询
SELECT DATE(created_at) as date, COUNT(*) as count FROM table GROUP BY date;
复杂场景(降级):当遇到以下情况时,才落地本地处理
- 查询超时
- 需要跨表复杂计算
- 数据量过大无法一次返回
- SQL 难以表达的统计逻辑
1. 查询原始数据保存到 raw_data/
2. 在输出目录编写 Node.js 脚本处理
3. 结果保存到 processed_data/charts_data.json
Step 4: 生成报告
Markdown 报告(参考 templates/report_template.md):
- 执行摘要:核心发现 + 关键指标
- 详细分析:按维度展开
- 洞察建议:结论 + 行动项
- 附录:数据说明 + 计算口径
HTML 幻灯片报告(参考 templates/visualization_template.html):
技术栈:
- Reveal.js:幻灯片框架,支持键盘翻页、过渡动画、演讲者模式(按 S 键)
- Tailwind CSS:原子化 CSS,直接用类名布局
- ECharts:图表引擎,暗金色主题
- Animate.css:元素入场动画(配合 fragment)
- Remix Icon:图标库
设计规范:
- 暗金色主题(#0f0f1a 背景 + #d4af37 金色)
- 每页一个观点 + 图表 + 洞察说明
- 数据必须从
processed_data/charts_data.json读取,禁止硬编码
What ships with it
8 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.
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.
- 5d ago First seen · 172 lines · 56 tokens per session scan A fa70a3ab1580
data-analysis is a skill published in the GitHub repository shanggqm/data-insight-agent (5 stars, last pushed 8mo ago), licensed MIT. It adds 56 tokens to every session and 1,477 once invoked, about $0.0003 per session on Opus 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-31.
Other skills, from other repositories
systematic-debugging
Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.
local-ai-agents
Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…
chronicle
Analyze Copilot session history for standup reports, usage tips, session search, and session reindexing. Use when the user asks for a standup, daily summary, usage tips, workflow recommendations, wants to search or find past sessions by keyword/file/PR, wants to reindex their session store, or asks about deleting…
imagegen
Generate or edit raster images when the task benefits from AI-created bitmap visuals such as photos, illustrations, textures, sprites, mockups, or transparent-background cutouts. Use when Codex should create a brand-new image, transform an existing image, or derive visual variants from references, and the output…
chat-pet-sprite-creation
Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.
cpu-profile-analysis
Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…