query-writing by langchain-ai/deepagents
npx skills add https://github.com/langchain-ai/deepagents --skill query-writing对于涉及单个表的简单问题:
sql_db_schema 查看列sql_db_query 运行对于需要多个表的问题:
使用 write_todos 来分解任务:
对每个表使用 sql_db_schema 来查找连接列和所需字段。
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
检查所有 JOIN 都有条件,GROUP BY 正确,然后运行查询。
SELECT
c.Country,
ROUND(SUM(i.Total), 2) as TotalRevenue
FROM Invoice i
INNER JOIN Customer c ON i.CustomerId = c.CustomerId
GROUP BY c.Country
ORDER BY TotalRevenue DESC
LIMIT 5;
如果查询失败或返回意外结果:
每周安装量
174
仓库
GitHub 星标数
17.4K
首次出现
2026年1月22日
安全审计
安装于
codex159
opencode159
gemini-cli155
cursor149
github-copilot149
claude-code148
For straightforward questions about a single table:
sql_db_schema to see columnssql_db_queryFor questions requiring multiple tables:
Usewrite_todos to break down the task:
Use sql_db_schema for EACH table to find join columns and needed fields.
Check all JOINs have conditions, GROUP BY is correct, then run query.
SELECT
c.Country,
ROUND(SUM(i.Total), 2) as TotalRevenue
FROM Invoice i
INNER JOIN Customer c ON i.CustomerId = c.CustomerId
GROUP BY c.Country
ORDER BY TotalRevenue DESC
LIMIT 5;
If a query fails or returns unexpected results:
Weekly Installs
174
Repository
GitHub Stars
17.4K
First Seen
Jan 22, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
codex159
opencode159
gemini-cli155
cursor149
github-copilot149
claude-code148
React 组合模式指南:Vercel 组件架构最佳实践,提升代码可维护性
113,700 周安装