Coding & Developmentπuniversal
QueryClaw
The AI-Native Database Agent. Safe, autonomous, and transactional operations for MySQL, PostgreSQL, and more. π¦π€
Quick Start
Install this Skill
npx skills add queryclaw/queryclaw# QueryClaw **Your Database, Under AI Command.** > [δΈζη](README_CN.md) [](https://pypi.org/project/queryclaw/) [](LICENSE) [](https://python.org) <!-- TODO: Add demo to docs/assets/demo.gif (asciinema or GIF), then uncomment:  --> **7 tools** | **7 skills** | **4 databases** | **243+ tests** | **Multi-LLM via LiteLLM** --- ## What is QueryClaw? **QueryClaw** is an AI-native database agent that lets you hand over an entire database instance to an LLM-powered Agent. Think of it as giving your database a brain β it can explore schemas, query data, modify records, diagnose performance, and even generate new data using AI, all through natural language. **This is not another Text-to-SQL chatbot.** QueryClaw is a full [ReACT](https://arxiv.org/abs/2210.03629) Agent that reasons, acts, observes, and iterates β it works the way a developer thinks about data, but with the depth of a seasoned DBA. ### The Idea [OpenClaw](https://github.com/openclaw/openclaw) proved that an LLM can safely control a personal computer. **QueryClaw asks: what if we give it a database instead?** | | OpenClaw / nanobot | QueryClaw | |---|---|---| | **Controls** | Operating System | Database | | **Interface** | Shell, filesystem, browser | SQL, schema, data | | **Safety** | Sandboxed execution | Transaction rollback, dry-run, audit | | **Audience** | General users | Application developers & DBAs | ## Why QueryClaw? Developers spend countless hours on repetitive database tasks: writing queries, debugging data issues, generating test data, reviewing schema designs, analyzing performance. Most database tools are either too low-level (raw SQL clients) or too limited (drag-and-drop query builders). QueryClaw sits in the sweet spot: **an intelligent agent that understands both your natural language intent and the database semantics**. ### Before / After | | Traditional Workflow | With QueryClaw | |---|---|---| | **Query** | Write SQL by hand, guess table names | `"Show me top customers"` β Agent explores schema and builds the query | | **Modify data** | Write UPDATE, hope WHERE is correct, no audit | Agent validates, dry-runs, asks for confirmation, records before/after snapshot | | **Generate test data** | Write scripts, handle FK constraints manually | `"Generate 100 test users with orders"` β respects schema automatically | | **Diagnose slow query** | Run EXPLAIN, read docs, iterate | `"Why is this query slow?"` β Agent runs EXPLAIN, suggests indexes | | **Team collaboration** | Share SQL snippets in chat | Ask in Feishu/DingTalk, Agent replies with results directly | ### Key Differentiators - **Autonomous reasoning** β A full ReACT agent loop, not a one-shot translator. It explores schemas, runs queries, observes results, and adjusts its approach across multiple steps - **Safety-first writes** β Multi-layer protection for mutations: policy checks β SQL AST validation β dry-run β human confirmation β transaction wrapping β full audit with before/after snapshots - **Multi-channel** β Use it in the terminal (`queryclaw chat`) or deploy to team messaging (`queryclaw serve`) for Feishu / DingTalk with interactive confirmation - **Extensible skills** β Add new capabilities via `SKILL.md` markdown files β no code changes, no redeployment. The agent loads skills on demand - **Multi-database** β MySQL, PostgreSQL, SQLite, SeekDB (OceanBase) with a clean adapter interface for adding more ### What You Can Do ``` > "Show me the top 10 customers by revenue last quarter" > "Why is this query slow? Suggest indexes" > "Generate 100 realistic test users with orders" > "Find orphaned records and fix foreign key violations" > "Based on product descriptions, generate a one-sentence summary column" > "What tables are related to the orders system? Draw the relationships" ``` ## Installation ```bash pip install queryclaw ``` For PostgreSQL support: ```bash pip install queryclaw[postgresql] ``` For Feishu channel support: ```bash pip install queryclaw[feishu] ``` For DingTalk channel support: ```bash pip install queryclaw[dingtalk] ``` For all optional features (PostgreSQL + SQL validation + Feishu + DingTalk): ```bash pip install queryclaw[all] ``` ## Quick Start ```bash # 1. Initialize configuration queryclaw onboard # 2. Edit config β set your database connection and LLM API key # Config location: ~/.queryclaw/config.json # 3. Start chatting with your database queryclaw chat ``` Example interaction: ``` You: What tables are in this database? Agent: [calls schema_inspect] Found 12 tables. Here are the main ones... You: Show me the top 5 customers by total order amount Agent: [calls query_execute] Here are the results... You: Add an index on orders.customer_id Agent: β οΈ This is a DDL operation. Proceed? [y/N] ``` For channel mo ... (truncated)
Repository
7stars
0forks
Details
Related Skills
More coding & development skills you might like
Reticle
Coding & DevelopmentAI agents can generate code, but still struggle to understand what they build. Reticle brings Jev-style machine-native runtime perception to web & desktop applications.
π€claudeπuniversal
1.2k
190
View
agentscope-java
Coding & DevelopmentExpert Java developer skill for AgentScope Java framework - a reactive, message-driven multi-agent system built on Project Reactor. Use when working with reactive programming, LLM integration, agent orchestration, multi-agent systems, or when the user mentions AgentScope, ReActAgent, Mono/Flux, Project Reactor, or Java agent development. Specializes in non-blocking code, tool integration, hooks, pipelines, and production-ready agent applications.
πuniversal
6.0k
1.5k
View
ospec
Coding & DevelopmentDocument-driven OSpec workflow for initialization, change/goal routing, validation, archiving, and durable project knowledge.
β¨geminiπ€claudeπ¬gptπuniversal
524
34
View
misakanet-failure-memory
Coding & Developmentπ A zero-dependency, git-backed micro-lesson library for AI Agents to asynchronously share and search verified debugging experience. Python stdlib only. | https://misakanet.org
π€claudeβ¨οΈcursorπuniversal
424
158
View