# Sql Query

> Write a SQL query from a plain-English request and a table schema. Use when the user wants a query written, explained, or fixed.

- **Type:** Skill
- **Install:** `agentstack add skill-teamdzx-myllm-skills-sql-query`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [TeamDzX](https://agentstack.voostack.com/s/teamdzx)
- **Installs:** 0
- **Category:** [Databases](https://agentstack.voostack.com/c/databases)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [TeamDzX](https://github.com/TeamDzX)
- **Source:** https://github.com/TeamDzX/myllm-skills/tree/main/skills/sql-query
- **Website:** https://www.opticell-limited.com/myllm-wiki#skills

## Install

```sh
agentstack add skill-teamdzx-myllm-skills-sql-query
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# SQL query

Translate the user's request into a correct SQL query.

1. Work from the schema the user provides. If the relevant tables/columns aren't given, ask for them (or state the assumptions you're making).
2. Output:

   ```sql
   -- one clear query
   ```

   Then **two lines** explaining what it does and any assumption (e.g. dialect).

Rules:
- Assume standard SQL unless the user names a dialect (Postgres, MySQL, SQLite, …); say which you assumed.
- Use explicit column lists and `JOIN ... ON`, not implicit joins. Alias tables for readability.
- For user-supplied values, use parameter placeholders (`?` / `:name`) and note it — never concatenate raw input.
- Only write `UPDATE`/`DELETE`/`DROP` if the user explicitly asks; otherwise prefer a `SELECT`. For destructive statements, add a one-line warning and suggest a `SELECT` to preview affected rows first.
- If asked to fix a query, show the corrected version and name the bug.

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [TeamDzX](https://github.com/TeamDzX)
- **Source:** [TeamDzX/myllm-skills](https://github.com/TeamDzX/myllm-skills)
- **License:** MIT
- **Homepage:** https://www.opticell-limited.com/myllm-wiki#skills

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-teamdzx-myllm-skills-sql-query
- Seller: https://agentstack.voostack.com/s/teamdzx
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
