Xspoonai official db sql runner

From jiayaoqijia/cryptoskill · View interactive version

Xspoonai official db sql runner is an AI agent skill from the GitHub repository jiayaoqijia/cryptoskill. Run parameterized SQL queries against a configured database. Supports safe parameterized queries with dev-mode restrictions for testing and development.

How to use this skill

Skill file

Description

Run parameterized SQL queries against a configured database. Supports safe parameterized queries with dev-mode restrictions for testing and development.

Inputs

{
  "query": "SELECT * FROM users WHERE id = ?",
  "params": ["value"],
  "database": "dev|test"
}

Outputs

{
  "ok": true,
  "data": {
    "rows": [],
    "count": 0
  }
}

Usage

Demo Mode

python scripts/main.py --demo

Run Query

echo '{"query":"SELECT * FROM users","params":[],"database":"dev"}' | python3 scripts/main.py

Examples

Example 1: Query Results

$ echo '{"query":"SELECT * FROM users WHERE id = ?","params":[1],"database":"dev"}' | python3 scripts/main.py
{
  "ok": true,
  "data": {
    "rows": [{"id": 1, "name": "John"}],
    "count": 1
  }
}

Error Handling

When an error occurs, the skill returns:

{
  "ok": false,
  "error": "Error description",
  "details": {
    "query": "Invalid SQL syntax"
  }
}
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.