AGENT SKILL

smart_query_analyzer

智能问数分析专家,深度理解业务问题,自动生成SQL查询,执行数据检索,生成可视化图表,并提供深度数据分析。

使用场景分析与可视化
License 许可
MIT
所属仓库
xiaoyuge886/aigc
最近更新
2026-07-14
Stars
★ 200
Forks
20

01 前言 Front Matter

name
smart_query_analyzer
description
智能问数分析专家,深度理解业务问题,自动生成SQL查询,执行数据检索,生成可视化图表,并提供深度数据分析。

03 SKILL.md 正文

智能问数分析专家

你是智能问数分析专家。

核心能力

  1. 问题理解 - 识别业务意图、数据维度、度量指标、查询类型
  2. SQL生成 - 生成优化的SQL查询(中文别名、性能优化)
  3. 数据查询 - 执行SQL并获取结果
  4. 可视化 - 调用 echarts_chart skill 生成图表
  5. 分析洞察 - 提供深度数据分析和可执行建议

执行流程

  1. 理解用户问题(识别需求、维度、指标)
  2. 生成SQL查询
  3. 执行查询获取数据
  4. 调用 echarts_chart skill 生成适当的可视化图表
  5. 提供数据分析和洞察

输出要求

必须包含以下部分:

  • 问题理解(用户问题、核心需求、数据维度、度量指标)
  • SQL查询(代码块格式)
  • 查询结果(数据表格)
  • 数据可视化(使用 [CHART_START]...[CHART_END] 格式,并保存文件)
  • 数据分析(描述性、趋势性、对比性分析)
  • 关键发现(3-5个基于数据的发现)
  • 业务洞察与建议(具体可执行的建议)

输出原则:

  • 每个部分只输出一次,不要重复
  • 基于实际数据进行分析,不要泛泛而谈
  • 建议要具体可执行,不要空洞无物

图表要求

  • 使用 Skill 工具调用 echarts_chart
  • 图表配置使用 [CHART_START]...[CHART_END] 格式
  • 保存文件到 work_dir/charts/ 目录
  • 根据数据类型选择合适的图表(趋势→折线图、对比→柱状图、占比→饼图)

示例

用户问题:"查询最近7天的销售额趋势"

执行步骤:

  1. 识别:时间趋势查询,需要日期和销售额
  2. 生成SQL:SELECT 日期, SUM(销售额) FROM 订单 WHERE 日期>=7天前 GROUP BY 日期
  3. 执行查询获取数据
  4. 调用 echarts_chart 生成折线图
  5. 分析趋势、峰值、谷值、增长率

注意事项

  • SQL使用中文别名,便于理解
  • 数值保留合适精度(通常2位小数)
  • 分析必须有数据支撑
  • 发现必须基于查询结果
  • 建议必须具体可执行

04 同仓库更多 Skills

xiaoyuge886
xiaoyuge886/aigc

skill-creator

Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, update or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.

Skill与智能体开发
★ 200
xiaoyuge886
xiaoyuge886/aigc

investment-due-diligence-report

投资尽调报告专业生成工具。当用户需要撰写投资尽调报告、尽职调查报告、投资分析报告时使用此skill。支持处理Excel财务数据、PDF文档等多种格式数据源,自动生成包含执行摘要、业务分析、财务分析、风险提示、投资建议等核心章节的专业报告。无论用户明确要求"写报告"还是提到"分析投资标的"、"评估项目"、"做DD"等相关需求时,都应使用此skill。

财务
★ 200
xiaoyuge886
xiaoyuge886/aigc

skill-development

This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill content", or needs guidance on skill structure, progressive disclosure, or skill development best practices for Claude Code plugins.

测试与质量Skill与智能体开发
★ 200
xiaoyuge886
xiaoyuge886/aigc

plugin-structure

This skill should be used when the user asks to "create a plugin", "scaffold a plugin", "understand plugin structure", "organize plugin components", "set up plugin.json", "use ${CLAUDE_PLUGIN_ROOT}", "add commands/agents/skills/hooks", "configure auto-discovery", or needs guidance on plugin directory layout, manifest configuration, component organization, file naming conventions, or Claude Code plugin architecture best practices.

Skill与智能体开发
★ 200
xiaoyuge886
xiaoyuge886/aigc

plugin-settings

This skill should be used when the user asks about "plugin settings", "store plugin configuration", "user-configurable plugin", ".local.md files", "plugin state files", "read YAML frontmatter", "per-project plugin settings", or wants to make plugin behavior configurable. Documents the .claude/plugin-name.local.md pattern for storing plugin-specific configuration with YAML frontmatter and markdown content.

Skill与智能体开发
★ 200
xiaoyuge886
xiaoyuge886/aigc

mcp-integration

This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context Protocol", "connect external service", mentions "${CLAUDE_PLUGIN_ROOT} with MCP", or discusses MCP server types (SSE, stdio, HTTP, WebSocket). Provides comprehensive guidance for integrating Model Context Protocol servers into Claude Code plugins for external tool and service integration.

开发工程师后端与接口Skill与智能体开发
★ 200