[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6KVZHE32DYP55X7FMVNQ79Q":3,"skill-same:01M6KVZHE32DYP55X7FMVNQ79Q":56},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":24,"linkOnly":25,"markdownContent":26,"markdownBody":27,"frontMatter":28,"refName":34,"commitSha":35,"skillDirectory":36,"forksCount":37,"repositoryHtmlUrl":38,"repositoryHomepageUrl":39,"ownerHtmlUrl":40,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":41,"install":42,"resources":55},"01M6KVZHE32DYP55X7FMVNQ79Q","sql_query",null,"当用户提出数据查询需求（如'查数'、'查一下订单量'、'有多少用户'、'帮我跑个SQL'等），使用数据源工具发现表结构，生成并执行只读 SQL 查询。","mateaix\u002Fmateclaw","mateaix","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F57164338?v=4","01M6KVQ3JXJP7M6D3BKS2BAMFF","01M6KVQ3Q8YG7DT57AY22TBXGG",1196,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fmateaix\u002Fmateclaw\u002Fblob\u002Fdev\u002Fmateclaw-server\u002Fsrc\u002Fmain\u002Fresources\u002Fskills\u002Fsql_query\u002FSKILL.md",[],[18,19,20,21,22,23],"sql","query","sql query","生成","工具","数据","2026-11-10 10:12:30",false,"---\nname: sql_query\nversion: \"1.1.0\"\ndescription: \"当用户提出数据查询需求（如'查数'、'查一下订单量'、'有多少用户'、'帮我跑个SQL'等），使用数据源工具发现表结构，生成并执行只读 SQL 查询。\"\ndependencies:\n  tools:\n    - datasourceTool\n    - sqlQueryTool\n---\n\n# SQL 查询技能\n\n当用户提出与数据查询相关的问题时，按照以下工作流程操作。\n\n## 工作流程\n\n### 第一步：发现数据源\n调用 `query_datasource(action='list_datasources')` 查看所有可用的外部数据源。\n- 如果只有一个数据源，直接使用它\n- 如果有多个数据源，根据用户问题推断最相关的数据源；不确定时询问用户\n\n### 第二步：发现表结构\n调用 `query_datasource(action='list_tables', datasourceId=\u003Cid>)` 查看数据源中的表列表。\n- 根据表名和注释判断与用户问题相关的表\n- 不要一次查看所有表的结构，只查看相关的 2-3 张表\n\n### 第三步：查看列详情\n调用 `query_datasource(action='describe_table', datasourceId=\u003Cid>, tableName='\u003C表名>')` 查看列名、类型和注释。\n- 记住列名和类型，生成 SQL 时必须使用正确的列名\n\n### 第四步：生成 SQL\n根据表结构和用户问题，生成 SELECT SQL。遵循以下规则：\n\n**SQL 生成规则：**\n1. **仅生成 SELECT 语句**，绝不生成 INSERT\u002FUPDATE\u002FDELETE\u002FDROP 等写操作\n2. 多表查询时，所有字段必须用表别名限定（如 `t1.name`）\n3. 聚合查询使用 COUNT\u002FSUM\u002FAVG\u002FMAX\u002FMIN 等函数\n4. 时间过滤使用数据库对应的日期函数\n5. 字符串匹配使用 LIKE 并注意大小写\n6. 结果默认按合理的顺序排序（如时间倒序）\n7. 系统会自动注入 LIMIT 500，无需手动添加（除非用户指定了数量）\n\n**不同数据库的注意事项：**\n- MySQL：日期用 `DATE_FORMAT()`、`NOW()`，字符串连接用 `CONCAT()`\n- PostgreSQL：日期用 `TO_CHAR()`、`NOW()`，字符串连接用 `||`\n- ClickHouse：日期用 `toDate()`、`today()`，注意不支持部分标准 SQL 语法\n\n### 第五步：执行查询\n调用 `execute_sql(datasourceId=\u003Cid>, sql='\u003CSQL>')` 执行查询。\n\n### 第六步：解读结果\n- 用自然语言总结查询结果的要点\n- 如果结果为空，分析可能的原因（表名\u002F列名\u002F条件有误等）\n- 如果需要，可以调整 SQL 重新查询\n- 如果查询结果包含数值列，系统会自动生成 ECharts 图表，无需你手动生成图表代码\n- **重要：不要使用 write_file 工具生成 HTML 图表文件，系统已内置图表渲染能力**\n\n## 错误处理\n\n如果 SQL 执行失败：\n1. 仔细阅读错误信息\n2. 常见原因：列名拼写错误、类型不匹配、语法错误\n3. 根据错误修正 SQL 并重试一次\n4. 如果仍然失败，向用户说明错误原因\n\n## 安全须知\n\n- 本工具仅支持只读查询（SELECT），写操作会被系统拒绝\n- 查询结果默认限制为 500 行\n- 查询超时为 30 秒\n- 如果用户要求执行写操作，应礼貌拒绝并说明这是安全限制\n","# SQL 查询技能\n\n当用户提出与数据查询相关的问题时，按照以下工作流程操作。\n\n## 工作流程\n\n### 第一步：发现数据源\n调用 `query_datasource(action='list_datasources')` 查看所有可用的外部数据源。\n- 如果只有一个数据源，直接使用它\n- 如果有多个数据源，根据用户问题推断最相关的数据源；不确定时询问用户\n\n### 第二步：发现表结构\n调用 `query_datasource(action='list_tables', datasourceId=\u003Cid>)` 查看数据源中的表列表。\n- 根据表名和注释判断与用户问题相关的表\n- 不要一次查看所有表的结构，只查看相关的 2-3 张表\n\n### 第三步：查看列详情\n调用 `query_datasource(action='describe_table', datasourceId=\u003Cid>, tableName='\u003C表名>')` 查看列名、类型和注释。\n- 记住列名和类型，生成 SQL 时必须使用正确的列名\n\n### 第四步：生成 SQL\n根据表结构和用户问题，生成 SELECT SQL。遵循以下规则：\n\n**SQL 生成规则：**\n1. **仅生成 SELECT 语句**，绝不生成 INSERT\u002FUPDATE\u002FDELETE\u002FDROP 等写操作\n2. 多表查询时，所有字段必须用表别名限定（如 `t1.name`）\n3. 聚合查询使用 COUNT\u002FSUM\u002FAVG\u002FMAX\u002FMIN 等函数\n4. 时间过滤使用数据库对应的日期函数\n5. 字符串匹配使用 LIKE 并注意大小写\n6. 结果默认按合理的顺序排序（如时间倒序）\n7. 系统会自动注入 LIMIT 500，无需手动添加（除非用户指定了数量）\n\n**不同数据库的注意事项：**\n- MySQL：日期用 `DATE_FORMAT()`、`NOW()`，字符串连接用 `CONCAT()`\n- PostgreSQL：日期用 `TO_CHAR()`、`NOW()`，字符串连接用 `||`\n- ClickHouse：日期用 `toDate()`、`today()`，注意不支持部分标准 SQL 语法\n\n### 第五步：执行查询\n调用 `execute_sql(datasourceId=\u003Cid>, sql='\u003CSQL>')` 执行查询。\n\n### 第六步：解读结果\n- 用自然语言总结查询结果的要点\n- 如果结果为空，分析可能的原因（表名\u002F列名\u002F条件有误等）\n- 如果需要，可以调整 SQL 重新查询\n- 如果查询结果包含数值列，系统会自动生成 ECharts 图表，无需你手动生成图表代码\n- **重要：不要使用 write_file 工具生成 HTML 图表文件，系统已内置图表渲染能力**\n\n## 错误处理\n\n如果 SQL 执行失败：\n1. 仔细阅读错误信息\n2. 常见原因：列名拼写错误、类型不匹配、语法错误\n3. 根据错误修正 SQL 并重试一次\n4. 如果仍然失败，向用户说明错误原因\n\n## 安全须知\n\n- 本工具仅支持只读查询（SELECT），写操作会被系统拒绝\n- 查询结果默认限制为 500 行\n- 查询超时为 30 秒\n- 如果用户要求执行写操作，应礼貌拒绝并说明这是安全限制\n",{"name":5,"version":29,"description":7,"dependencies":30},"1.1.0",{"tools":31},[32,33],"datasourceTool","sqlQueryTool","dev","11106843d72d25b29c2cd08d7fdbbd222c21df6a","mateclaw-server\u002Fsrc\u002Fmain\u002Fresources\u002Fskills\u002Fsql_query",361,"https:\u002F\u002Fgithub.com\u002Fmateaix\u002Fmateclaw","https:\u002F\u002Fclaw.mate.vip","https:\u002F\u002Fgithub.com\u002Fmateaix","2026-11-13 15:43:14",{"source":8,"skillName":5,"commands":43,"prompt":53,"zipAvailable":54},[44,47,50],{"tool":45,"command":46},"npx","npx skills add mateaix\u002Fmateclaw --skill sql_query",{"tool":48,"command":49},"bunx","bunx skills add mateaix\u002Fmateclaw --skill sql_query",{"tool":51,"command":52},"pnpm","pnpm dlx skills add mateaix\u002Fmateclaw --skill sql_query","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmateaix\u002Fmateclaw\u002Fblob\u002Fdev\u002Fmateclaw-server\u002Fsrc\u002Fmain\u002Fresources\u002Fskills\u002Fsql_query\u002FSKILL.md",true,[],[57,67,95,120,139,157],{"skillNo":58,"name":59,"nameZh":6,"description":60,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":61,"categories":62,"keywords":63,"publishedAt":24},"01M6KW155AABG05Q3FR8CN3D9H","sample","Test fixture for SkillBundleMaterializer.","https:\u002F\u002Fgithub.com\u002Fmateaix\u002Fmateclaw\u002Fblob\u002Fdev\u002Fmateclaw-server\u002Fsrc\u002Ftest\u002Fresources\u002Ftest-bundles\u002Fsample\u002FSKILL.md",[],[59,64,65,66],"test","for","fixture",{"skillNo":68,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":24},"01M6KW0P1T4EGBRN0HYZKJSHGB","xhs_note","小红书图文创作 \u002F 笔记 \u002F 种草文案 (xiaohongshu \u002F red note) — 端到端：成文→配图(≥3 张竖版)→去AI化→在线预览打包交付。以图为主、文字辅助：标题四件套 + 碎句正文 + 话题标签，配 3:4 竖版卡片，最少 3 张图。honors user persona & style memory.","https:\u002F\u002Fgithub.com\u002Fmateaix\u002Fmateclaw\u002Fblob\u002Fdev\u002Fmateclaw-server\u002Fsrc\u002Fmain\u002Fresources\u002Fskills\u002Fxhs_note\u002FSKILL.md",[],[74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94],"note","xhs note","xhs","创作","persona","memory","红书","user","red","图文","内容创作","style","小红书","笔记","xiaohongshu","去AI化","linux","文案","windows","macos","文字",{"skillNo":96,"name":97,"nameZh":6,"description":98,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":99,"categories":100,"keywords":101,"publishedAt":24},"01M6KW0J69PPWSCVSR6JVJ0P1F","x_intel","Read X (Twitter) posts, search, timelines and user profiles via the official xurl CLI.","https:\u002F\u002Fgithub.com\u002Fmateaix\u002Fmateclaw\u002Fblob\u002Fdev\u002Fmateclaw-server\u002Fsrc\u002Fmain\u002Fresources\u002Fskills\u002Fx_intel\u002FSKILL.md",[],[102,103,104,105,106,107,108,109,110,111,90,112,113,114,115,116,117,118,119,93],"x intel","shell","xurl","execute","twitter","social-media","via","profiles","research","true","read","command","cli","social","search","official","Media","posts",{"skillNo":121,"name":122,"nameZh":6,"description":123,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":124,"categories":125,"keywords":126,"publishedAt":24},"01M6KW0DEPAYEF2JQ70PGN0Y8D","writing-plans","Write implementation plans: bite-sized tasks, paths, code.","https:\u002F\u002Fgithub.com\u002Fmateaix\u002Fmateclaw\u002Fblob\u002Fdev\u002Fmateclaw-server\u002Fsrc\u002Fmain\u002Fresources\u002Fskills\u002Fwriting-plans\u002FSKILL.md",[],[127,128,129,130,131,132,133,134,135,136,137,138],"plans","writing plans","writing","implementation","planning","paths","write","documentation","tasks","code","workflow","design",{"skillNo":140,"name":141,"nameZh":6,"description":142,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":143,"categories":144,"keywords":145,"publishedAt":24},"01M6KW08Q6EEN0ZSH5JRMAFH0B","webhook-subscriptions","Webhook subscriptions: event-driven agent runs.","https:\u002F\u002Fgithub.com\u002Fmateaix\u002Fmateclaw\u002Fblob\u002Fdev\u002Fmateclaw-server\u002Fsrc\u002Fmain\u002Fresources\u002Fskills\u002Fwebhook-subscriptions\u002FSKILL.md",[],[146,147,148,149,150,151,152,153,154,155,156],"subscriptions","webhook subscriptions","webhook","event-driven","automation","event","integrations","push","events","notifications","driven",{"skillNo":158,"name":159,"nameZh":6,"description":160,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":161,"categories":162,"keywords":163,"publishedAt":24},"01M6KW04W8S4EMJHSNHY3HWAY3","test-driven-development","TDD: enforce RED-GREEN-REFACTOR, tests before code.","https:\u002F\u002Fgithub.com\u002Fmateaix\u002Fmateclaw\u002Fblob\u002Fdev\u002Fmateclaw-server\u002Fsrc\u002Fmain\u002Fresources\u002Fskills\u002Ftest-driven-development\u002FSKILL.md",[],[164,64,156,165,166,82,167,168,169,170,136,171,172,173],"development","test driven development","quality","tdd","tests","enforce","refactor","testing","red-green-refactor","green"]