agentCLAWHUBUnverified

Text To Sql

Use when (1) user describes what data they want in plain English and asks for the corresponding SQL query. (2) user says "write SQL for this", "convert to qu...

OpenClaw

Rank

62

Safety

84

Downloads

2.0k

Updated

Oct 9, 2026

Version

2.0.3

Source

CLAWHUB

About

What it does, and when to use it.

Capability contract not published. No trust telemetry is available yet. 2K downloads reported by the source. Last updated 10/9/2026.

Avoid when

  • Contract metadata is missing or unavailable for deterministic execution.

Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing

Public facts

Every fact links back to the source it came from.

Vendor
Clawhubvendor · observed Oct 9, 2026
Protocol compatibility
OpenClawcompatibility · observed Oct 9, 2026
Adoption signal
2K downloadsadoption · observed Oct 9, 2026
Latest release
2.0.3release · observed May 29, 2026
Handshake status
UNKNOWNsecurity

Install and run

Setup complexity: low.

clawhub skill install s179qwqch3yp9926afz4rxbz0h85z9mm:text-to-sql
  1. Install using `clawhub skill install s179qwqch3yp9926afz4rxbz0h85z9mm:text-to-sql` in an isolated environment before connecting it to live workloads.
  2. No published capability contract is available yet, so validate auth and request/response behavior manually.
  3. Review the upstream CLAWHUB listing at https://clawhub.ai/wangjipeng977/text-to-sql before using production credentials.

Contract: missing

curl -s "https://www.xpersona.co/api/v1/agents/clawhub-wangjipeng977-text-to-sql/snapshot"

Documentation

CLAWHUB

146,188 characters of source documentation, loaded on request.

Extracted files

5 files captured from the source.

SKILL.md

---
name: text-to-sql
description: >
  Use when (1) user describes what data they want in plain English and asks for the corresponding SQL query. 
  (2) user says "write SQL for this", "convert to query", "how do I select", or "give me the SQL". 
  (3) user provides a database schema or table descriptions and asks a question answerable by SQL. 
license: MIT
metadata:
  version: "1.0.1"
  category: data
  author: wangjipeng
  sources:
    - https://github.com/MiniMax-AI/skills
---

# Text to SQL

Use when (1) user describes what data they want in plain English and asks for the corresponding SQL query. (2) user says "write SQL for this", "convert to query", "how do I select", or "give me the SQL". (3) user provides a database schema or table descriptions and asks a question answerable by SQL.

## Core Position

This skill solves the specific problem of: *non-technical users who know what data they want cannot translate their intent into SQL — they need a bridge from natural language to query.*

This skill IS NOT:
- A SQL execution environment — it writes queries, does not run them
- A schema design tool — it works with existing schema the user provides
- A data analysis tool — it produces SQL, not results or insights

This skill IS activated ONLY when: natural language description + database schema + SQL request are all present.

## Modes

### `/text-to-sql`

**Default mode.** Converts natural language into a syntactically correct SQL query.

When to use: User describes data needs and provides schema — wants the query.

### `/text-to-sql/explain`

Outputs the SQL query with inline comments explaining each clause.

When to use: User wants to understand the query while seeing it, for learning purposes.

### `/text-to-sql/alternatives`

Provides 2-3 alternative query approaches (different JOINs, subqueries vs CTEs, etc.).

When to use: User is learning SQL or wants to compare query strategies.

## Execution Steps

### Step 1 — Confirm Schema

1. Receive natural language request and detect if schema is present
2. Schema may be provided as:
   - Table/column names explicitly in the request
   - A CREATE TABLE statement
   - A DESCRIBE output
   - Column names from a previous query
3. If schema is NOT provided, ask the user for it before proceeding — do not guess table or column names
4. Build a schema map: `table_name → {column: type}`

### Step 2 — Translate Intent to SQL Clauses

Map natural language intent to SQL components:

| Natural Language | SQL Clause |
|---|---|
| "all", "every", "complete list" | `SELECT *` or `SELECT all columns` |
| "only", "just", "specifically" | `SELECT [specific columns]` |
| "where [condition]" | `WHERE` clause |
| "sorted by", "in order of" | `ORDER BY` |
| "grouped by", "each [X]" | `GROUP BY` |
| "top N", "first N", "N most" | `LIMIT N` + `ORDER BY` |
| "not", "exclude", "without" | `WHERE NOT` or `!=` / `<>` |
| "both X and Y", "along with" | `AND` in WHERE, or JOIN |
| "either X or Y", "or" | `OR` in WHERE |
| "be

README.md

# Text To Sql

[中文版](./README_zh.md)

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
[![Version](https://img.shields.io/badge/version-1.0-blue)](SKILL.md)

> Converts natural language descriptions into syntactically correct SQL queries

## What Problem This Solves

Non-technical users know what data they want ("show me revenue by month for the top 10 customers") but can't write SQL. This skill bridges the gap — takes a schema + natural language request and produces a syntactically correct query with table aliases, proper JOINs, and GROUP BY.

**When triggered:** Database schema + natural language question + write SQL intent.

## Features

- **Schema-aware translation** — asks for table/column schema before writing queries (never invents column names)
- **Complete SQL coverage** — SELECT, WHERE, GROUP BY, ORDER BY, LIMIT, JOIN (INNER, LEFT, RIGHT), aggregate functions
- **Plain English explanation** — outputs both the query AND a one-line description of what it does
- **Multiple approach options** — `/alternatives` mode shows different JOIN strategies or subquery vs CTE approaches

## Quick Start

```bash
# Via ClawHub
clawhub install text-to-sql

# Or manually
cp -r text-to-sql ~/.openclaw/skills/
```

### Usage

```
/text-to-sql
```

Provide schema (table names + columns) and describe what data you want in English.

```
/text-to-sql/explain
```

Outputs query with inline comments explaining each clause — for learning purposes.

```
/text-to-sql/alternatives
```

Shows 2-3 different query approaches for the same question.

## Modes

| Mode | Description |
|------|-------------|
| `/text-to-sql` | Converts natural language to SQL query |
| `/text-to-sql/explain` | Query with inline comments explaining each clause |
| `/text-to-sql/alternatives` | 2-3 alternative query strategies |

## Examples

| Request | Query |
|---------|-------|
| Schema: `users(id, name)`, `orders(user_id, total)` | `SELECT u.name, SUM(o.total) FROM users u JOIN orders o ON u.id = o.user_id GROUP BY u.name` |
| "top 10 customers" | `ORDER BY total DESC LIMIT 10` added |
| "revenue by month" | `SELECT DATE_TRUNC('month', date), SUM(revenue) FROM orders GROUP BY 1` |
| No schema provided | Asks for schema first — doesn't guess column names |

## Directory Structure

```
text-to-sql/
├── SKILL.md
├── LICENSE
├── README.md
├── README_zh.md
├── CONTRIBUTING.md
├── .gitignore
├── references/       # SQL dialect cheat sheet, JOIN guide, intent mapping
└── tests/
```

## License

MIT License — see [LICENSE](LICENSE).

_meta.json

{
  "ownerId": "kn70zthc74p61mvctddrancx0s832g4r",
  "slug": "text-to-sql",
  "version": "2.0.3",
  "publishedAt": 1780047410444
}

references/index.md

# text-to-sql — References

Detailed documents for `user-describes-data` skill.

TODO: Add reference files here as needed.

CHANGELOG.md

# Changelog
## [1.0.1] - 2026-05-18

### Minor update

- **Previous:** 1.0
- **Changed:** Updated skill content and quality



## [1.0] - 2026-05-18

### Added

- Initial release
Github ReposUpdated 7h agoRank 70

AionUi

Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!

MCPOPENCLAW
Github ReposUpdated 6mo agoRank 70

activepieces

AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents

OPENCLAW
Github ReposUpdated 6mo agoRank 70

cherry-studio

AI productivity studio with smart chat, autonomous agents, and 300+ assistants.

MCPOPENCLAW
Github ReposUpdated 7mo agoRank 70

CopilotKit

The Frontend for Agents & Generative UI. React + Angular

OPENCLAW

Machine-readable data

The same record, as JSON, for agents and crawlers.

{
  "facts": [
    {
      "factKey": "vendor",
      "category": "vendor",
      "label": "Vendor",
      "value": "Clawhub",
      "href": "https://clawhub.ai/wangjipeng977/skills/text-to-sql",
      "sourceUrl": "https://clawhub.ai/wangjipeng977/skills/text-to-sql",
      "sourceType": "profile",
      "confidence": "medium",
      "observedAt": "2026-10-09T21:35:17.032Z",
      "isPublic": true
    },
    {
      "factKey": "protocols",
      "category": "compatibility",
      "label": "Protocol compatibility",
      "value": "OpenClaw",
      "href": "https://www.xpersona.co/api/v1/agents/clawhub-wangjipeng977-text-to-sql/contract",
      "sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-wangjipeng977-text-to-sql/contract",
      "sourceType": "contract",
      "confidence": "medium",
      "observedAt": "2026-10-09T21:35:17.032Z",
      "isPublic": true
    },
    {
      "factKey": "traction",
      "category": "adoption",
      "label": "Adoption signal",
      "value": "2K downloads",
      "href": "https://clawhub.ai/wangjipeng977/text-to-sql",
      "sourceUrl": "https://clawhub.ai/wangjipeng977/text-to-sql",
      "sourceType": "profile",
      "confidence": "medium",
      "observedAt": "2026-10-09T21:35:17.032Z",
      "isPublic": true
    },
    {
      "factKey": "latest_release",
      "category": "release",
      "label": "Latest release",
      "value": "2.0.3",
      "href": "https://clawhub.ai/wangjipeng977/text-to-sql",
      "sourceUrl": "https://clawhub.ai/wangjipeng977/text-to-sql",
      "sourceType": "release",
      "confidence": "medium",
      "observedAt": "2026-05-29T09:36:50.444Z",
      "isPublic": true
    },
    {
      "factKey": "handshake_status",
      "category": "security",
      "label": "Handshake status",
      "value": "UNKNOWN",
      "href": "https://www.xpersona.co/api/v1/agents/clawhub-wangjipeng977-text-to-sql/trust",
      "sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-wangjipeng977-text-to-sql/trust",
      "sourceType": "trust",
      "confidence": "medium",
      "observedAt": null,
      "isPublic": true
    }
  ],
  "events": [
    {
      "eventType": "release",
      "title": "Release 2.0.3",
      "description": "Initial release",
      "href": "https://clawhub.ai/wangjipeng977/text-to-sql",
      "sourceUrl": "https://clawhub.ai/wangjipeng977/text-to-sql",
      "sourceType": "release",
      "confidence": "medium",
      "observedAt": "2026-05-29T09:36:50.444Z",
      "isPublic": true
    }
  ]
}

Record generated Oct 10, 2026.

Sponsored

Ads related to Text To Sql and adjacent AI workflows.