internal/skills/defaults/wrenai-query/SKILL.md
--- name: wrenai-query description: WrenAI natural language to SQL query tool. IMPORTANT: Use exec tool to run the script directly, DO NOT implement the logic yourself. --- # WrenAI Query Tool ## ⚠️ CRITICAL INSTRUCTIONS FOR AI AGENTS **YOU MUST FOLLOW THESE INSTRUCTIONS EXACTLY. DO NOT DEVIATE.** ### When User Asks for Database Query **USE THE EXEC TOOL. RUN THIS EXACT COMMAND:** ```bash sh "/data/.skills/wrenai-query/scripts/wrenai" "user's natural language query here" pg ``` **DO NOT:*
npx skillsauth add 91zgaoge/memoh-x internal/skills/defaults/wrenai-queryInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
YOU MUST FOLLOW THESE INSTRUCTIONS EXACTLY. DO NOT DEVIATE.
USE THE EXEC TOOL. RUN THIS EXACT COMMAND:
sh "/data/.skills/wrenai-query/scripts/wrenai" "user's natural language query here" pg
DO NOT:
WHY:
The script at /data/.skills/wrenai-query/scripts/wrenai already does everything:
Just execute the command and parse the JSON output.
sh "/data/.skills/wrenai-query/scripts/wrenai" "Query last month's KPI indicators" pg
sh "/data/.skills/wrenai-query/scripts/wrenai" "统计各渠道的业务办理量" mssql
sh "/data/.skills/wrenai-query/scripts/wrenai" "查询员工信息" hr
The script returns JSON:
{
"success": true,
"query": "查询上个月江西省的KPI指标",
"sql": "SELECT * FROM ...",
"execution_success": true,
"results": {
"records": [...],
"columns": [...],
"total_rows": 10
},
"analysis": "AI analysis text"
}
Parse this JSON to get the data. DO NOT try to execute the SQL yourself.
| Instance | Database | Use Case | |----------|----------|----------| | pg | PostgreSQL | CBNBI business data, KPIs | | mssql | SQL Server | Fanwei system data | | hr | SQL Server | HR system data |
DO NOT USE THIS INFORMATION TO IMPLEMENT YOUR OWN SOLUTION.
/api/v1/run_sqlIf you find yourself writing Python code to call WrenAI API, YOU ARE DOING IT WRONG.
Use the script. That's it.
development
FastAPI best practices and conventions. Use when working with FastAPI APIs and Pydantic models for them. Keeps FastAPI code clean and up to date with the latest features and patterns, updated with new versions. Write new code or refactor and update old code.
development
Comprehensive spreadsheet creation, editing, and analysis with support for formulas, formatting, data analysis, and visualization. USE THIS SKILL for ALL spreadsheet files including .xls (Excel 97-2003), .xlsx, .xlsm, .csv, .tsv. Use for: (1) Reading or analyzing spreadsheet data, (2) Creating new spreadsheets with formulas and formatting, (3) Modifying existing spreadsheets while preserving formulas, (4) Data analysis and visualization, (5) Recalculating formulas. IMPORTANT: For .xls files (legacy Excel format), you MUST use this skill - do NOT attempt to read them directly as they are binary files.
tools
Automated web application testing using browser automation. Use when asked to test a web app, verify UI behavior, check for regressions, or automate browser interactions such as clicking, form filling, navigation, and screenshot capture.
development
Real-time web search using Playwright-controlled browser. Use this skill when you need current information, latest documentation, recent news, or any data beyond your knowledge cutoff (January 2025).