TEXT2SQL
Support generating SQL queries through natural language; use when users need to configure Text-to-SQL database, manage data topics, or generate SQL with natural language questions
Rank
62
Safety
84
Downloads
1.0k
Updated
Oct 11, 2026
Version
1.0.2
Source
CLAWHUB
About
What it does, and when to use it.
Capability contract not published. No trust telemetry is available yet. 1K downloads reported by the source. Last updated 10/11/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 11, 2026
- Protocol compatibility
- OpenClawcompatibility · observed Oct 11, 2026
- Adoption signal
- 1K downloadsadoption · observed Oct 11, 2026
- Latest release
- 1.0.2release · observed Jul 7, 2026
- Handshake status
- UNKNOWNsecurity
Install and run
Setup complexity: low.
clawhub skill install s1746eaqxx1yw5mkstegd982cn84fhj5:text2sql- Install using `clawhub skill install s1746eaqxx1yw5mkstegd982cn84fhj5:text2sql` in an isolated environment before connecting it to live workloads.
- No published capability contract is available yet, so validate auth and request/response behavior manually.
- Review the upstream CLAWHUB listing at https://clawhub.ai/asksqlai/text2sql before using production credentials.
Contract: missing
curl -s "https://www.xpersona.co/api/v1/agents/clawhub-asksqlai-text2sql/snapshot"
Run-check
$0.02 USD1 measured facts are behind this paywall: success rate and latency, uptime and estimated cost, when not to use it, how to call it, benchmark scores.
Agents pay $0.02 in USDC. A card payment is $0.50, the smallest a card allows.
Documentation
CLAWHUB
93,126 characters of source documentation, loaded on request.
Extracted files
4 files captured from the source.
SKILL.md
---
name: text-to-sql
description: Support generating SQL queries through natural language; use when users need to configure Text-to-SQL database, manage data topics, or generate SQL with natural language questions
dependency:
python:
- pyyaml>=6.0
- sqlalchemy>=2.0.0
---
# Text-to-SQL Intelligent Query Skill
## Task Objectives
- This Skill is used for: Generating SQL query statements through natural language, supporting multi-topic database configuration and table structure management
- Capabilities include: Database configuration, topic management, table structure reading, natural language to SQL
- Trigger conditions: User needs to configure Text-to-SQL database, create data topics, select data tables, or generate SQL with natural language questions
## Prerequisites
### Dependency Description
Required packages and versions for scripts:
```
pyyaml>=6.0
sqlalchemy>=2.0.0
```
### API Service Description
This Skill generates SQL through the HTTP API `/api/sql_for_skill/` endpoint:
- Default API address: `https://asksql.ai/`
- Service needs to be started before calling
- Supports custom API address (via `--api-url` parameter)
**API Interface Specification**:
- Endpoint path: `POST /api/sql_for_skill/`
- Request format: `multipart/form-data`
- Request parameters:
- `question`: User's natural language question (string)
- `yaml_file`: YAML configuration file (uploaded as file)
- Response format: JSON array
- Response example:
```json
[
{
"STATUS": "ok",
"MESSAGE": "",
"SQL": "SELECT SUM(total_amount) AS total_sales FROM orders WHERE YEAR(signing_date) = 2026",
"SQL_NO_PERM": "SELECT SUM(total_amount) AS total_sales FROM orders WHERE YEAR(signing_date) = 2026",
"QUESTION": "This year's total sales"
}
]
```
- Return value: Extract the `SQL` field from the first element of the response array
## Data Configuration Methods
### Two Configuration Methods Explained
When the agent guides users through data configuration, it must clearly explain the following two methods:
**Method 1: Database URL Configuration (Highly Recommended)**
- Read table structure directly through database connection
- Real-time data synchronization, ensuring accuracy
- Supports complete database semantic understanding
**Method 2: Excel File Configuration**
- Suitable for scenarios where direct database connection is not possible
- Configure through Excel file with specific format requirements
**Excel File Format (Must Strictly Follow):**
```
┌─────────────────────────────────────────────────────────────────┐
│ Excel File: products.xlsx │
├─────────────────────────────────────────────────────────────────┤
│ Sheet: orders (Sheet name = Table name) │
├──────────┬──────────┬────────────┬───────────┬─────────────────┤
│ order_id │ customer │ order_date │ amount │ status │
│ (Column) │ (Column) │ (Column) │ (Column) │ (Column) │
├──_meta.json
{
"ownerId": "kn74572dhgzsd1yb43y0xdvcd584e5ht",
"slug": "text2sql",
"version": "1.0.2",
"publishedAt": 1783463446663
}references/open_semantic_interchange_description.md
# Open Semantic Interchange (OSI) - Field Specification ## 1. Introduction This document provides a comprehensive field specification for the Open Semantic Interchange (OSI) YAML configuration file. The semantic model defines the structure for domain-specific data queries and analysis across various business contexts. The YAML file serves as a metadata layer that enables AI-powered query generation and data interpretation for structured datasets. ## 2. Document Structure This specification is organized hierarchically to mirror the YAML file structure: - **Top-Level Fields**: Global configuration fields - **Semantic Model**: Theme-level definitions - **Datasets**: Individual data source definitions - **Fields**: Detailed field specifications within each dataset ## 3. Top-Level Fields ### 3.1 `yaml-language-server` **Data Type**: Comment directive **Description**: Specifies the JSON schema path for YAML language server validation and IDE auto-completion support. **Format**: `$schema=<path-to-schema>` **Constraints**: Must reference a valid schema file path relative to the YAML file location. --- ### 3.2 `version` **Data Type**: String **Description**: Defines the semantic model version number using semantic versioning convention. **Format**: `MAJOR.MINOR.PATCH` **Constraints**: - Must follow semantic versioning format - Each component must be a non-negative integer **Default Value**: `0.0.1` --- ### 3.3 `semantic_model` **Data Type**: Object **Description**: The semantic model definition. In the current generator implementation, this file contains exactly one semantic model object. **Required Sub-fields**: - `name` - `description` - `ai_context` - `datasets` - `relationships` - `metrics` - `terms` - `rules` --- ## 4. Semantic Model Object ### 4.1 `name` **Data Type**: String **Description**: The theme name that identifies the semantic model's thematic classification. **Constraints**: - Must be a non-empty string - Should be unique within the system --- ### 4.2 `description` **Data Type**: String **Description**: A brief description explaining the semantic model's purpose and scope. **Constraints**: - Must be a non-empty string - Should clearly describe the theme's domain --- ### 4.3 `ai_context` **Data Type**: Object **Description**: AI context configuration containing instruction information for AI processing. #### 4.3.1 `instructions` **Data Type**: String **Description**: AI processing instructions that guide the AI on how to utilize this semantic model for data queries and analysis. **Constraints**: - Must be a non-empty string - Should provide clear guidance on the model's usage --- ### 4.4 `datasets` **Data Type**: Array of objects **Description**: List of datasets, where each dataset corresponds to a database table or view. **Required Sub-fields** (for each dataset): - `name` - `source` - `description` - `ai_context` - `fields` --- ### 4.5 `relationships` **Data Type**: Array of objects
skill-card.md
## Description: Support generating SQL queries through natural language; use when users need to configure Text-to-SQL database, manage data topics, or generate SQL with natural language questions. This skill is ready for commercial/non-commercial use. ## Publisher: [asksqlai](https://clawhub.ai/user/asksqlai) ### License/Terms of Use: MIT-0 ## Use Case: Developers and data teams use TEXT2SQL to configure database or Excel-backed semantic topics, inspect table structures, generate topic YAML files, and request SQL from natural-language questions. ### Deployment Geography for Use: Global ## Known Risks and Mitigations: Risk: The skill can collect and upload database metadata, table samples, topic YAML, questions, or spreadsheet data to asksql.ai. Mitigation: Use a least-privilege read-only database account, avoid confidential spreadsheets unless remote processing is accepted, and inspect or restrict what is sent to the remote service. Risk: Database passwords may be passed on the command line and saved in a local configuration file. Mitigation: Use temporary or scoped credentials, protect the output directory, and rotate credentials after use when handling sensitive environments. Risk: Generated SQL may be incorrect for the intended business question or unsafe to run without review. Mitigation: Review generated SQL before execution and run it first against non-production data or with read-only permissions. ## Reference(s): - [Open Semantic Interchange field specification](references/open_semantic_interchange_description.md) - [AskSqlAI SQL API service](https://asksql.ai/) - [TEXT2SQL ClawHub release](https://clawhub.ai/asksqlai/skills/text2sql) ## Skill Output: **Output Type(s):** [text, markdown, code, shell commands, configuration, guidance] **Output Format:** [Markdown guidance with shell commands, JSON status output, YAML configuration files, and SQL text] **Output Parameters:** [1D] **Other Properties Related to Output:** [Writes local output files for database configuration, table metadata, column metadata, and topic YAML; generated SQL is returned when the remote API call succeeds.] ## Skill Version(s): 1.0.2 (source: server release metadata) ## Ethical Considerations: Users should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.
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!
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
cherry-studio
AI productivity studio with smart chat, autonomous agents, and 300+ assistants.
CopilotKit
The Frontend for Agents & Generative UI. React + Angular
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/asksqlai/skills/text2sql",
"sourceUrl": "https://clawhub.ai/asksqlai/skills/text2sql",
"sourceType": "profile",
"confidence": "medium",
"observedAt": "2026-10-11T14:58:39.517Z",
"isPublic": true
},
{
"factKey": "protocols",
"category": "compatibility",
"label": "Protocol compatibility",
"value": "OpenClaw",
"href": "https://www.xpersona.co/api/v1/agents/clawhub-asksqlai-text2sql/contract",
"sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-asksqlai-text2sql/contract",
"sourceType": "contract",
"confidence": "medium",
"observedAt": "2026-10-11T14:58:39.517Z",
"isPublic": true
},
{
"factKey": "traction",
"category": "adoption",
"label": "Adoption signal",
"value": "1K downloads",
"href": "https://clawhub.ai/asksqlai/text2sql",
"sourceUrl": "https://clawhub.ai/asksqlai/text2sql",
"sourceType": "profile",
"confidence": "medium",
"observedAt": "2026-10-11T14:58:39.517Z",
"isPublic": true
},
{
"factKey": "latest_release",
"category": "release",
"label": "Latest release",
"value": "1.0.2",
"href": "https://clawhub.ai/asksqlai/text2sql",
"sourceUrl": "https://clawhub.ai/asksqlai/text2sql",
"sourceType": "release",
"confidence": "medium",
"observedAt": "2026-07-07T22:30:46.663Z",
"isPublic": true
},
{
"factKey": "handshake_status",
"category": "security",
"label": "Handshake status",
"value": "UNKNOWN",
"href": "https://www.xpersona.co/api/v1/agents/clawhub-asksqlai-text2sql/trust",
"sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-asksqlai-text2sql/trust",
"sourceType": "trust",
"confidence": "medium",
"observedAt": null,
"isPublic": true
}
],
"events": [
{
"eventType": "release",
"title": "Release 1.0.2",
"description": "- Updated default SQL API service endpoint to https://asksql.ai/ - Removed file: skill-card.md - No other functional or dependency changes included in this version",
"href": "https://clawhub.ai/asksqlai/text2sql",
"sourceUrl": "https://clawhub.ai/asksqlai/text2sql",
"sourceType": "release",
"confidence": "medium",
"observedAt": "2026-07-07T22:30:46.663Z",
"isPublic": true
}
]
}Record generated Oct 11, 2026.
