Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 1 addition & 15 deletions .agents/skills/xsql/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,12 @@
---
name: xsql
description: Use when Codex needs to inspect MySQL or PostgreSQL with the xsql CLI, especially for safe read-only querying, schema discovery, profile inspection, machine-readable JSON output, stable error-code handling, SSH-backed connections, or MCP server setup in this repository.
description: Use when inspecting MySQL or PostgreSQL with the xsql CLI, especially for safe read-only querying, schema discovery, profile inspection, machine-readable JSON output, stable error-code handling, SSH-backed connections, or MCP server setup in this repository.
---

# xsql

Use `xsql` as an AI-first database CLI. Prefer it when the task requires stable JSON output, explicit error codes, schema discovery, or profile-aware access to MySQL/PostgreSQL.

## Read The Contract First

Read only the docs needed for the task:

- `docs/cli-spec.md`: command behavior, output formats, exit codes
- `docs/error-contract.md`: JSON/YAML success and failure shapes, stable error codes
- `docs/ai.md`: AI-oriented workflow, `schema dump`, MCP usage
- `docs/config.md`: profile layout, config path resolution, CLI/ENV/config precedence
- `docs/db.md`: read-only policy and query safety model
- `docs/ssh-proxy.md`: SSH behavior, host-key validation, proxy fallback

If the user asks for code changes to xsql itself, align with these docs before editing code. If implementation and docs diverge, update docs first.

## Default Operating Rules

- Prefer `--format json` for agent work, even if TTY would default to table.
Expand Down Expand Up @@ -119,5 +106,4 @@ Table and CSV output are for humans; they do not include `ok` or `schema_version
- Keep CLI-layer logic in `cmd/xsql` thin.
- Keep core behavior in `internal/*`, not coupled to Cobra types.
- Preserve output contracts and stable error codes.
- Update docs before implementing any external behavior change.
- Add or update tests for JSON output, exit codes, and read-only behavior.
7 changes: 1 addition & 6 deletions .claude-plugin/marketplace.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"$schema": "https://anthropic.com/claude-code/marketplace.schema.json",
"name": "xsql",
"description": "AI-first cross-database CLI tools for read-only SQL inspection",
"owner": {
Expand All @@ -10,11 +9,7 @@
{
"name": "xsql",
"description": "Use when you need to safely inspect MySQL/PostgreSQL data or schema via the xsql CLI.",
"source": "./",
"skills": [
"./.agents/skills/xsql"
],
"strict": true
"source": "./.agents"
}
]
}
Loading