sql-context

Installation
SKILL.md

SQL context

Use the remote client when CONTEXT_SQL_URL is configured. Otherwise use the existing local helper. Both scripts are relative to this skill directory; replace <skill-directory> with its absolute path. A connection failure does not authorize initializing or replacing a database.

Remote HTTPS SQL

The remote client needs Python 3.11+, an HTTPS service URL, and an account token. Supply the token through CONTEXT_SQL_TOKEN or CONTEXT_SQL_TOKEN_FILE, an owned private file with mode 0600. Never put tokens in prompts, SQL comments, or version control. The client validates TLS and refuses redirects. For a private certificate authority, set SSL_CERT_FILE to its trusted PEM certificate bundle; never disable certificate verification.

python3 <skill-directory>/scripts/remote.py schema
python3 <skill-directory>/scripts/remote.py prompt \
  --project amiorin/posthog --task create-package-skill --file request.txt
python3 <skill-directory>/scripts/remote.py sql --prompt-id <returned-prompt-id> \
  --query 'SELECT slug, kind FROM catalog.skill ORDER BY slug LIMIT 30'

Submit the actual user request explicitly with prompt --file or --text. The client cannot capture the conversation automatically. If only a summary is available, label it --kind summary; do not present it as the original prompt. Link follow-up requests with --parent-id; use --session-id to group requests; the server assigns their sequence. Treat a prompt ID as a trace identifier, never an authentication credential. Account and tenant access come from server-side identity.

Read references/schema.md for table relationships and references/queries.sql for parameterized discovery, exact source retrieval, memory, and trace examples. Refresh schema to inspect the service actually connected. Submit one statement per invocation using sql --query or sql --file, with bound values in --params or --params-file as a JSON array or object. Use %s positional placeholders or %(name)s named placeholders, never string interpolation. The examples file contains independent statements; copy the selected statement to its own file before executing it.

Installs
1
First Seen
Sep 17, 2026