跳到正文
cccskills
免费在 GitHub 公开

mysql reporter

Query MySQL databases to summarize sales, user behavior, and business metrics. The skill checks available tables, runs read-only queries, and presents results as Markdown tables with explanations of key figures, changes, and conclusions.

中文简介正在准备中。当前显示英语简介。

原文查看原文说明

生成 MySQL 查询报表。当用户需要查询 MySQL 数据库并以报表形式展示结果时使用此技能,包括:统计销售数据、分析用户行为、生成业务报表、查询业务指标等。

集成工具MySQL
查看安装方法

适用场景

  • Summarizing sales data
  • Analyzing user behavior
  • Reporting business metrics
  • Creating reports from database records

包含的文件(5)

  • SKILL.md2.2 KB
  • scripts/_mysql_common.py1.8 KB
  • scripts/describe_table.py3.8 KB
  • scripts/list_tables.py1.3 KB
  • scripts/query.py7.9 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

MySQL 报表技能

根据用户的指令,通过终端脚本访问 MySQL 数据库,根据查询结果构建报表。

操作流程

  1. 理解用户的指令,明确报表的需求和目标
  2. 通过 terminal 进入技能目录:cd /home/gem/skills/mysql-reporter
  3. 使用 uv run scripts/list_tables.py 查看可用表;如果脚本提示缺少 MySQL 配置,按“环境变量缺失处理”回复用户
  4. 必要时用 uv run scripts/describe_table.py --table 表名 查看表结构
  5. 生成正确且高效的只读 SQL,通过 uv run scripts/query.py --sql "SQL语句" --timeout 60 执行查询并获取结果
  6. 使用 Markdown 表格呈现查询结果,说明关键指标、变化与结论

环境变量缺失处理

脚本只读取 Agent 沙盒中的环境变量,不读取后端 .env 或 Docker Compose 变量。必填变量包括:

  • MYSQL_HOST
  • MYSQL_USER
  • MYSQL_PASSWORD
  • MYSQL_DATABASE

可选变量包括:

  • MYSQL_PORT:默认 3306
  • MYSQL_DATABASE_DESCRIPTION:数据库业务说明,用于辅助理解表和指标含义

如果执行脚本时出现 MySQL configuration missing required key,不要继续猜测连接信息或编造报表。应明确告诉用户:需要在个人设置中的「沙盒环境变量」里配置缺失的 MYSQL_* 变量;保存后仅对新建沙盒生效,需要重新发起任务或新建会话后再执行。

关键约束

  • 生成的 SQL 查询必须正确且高效,避免全表扫描
  • MySQL 操作必须通过本技能 scripts/ 下的 CLI 脚本执行,不要调用平台内置 MySQL tools
  • 不要在报表或错误说明中输出 MYSQL_PASSWORD 等敏感环境变量的值,只能说明缺少哪些变量名
  • 只返回报表相关的结论,不要返回原始 SQL 查询语句

允许的工具

  • terminal:执行 scripts/list_tables.py、scripts/describe_table.py、scripts/query.py
  • 网络检索工具:必要时补充背景信息

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Organize complex research by splitting a topic into focused questions, assigning research agents, and checking important claims. Findings become a structured report with source links, conflicting evidence, and clearly stated uncertainties.

中文简介正在准备中。当前显示英语简介。

  • Reviewing research literature
  • Researching industries and competitors
  • Comparing technologies for selection
xerrors/Yuxi74332026年10月17日 更新

Add compact visual summaries to Markdown answers using static HTML and CSS. Show comparisons, key metrics, timelines, or simple relationships in a preview, while keeping explanations and detailed information in the surrounding text.

中文简介正在准备中。当前显示英语简介。

  • Comparing key metrics visually
  • Showing a process or sequence of steps
  • Summarizing events on a timeline
xerrors/Yuxi74332026年10月17日 更新

image-gen

免费

Generate images, posters, and illustrations from written descriptions using an external image API, with Qwen-Image as the default. Save the finished image in the agent's working environment and display it through the artifact presentation tool.

中文简介正在准备中。当前显示英语简介。

  • Generating an illustration from a written description
  • Creating a poster with a specified style
  • Saving and displaying images generated with Qwen-Image
xerrors/Yuxi74332026年10月17日 更新

Search configured Yuxi knowledge bases to answer questions using internal or uploaded documents. Open source text, locate relevant passages, inspect mind maps, and identify supporting files so answers can be traced back to their evidence.

中文简介正在准备中。当前显示英语简介。

  • Answering questions from internal documents
  • Locating passages that support a claim
  • Exploring knowledge base structure with mind maps
xerrors/Yuxi74332026年10月17日 更新

查看 xerrors 的全部技能

报告此技能的问题