Skip to content
cccskills
FreePublished on GitHub

mysql reporter

Query MySQL data with read-only SQL, then present results as a Markdown report with key metrics and conclusions. Useful for sales totals, user behavior, business reports, and other requested indicators.

OriginalShow the original description

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

xerrors/Yuxi7,543 stars(GitHub 7,543 + cccskills 0)
Works withMySQL

Run score Not tested

See how to install

Good for

  • Summarizing sales data
  • Analyzing user behavior
  • Preparing business reports
  • Checking business metrics

Files included (5)

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

SKILL.md (original)

Review the instructions the agent will receive before you install.

MySQL 报表技能

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

操作流程

  1. 理解用户的指令,明确报表的需求和目标
  2. 通过 terminal 进入技能目录:cd /home/user/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
  • 网络检索工具:必要时补充背景信息

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

chat-widgets

FreeSummary

Present images, comparisons, and numeric data directly in chat using image views, cards, bar or line charts, and short forms for gathering needed details. Choose a format that fits the request while keeping ordinary answers in Markdown.

  • Showing one or several images
  • Comparing category values with a bar chart
  • Displaying trends over time with a line chart
xerrors/Yuxi7.5KUpdated Oct 29, 2026

deep-research

FreeSummary

Organize deep research by clarifying scope, splitting a topic into focused questions, gathering evidence from multiple sources, and checking important claims. Deliver a structured report with traceable citations and clearly marked uncertainties.

  • Reviewing research across multiple sources
  • Comparing products or competitors
  • Evaluating a technology choice
xerrors/Yuxi7.5KUpdated Oct 29, 2026

image-gen

FreeSummary

Generate an image, poster, or illustration from a user's description, save it in the current work folder, and show it in chat. The default generation route uses SiliconFlow's Qwen-Image; other compatible image generation interfaces can be used when specified.

  • Creating an illustration from a prompt
  • Generating a poster concept
  • Making an image with Qwen-Image
xerrors/Yuxi7.5KUpdated Oct 29, 2026

knowledge-base

FreeSummary

Search configured knowledge bases, open matching documents, and locate relevant passages. Use the results to answer questions from available materials, check details, or cite supporting sources.

  • Answer a question using configured knowledge base materials
  • Verify a detail against an internal document
  • Find a term or passage in a known document
xerrors/Yuxi7.5KUpdated Oct 29, 2026

See all skills by xerrors

Report a problem with this skill