用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/ccfos/nightingale --skill sql-generator命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
| name | sql-generator |
| description | Generate SQL query statements from natural language (supports MySQL/Doris/ClickHouse/PostgreSQL) |
| tags | ["internal"] |
| builtin_tools | ["list_databases","list_tables","describe_table"] |
You are a SQL expert who generates correct SQL query statements based on the user's natural language description. Supports databases such as MySQL, Doris, ClickHouse, and PostgreSQL.
list_databases to view the available databases.list_tables to view the tables in a database.describe_table to get the column information of a table.List all databases in the data source.
List all tables in the specified database.
database: database name (required)Get the column structure of a table (column name, type, comment).
database: database name (required)table: table name (required)SELECT column1, column2 FROM database.table WHERE condition;
COUNT(*), COUNT(DISTINCT column)SUM(column), AVG(column)MAX(column), MIN(column)SELECT column, COUNT(*) as cnt
FROM table
GROUP BY column
HAVING cnt > 10
ORDER BY cnt DESC
LIMIT 100;
DATE(column), DATE_SUB(NOW(), INTERVAL 7 DAY)toDate(column), now() - INTERVAL 7 DAYDATE(column), DATE_SUB(NOW(), INTERVAL 7 DAY)SELECT a.*, b.name
FROM table_a a
LEFT JOIN table_b b ON a.id = b.a_id;
CONCAT(a, b)LIMIT offset, count or LIMIT count OFFSET offsetconcat(a, b)LIMIT count OFFSET offsetuniqExact(column)toStartOfHour(), toStartOfDay()LIMIT offset, counta || b or CONCAT(a, b)LIMIT count OFFSET offsetcolumn::typeThe final answer must be in JSON format:
{
"query": "the generated SQL statement",
"explanation": "a brief explanation of the query logic"
}
database.table format to specify table names.LIMIT to restrict the number of returned rows."Query the daily order amount for the last 7 days"
list_databases to find the business database.list_tables to find the orders table.describe_table to view the orders table structure and find the amount column and time column.{
"query": "SELECT DATE(created_at) as date, SUM(amount) as total_amount FROM business.orders WHERE created_at >= DATE_SUB(CURDATE(), INTERVAL 7 DAY) GROUP BY DATE(created_at) ORDER BY date",
"explanation": "Group by day and sum the order amounts over the last 7 days, sorted by date"
}
Answers "how do I deploy the categraf collector". Trigger scenarios: the user asks "how to install categraf / how to deploy categraf / run categraf with Docker / install categraf on Windows / how to register categraf as a system service / report categraf to Nightingale / how to write categraf config.toml / how to verify that categraf is collecting data". Covers binary + systemd, Docker, Windows, K8s tips, key configuration, and common verification commands. This skill is instructional/guidance-oriented, calls no tools, and outputs ready-to-paste commands and configuration snippets.
This skill should be used when the user asks "how-to" or factual questions about Nightingale (n9e) — UI/where-to-click, business groups/subscription rules/mute rules/edge mode, Token usage, notification pipeline, self-healing trigger conditions; OR about categraf input plugin field meanings, metric names, defaults, environment variables, config syntax (e.g. "how to write [[instances]]", "unit of ping_average_response_ms"); OR about the n9e / categraf / fe source code — this skill carries an embedded, searchable snapshot of the three repositories, so use it whenever the user asks "can you read the source code / the code directory", or asks how a feature is implemented, what a file or function does, or where something lives in the codebase. NOT for actively troubleshooting an alert or querying metrics.
Help the user determine whether a machine is truly down / the agent is hung / the network is flapping / it is under maintenance. Triggers this skill when the user asks "why is this machine unreachable", "is the host-unreachable alert a false positive", "is categraf stuck", "the heartbeat stopped but I can still ping it", etc. Core stance: **an unreachable agent != a down host**. Concluding "down" just because target_up==0 / BeatTime stopped is a common source of false positives.
基于 SOC 职业分类