mysql reporter

mysql reporter is a skill for Claude Code, Codex from xerrors/Yuxi. It costs 55 tokens per session (640 once invoked), scanned A, original, MIT.

A set of instructions for querying a MySQL database and turning the results into a report with charts. MySQL is a database system commonly used to store application and business data.

In plain words
What is it for?
Use it to create sales reports, user-behaviour analyses, business metrics, and other chart-based reports from MySQL data.
Why use it?
It provides a defined process for finding tables, checking their structure, running read-only queries, and handling missing database settings without guessing.

Skill for Claude CodeCodex

About the project

Yuxi is a self-hosted, multi-tenant knowledge-agent platform that combines document retrieval, knowledge graphs, multi-agent workflows, tools, sandboxes, and access controls in one workspace. Teams use it to build source-backed question answering and multi-step agents while managing their data, models, and permissions. The catalogue entries provide agents, skills, and instructions for Yuxi workflows.

xerrors/Yuxi · 6,672 stars · on GitHub

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.

agentmods
npx agentmods add skills/xerrors/yuxi/mysql-reporter
Any agent
npx skills add xerrors/Yuxi --skill mysql-reporter
Clone the repo
git clone --depth 1 https://github.com/xerrors/Yuxi

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 mysql reporter

README.md
[![agentmods](https://agentmods.dev/badge/skills/xerrors/yuxi/mysql-reporter.svg)](https://agentmods.dev/skills/xerrors/yuxi/mysql-reporter)
Your own site
<a href="https://agentmods.dev/skills/xerrors/yuxi/mysql-reporter"><img src="https://agentmods.dev/badge/skills/xerrors/yuxi/mysql-reporter.svg" alt="Measured on agentmods" height="20"></a>
Per session 55 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 640 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00055 $0.00640
Opus 5 $0.00028 $0.00320
Sonnet 5 $0.00011 $0.00128
Haiku 4.5 $0.00006 $0.00064

Measured 5d ago against content hash d2d68d1eab5b, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

mysql reporter 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.

The scan reads SKILL.md. This mod also ships 3 executable files (scripts/describe_table.py, scripts/list_tables.py, scripts/query.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.

backend/package/yuxi/agents/skills/buildin/mysql-reporter/SKILL.md · 50 lines

What it actually says

MySQL 报表技能

根据用户的指令,通过终端脚本访问 MySQL 数据库,并结合图表绘制工具构建 SQL 查询报告。

操作流程

  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. 使用 Charts MCP 生成图表
  7. 将图表以 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 等敏感环境变量的值,只能说明缺少哪些变量名
  • 图表生成工具的返回结果不会默认渲染,必须在最终报表中以 ![描述](图片URL) 格式嵌入
  • 只返回报表相关的结论,不要返回原始 SQL 查询语句

允许的工具

  • terminal:执行 scripts/list_tables.pyscripts/describe_table.pyscripts/query.py
  • Charts MCP:生成可视化图表
  • 网络检索工具:必要时补充背景信息
Files

What ships with it

3 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. 5d ago First seen · 50 lines · 55 tokens per session scan A d2d68d1eab5b

Subscribe to this mod's changes

mysql reporter is a skill published in the GitHub repository xerrors/Yuxi (6,672 stars, last pushed 3d ago), licensed MIT. It adds 55 tokens to every session and 640 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-30.

Related

Other skills, from other repositories

rushdb-domain-template

Design a tailored RushDB schema for any use case through guided conversation. Use this skill when a user is starting a new project, unsure what labels to define, asking "what records should I create", or wants a scaffold for a known domain (e-commerce, healthcare, SaaS, CRM, agent memory, etc.). Interviews the user…

rush-db/rushdb · 100 tokens

rushdb-query-builder

Build RushDB queries, searches, filters, and aggregations. Use whenever an agent needs to list or filter records, count or group data, traverse relationships, run semantic/vector search, construct a findRecords call, discover live labels and properties, or recall canonical EPISODE and MEMORYFACT records with mandatory…

rush-db/rushdb · 71 tokens

rushdb-data-modeling

Model data in RushDB's property-centric LMPG graph. Use when designing or evolving schemas, choosing labels and properties, defining relationships, importing nested JSON, structuring a new use case, or modeling agent memory with EPISODE, MEMORYFACT, domain records, scope fields, semantic properties, and fact…

rush-db/rushdb · 71 tokens

rushdb-faceted-search

Build faceted filter UIs on top of RushDB. Use this skill when generating code for filter sidebars, multi-select facets, range sliders, or any UI that lets users narrow a record set by property values. Covers the full flow: discover properties + types, enumerate distinct values, map each type to the right widget, and…

rush-db/rushdb · 0 tokens

rushdb-agent-memory

Operate RushDB as persistent agent memory across native OpenClaw or Hermes integrations, MCP tools, and custom SDK harnesses. Use when an agent must remember explicit facts, capture or recall prior turns, manage durable decisions and tasks, choose between native lifecycle memory and model-directed MCP, avoid duplicate…

rush-db/rushdb · 82 tokens

rushdb-memory-adapter

Design, implement, review, or test native RushDB memory adapters for agent runtimes. Use when adding lifecycle-aware recall and persistence to a framework, mapping prompt/turn/compaction/session hooks, implementing AgentMemoryEvent v1, enforcing participant and sandbox scope, adding durable outbox delivery, or…

rush-db/rushdb · 79 tokens