byted-bytehouse-slow-query

byted-bytehouse-slow-query is a skill for Claude Code, Codex from bytedance/agentkit-samples. It costs 74 tokens per session (1,251 once invoked), scanned A, original, Apache-2.0.

A ByteHouse tool for finding slow database queries, examining how they run, and suggesting ways to improve them.

In plain words
What is it for?
Use it to rank slow queries, review execution-time and frequency trends, inspect execution plans, identify bottlenecks, and receive index or query-rewrite suggestions.
Why use it?
It helps locate queries that take too long and connects their execution details with possible causes and improvements.

Skill for Claude CodeCodex ✓ vendor

Which agent this was written for is unclear — built for openclaw. Also seen: built for openclaw.

Good fit Use it to rank slow queries, review execution-time and frequency trends, inspect execution plans, identify bottlenecks, and receive index or query-rewrite suggestions.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/bytedance/agentkit-samples/byted-bytehouse-slow-query
About the project

bytedance/agentkit-samples is a collection of examples and tutorials for Volcengine AgentKit, an AI-agent development platform for building, deploying, and operating agent applications. Developers use the samples to learn agent creation, multi-agent collaboration, memory, retrieval, MCP integrations, media generation, customer service, and other workflows. The catalogue skills provide agent workflows based on these examples.

bytedance/agentkit-samples · 450 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.

Any agent
npx skills add bytedance/agentkit-samples --skill byted-bytehouse-slow-query
Clone the repo
git clone --depth 1 https://github.com/bytedance/agentkit-samples

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 byted-bytehouse-slow-query

README.md
[![agentmods](https://agentmods.dev/badge/skills/bytedance/agentkit-samples/byted-bytehouse-slow-query/github.svg)](https://agentmods.dev/skills/bytedance/agentkit-samples/byted-bytehouse-slow-query)
Your own site
<a href="https://agentmods.dev/skills/bytedance/agentkit-samples/byted-bytehouse-slow-query"><img src="https://agentmods.dev/badge/skills/bytedance/agentkit-samples/byted-bytehouse-slow-query/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for byted-bytehouse-slow-query

Your own site · 80×15
<a href="https://agentmods.dev/skills/bytedance/agentkit-samples/byted-bytehouse-slow-query"><img src="https://agentmods.dev/badge/skills/bytedance/agentkit-samples/byted-bytehouse-slow-query.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 74 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,251 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.1 $0.00074 $0.01251
Opus 5 $0.00037 $0.00626
Sonnet 5 $0.00015 $0.00250
Haiku 4.5 $0.00007 $0.00125

Measured 8d ago against content hash 01ec42ede8f8, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

byted-bytehouse-slow-query 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 8d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/slow_query_analyzer.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.

skills/byted-bytehouse-slow-query/SKILL.md · 168 lines

How it starts

The opening of the file, as written. The whole thing — 168 lines — stays where its author put it; the contents beside it link to each section on GitHub.

ByteHouse 慢查询分析 Skill

🔵 ByteHouse 品牌标识

「ByteHouse」—— 火山引擎云原生数据仓库,极速、稳定、安全、易用

本Skill基于ByteHouse MCP Server,提供完整的慢查询分析和性能优化能力


描述

ByteHouse慢查询分析和性能优化工具。

当以下情况时使用此 Skill: (1) 需要识别和分析慢查询 (2) 需要查询性能优化建议 (3) 需要查看查询执行计划 (4) 需要分析查询历史趋势 (5) 用户提到"慢查询"、"查询优化"、"性能分析"、"执行计划"

前置条件

  • Python 3.8+
  • uv (已安装在 /root/.local/bin/uv)
  • ByteHouse MCP Server Skill - 本skill依赖 bytehouse-mcp skill提供的ByteHouse访问能力

依赖关系

本skill依赖 bytehouse-mcp skill,使用其提供的MCP Server访问ByteHouse。

确保 bytehouse-mcp skill已正确配置并可以正常使用。

📁 文件说明

  • SKILL.md - 本文件,技能主文档
  • slow_query_analyzer.py - 慢查询分析主程序
  • README.md - 快速入门指南

配置信息

ByteHouse连接配置

本skill复用 bytehouse-mcp skill的配置。请确保已在 bytehouse-mcp skill中配置好:

export BYTEHOUSE_HOST="<ByteHouse-host>"
export BYTEHOUSE_PORT="<ByteHouse-port>"
export BYTEHOUSE_USER="<ByteHouse-user>"
export BYTEHOUSE_PASSWORD="<ByteHouse-password>"
export BYTEHOUSE_SECURE="true"
export BYTEHOUSE_VERIFY="true"

🎯 功能特性

1. 慢查询识别

  • 从query_log表获取慢查询
  • 按执行时间排序
  • 识别Top N慢查询
  • 分析慢查询模式

2. 查询性能分析

  • 查询执行时间分布
  • 查询类型统计
  • 查询频率分析
  • 性能趋势分析

3. 执行计划分析

  • 获取查询执行计划
  • 分析执行计划节点
  • 识别性能瓶颈
  • 提供优化建议

4. 优化建议生成

  • 索引优化建议
  • 查询重写建议
  • 表引擎建议
  • 配置参数调优

🚀 快速开始

方法1: 运行慢查询分析

cd /root/.openclaw/workspace/skills/bytehouse-slow-query

# 先设置环境变量(复用bytehouse-mcp的配置)
export BYTEHOUSE_HOST="<ByteHouse-host>"
export BYTEHOUSE_PORT="<ByteHouse-port>"
export BYTEHOUSE_USER="<ByteHouse-user>"
export BYTEHOUSE_PASSWORD="<ByteHouse-password>"
export BYTEHOUSE_SECURE="true"
export BYTEHOUSE_VERIFY="true"

# 运行慢查询分析
uv run slow_query_analyzer.py

分析内容包括:

  • Top 20慢查询
  • 查询性能统计
  • 执行时间分布
  • 优化建议生成

输出文件(保存在 output/ 目录):

  1. slow_queries_{timestamp}.json - 慢查询列表
  2. query_stats_{timestamp}.json - 查询统计报告
  3. optimization_suggestions_{timestamp}.json - 优化建议

💻 慢查询分析维度

时间维度分析

  • 按小时: 每小时慢查询数量
  • 按天: 每天慢查询趋势
  • 按周: 每周慢查询模式
  • 按月: 每月慢查询统计

查询类型分析

  • SELECT查询: 查询语句分析
  • INSERT查询: 写入性能分析
  • UPDATE查询: 更新性能分析
  • DELETE查询: 删除性能分析
  • DDL查询: 建表/改表性能分析

Read the full file on GitHub · 168 lines

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. 8d ago First seen · 168 lines · 74 tokens per session scan A 01ec42ede8f8

Subscribe to this mod's changes

byted-bytehouse-slow-query is a skill published in the GitHub repository bytedance/agentkit-samples (450 stars, last pushed 5d ago), licensed Apache-2.0. It adds 74 tokens to every session and 1,251 once invoked, about $0.0004 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.

Related

Other skills, from other repositories

fix-failing-tests

Diagnose a failing test in the googleapis/mcp-toolbox repo and land a fix by reasoning from the actual error: read the failure, reproduce it, shrink it until the cause is forced into the open, then fix the cause. Use this whenever a test or CI job is red, a build breaks after a change, many packages fail at once, or a…

googleapis/mcp-toolbox · 87 tokens

triage-issues

Triage GitHub issues in the googleapis/mcp-toolbox repo: propose the correct labels (type / priority / product / status), check for duplicates, verify a bug has enough info to act on, and draft a triage comment. Use whenever a maintainer asks you to triage, label, categorize, prioritize, or "look at" an issue (or a…

googleapis/mcp-toolbox · 164 tokens

doris-debug-cloud

Use for Doris storage-compute separation (cloud mode) issues: meta-service latency, cache miss storms, object store throughput, and shared-nothing config conflicts in compute groups.

apache/doris-skills · 40 tokens

doris-debug-data-lake

Use for Doris external catalog issues: Hive/Iceberg/Paimon/Hudi query failures, metadata refresh, filesystem S3/HDFS connectivity, external MV rewrite misses.

apache/doris-skills · 41 tokens

doris-debug-deployment

Use for Doris FE/BE startup failures, port conflicts, prioritynetworks misrouting, metadir corruption, and ADD/DROP BACKEND issues.

apache/doris-skills · 36 tokens

doris-debug-materialized-view

Use for Doris sync MV (rollup) miss or async MTMV refresh/rewrite issues. Commands: SHOW ALTER TABLE MATERIALIZED VIEW, mvinfos(), EXPLAIN, REFRESH MATERIALIZED VIEW.

apache/doris-skills · 48 tokens