Token导航 LogoToken导航TokenDH.com
研究检索只读github未标认证来源可访问clear审计通过

query-builder查询生成器

Agent Skill

query-builder 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

1,794

周安装

74

GitHub Stars

4,780

下载量

586
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:query-builder(查询生成器)
来源仓库:https://github.com/clidey/whodb
仓库路径:skills/query-builder
安装命令:
npx skills add https://github.com/clidey/whodb --skill query-builder
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/clidey/whodb --skill query-builder

简介

用于查找、检索和筛选相关信息,支持关键词快速定位候选结果。

  • 适合在开发过程中根据任务场景或来源线索获取技术资料。
  • 可结合仓库 README 核验具体用法,提升信息检索效率。
  • 安装前建议确认权限范围和维护状态,避免触发不必要的网络或文件操作。
  • 适用于 Codex、Claude、Cursor 等主流 AI 宿主环境。

SKILL.md

Query Builder

Convert natural language questions into SQL queries using the database schema.

When to Use

Activate when user asks questions like:

  • "Show me all users who signed up last month"
  • "Find orders greater than $100"
  • "Which products have low inventory?"
  • "Get the top 10 customers by total spend"

Workflow

1. Understand the Schema

Before generating SQL, always check the table structure:

whodb_tables(connection="...") → Get available tables
whodb_columns(table="relevant_table") → Get column names and types

2. Identify Intent

Parse the natural language request:

  • Subject: What entity? (users, orders, products)
  • Filter: What conditions? (last month, > $100, active)
  • Aggregation: Count, sum, average, max, min?
  • Grouping: By what dimension?
  • Ordering: Sort by what? Ascending/descending?
  • Limit: How many results?

3. Map to Schema

  • Match entities to table names
  • Match attributes to column names
  • Identify foreign key joins needed

4. Generate SQL

Build the query following SQL best practices:

SELECT columns
FROM table
[JOIN other_table ON condition]
WHERE filters
[GROUP BY columns]
[HAVING aggregate_condition]
ORDER BY column [ASC|DESC]
LIMIT n;

5. Execute and Present

whodb_query(query="generated SQL")

Translation Patterns

Natural LanguageSQL Pattern
"last week/month/year"WHERE date_col >= DATE_SUB(NOW(), INTERVAL 1 WEEK)
"more than X" / "greater than X"WHERE col > X
"top N"ORDER BY col DESC LIMIT N
"how many"SELECT COUNT(*)
"total" / "sum of"SELECT SUM(col)
"average"SELECT AVG(col)
"for each" / "by"GROUP BY col
"between X and Y"WHERE col BETWEEN X AND Y
"contains" / "like"WHERE col LIKE '%term%'
"starts with"WHERE col LIKE 'term%'
"is empty" / "is null"WHERE col IS NULL
"is not empty"WHERE col IS NOT NULL

Date Handling by Database

PostgreSQL

WHERE created_at >= NOW() - INTERVAL '7 days'
WHERE created_at >= DATE_TRUNC('month', CURRENT_DATE)

MySQL

WHERE created_at >= DATE_SUB(NOW(), INTERVAL 7 DAY)
WHERE created_at >= DATE_FORMAT(NOW(), '%Y-%m-01')

SQLite

WHERE created_at >= DATE('now', '-7 days')
WHERE created_at >= DATE('now', 'start of month')

Examples

"Show me users who signed up this month"

SELECT * FROM users
WHERE created_at >= DATE_TRUNC('month', CURRENT_DATE)
ORDER BY created_at DESC;

"Find the top 5 products by sales"

SELECT p.name, SUM(oi.quantity) as total_sold
FROM products p
JOIN order_items oi ON p.id = oi.product_id
GROUP BY p.id, p.name
ORDER BY total_sold DESC
LIMIT 5;

"How many orders per customer?"

SELECT customer_id, COUNT(*) as order_count
FROM orders
GROUP BY customer_id
ORDER BY order_count DESC;

Safety Rules

  • Always use LIMIT for exploratory queries (default: 100)
  • Never generate DELETE, UPDATE, or DROP unless explicitly requested
  • Warn if query might return large result sets
  • Use table aliases for readability in JOINs

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude Code

29.76%
按下载量换算174

Cursor

26.06%
按下载量换算153

Codex

17.33%
按下载量换算102

Antigravity

14.34%
按下载量换算84

windsurf

7.81%
按下载量换算46

trae

3.21%
按下载量换算19

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

来源信息

继续浏览同类 Skills