text-to-sql SKILL.md skillA

text-to-sql from nicholyx/ai-skills is an agent skill: a SKILL.md folder an AI agent loads when a task calls for it.

Install it, pinned
mdr add nicholyx/ai-skills/text-to-sql@git:20260516.dd241a9

Pins git:20260516.dd241a9 in mdr.lock. Pin the fingerprint instead.

Audit grade
A, 17 of 17 checks passed
Kind
SKILL.md skill
Repository
nicholyx/ai-skills
Path
.agents/skills/text-to-sql/SKILL.md
Versions recorded
2
Latest version
git:20260516.dd241a9, committed May 16, 2026
First version recorded
May 16, 2026
Size
5,490 bytes
Repository stars
6
License
Apache-2.0

Setup and use text-to-SQL capabilities for SQL databases (SQLite, PostgreSQL, MySQL, MariaDB, etc.). Use when: (1) User wants to query databases using natural language, (2) User asks to setup text-to-sql project, (3) User mentions extracting data from database, (4) User has .sqlite/.db file or database credentials and wants to work with data. This skill sets up project structure, extracts database schema, and enables natural language to SQL conversion.

Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.

What the file says

# Text-to-SQL Skill

Convert natural language questions into SQL queries and execute them against SQL databases.

## Phase 1: Project Setup

### Step 1: Ask about database connection

Ask user which database type they want to use:

**Option A: SQLite** (file-based, no credentials needed)
- User provides path to `.sqlite` or `.db` file
- Or places file in `database/` folder

**Option B: Server database** (PostgreSQL, MySQL, MariaDB, etc.)
- User creates `.env` file with connection details
- Supported: PostgreSQL, MySQL, MariaDB, and other SQL databases

### Step 2: Initialize project structure

Run the init script OR manually create structure:

**Option A: Use init script**
```bash
python scripts/init_project.py --target /path/to/project
```

**Option B: Manual setup**
```bash
mkdir -p database output/queries output/reports
```

Copy from skill folders to project root:
- `scripts/*.py` → project root (db_extractor.py, query_runner.py, list_databases.py, sql_helper.py)
- `assets/example.env` → project root
- `assets/requirements.txt` → project root
- `assets/.gitignore` → project root

Install dependencies:
```bash
pip install -r requirements.txt
```
…

Read the whole file at its exact version.

How to install

The exact contents, by fingerprint
mdr add nicholyx/ai-skills/text-to-sql@sha256:2014a5eb331606ed

The line at the top of this page pins the label git:20260516.dd241a9, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.

Badge

mdr badge

[![mdr](https://markdownregistry.com/badge/art_3tjjhanrhwtf46fe.svg)](https://markdownregistry.com/a/art_3tjjhanrhwtf46fe)

4 badge image fetches in 30 days. What the badge shows.

Versions

The registry has recorded 2 versions of this file, all committed on May 16, 2026.

versioncommittedcommitsizeaudit
git:20260516.dd241a9 latest2026-05-16 dd241a9 5,490 BA view · diff
git:20260516.4d9ab132026-05-16 4d9ab13 5,121 BA view

Audit of the latest version

A  17 of 17 checks passed. Fixed automatic checks with no AI involved, so the same checks give the same answer every run.
  • pass: Frontmatter block present
  • pass: Frontmatter declares a name
  • pass: Frontmatter declares a description
  • pass: Size between 200 bytes and 200 KB (5490 bytes)
  • pass: No zero-width or bidi control characters
  • pass: No instruction hidden inside an HTML comment
  • pass: No link to an exfiltration or paste host
  • pass: No credential-shaped string
  • pass: No instruction to send local credentials anywhere
  • pass: No text hidden with inline styles
  • pass: No prompt-injection phrasing
  • pass: No curl or wget piped into a shell
  • pass: No recursive delete of root, home or parent
  • pass: No instruction to read or print local credentials
  • pass: No base64 blob over 200 characters
  • pass: No link to a raw IP address
  • pass: No script tag

Source

GitHub

nicholyx/ai-skills · 6 stars · license Apache-2.0 · pushed 2026-10-18 · branch main

API

GET https://markdownregistry.com/api/v1/artifacts/art_3tjjhanrhwtf46fe
GET https://markdownregistry.com/api/v1/resolve?ref=nicholyx/ai-skills/text-to-sql
GET https://markdownregistry.com/api/v1/blob/2014a5eb331606ed8811c3b0c11a316f319299dd3ba45af170abf71785c87e91

Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.

Guides: the SKILL.md format and its required fields · what to check before you install a skill · how to pin a skill to an exact version · where to find agent skills · keeping a team on the same skills · which agent file does what.

More from nicholyx/ai-skills

agent-browser SKILL.md skill
nicholyx/ai-skills · .agents/skills/agent-browser/SKILL.md · Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages…
git:20260516.dd241a9 · audit A · 6 stars
architecture-designer SKILL.md skill
nicholyx/ai-skills · .agents/skills/architecture-designer/SKILL.md · Use when designing new high-level system architecture, reviewing existing designs, or making architectural decisions…
v1.1.1 · audit A · 6 stars
architecture-patterns SKILL.md skill
nicholyx/ai-skills · .agents/skills/architecture-patterns/SKILL.md · Implement proven backend architecture patterns including Clean Architecture, Hexagonal Architecture, and Domain-Driven…
git:20260516.dd241a9 · audit A · 6 stars
browser-use SKILL.md skill
nicholyx/ai-skills · .agents/skills/browser-use/SKILL.md · Automates browser interactions for web testing, form filling, screenshots, and data extraction. Use when the user needs…
git:20260516.dd241a9 · audit A · 6 stars
deep-research SKILL.md skill
nicholyx/ai-skills · .agents/skills/deep-research/SKILL.md · Use when the user needs multi-source research with citation tracking, evidence persistence, and structured report…
git:20260516.dd241a9 · audit A · 6 stars
docx SKILL.md skill
nicholyx/ai-skills · .agents/skills/docx/SKILL.md · Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files). Triggers…
git:20260516.4d9ab13 · audit A · 6 stars
enhance-prompt SKILL.md skill
nicholyx/ai-skills · .agents/skills/enhance-prompt/SKILL.md · Transforms vague UI ideas into polished, Stitch-optimized prompts. Enhances specificity, adds UI/UX keywords, injects…
git:20260516.4d9ab13 · audit A · 6 stars
AGENTS.md@.agents/skills/extension-dev-skill AGENTS.md file
nicholyx/ai-skills · .agents/skills/extension-dev-skill/AGENTS.md
git:20260516.9c51e17 · audit A · 6 stars
extension-dev-skill SKILL.md skill
nicholyx/ai-skills · .agents/skills/extension-dev-skill/SKILL.md · AI Skill for building EasyEDA Pro extension plugins. Used when users need to create, modify, or debug EasyEDA Pro…
v2.0.0 · audit A · 6 stars
find-skills SKILL.md skill
nicholyx/ai-skills · .agents/skills/find-skills/SKILL.md · Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is…
git:20260516.4d9ab13 · audit A · 6 stars
frontend-design SKILL.md skill
nicholyx/ai-skills · .agents/skills/frontend-design/SKILL.md · Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to…
git:20260516.4d9ab13 · audit A · 6 stars
gh-cli SKILL.md skill
nicholyx/ai-skills · .agents/skills/gh-cli/SKILL.md · GitHub CLI (gh) comprehensive reference for repositories, issues, pull requests, Actions, projects, releases, gists…
git:20260516.4d9ab13 · audit A · 6 stars

Every file in nicholyx/ai-skills

Browse by kind, by grade A, or by owner.