mssql

mssql is a skill for Claude Code, Codex from sanjay3290/ai-skills. It costs 84 tokens per session (1,046 once invoked), scanned B, original, Apache-2.0.

A read-only connection to Microsoft SQL Server databases, which store structured application data in tables.

In plain words
What is it for?
Running SELECT queries, exploring tables and schemas, checking records, and analysing data across SQL Server databases.
Why use it?
It allows data inspection and analysis without providing commands that change database contents, and can work with several configured databases.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Part of the ai-skills plugin — 24 skills shipped together

Good fit Running SELECT queries, exploring tables and schemas, checking records, and analysing data across SQL Server databases.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/sanjay3290/ai-skills/mssql
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add sanjay3290/ai-skills --skill mssql
Clone the repo
git clone --depth 1 https://github.com/sanjay3290/ai-skills

Made for: Claude Code, Codex.

Or install ai-skills, the plugin that ships this one along with the rest of its 24 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for mssql

README.md
[![agentmods](https://agentmods.dev/badge/skills/sanjay3290/ai-skills/mssql/github.svg)](https://agentmods.dev/skills/sanjay3290/ai-skills/mssql)
Your own site
<a href="https://agentmods.dev/skills/sanjay3290/ai-skills/mssql"><img src="https://agentmods.dev/badge/skills/sanjay3290/ai-skills/mssql/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for mssql

Your own site · 80×15
<a href="https://agentmods.dev/skills/sanjay3290/ai-skills/mssql"><img src="https://agentmods.dev/badge/skills/sanjay3290/ai-skills/mssql.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 84 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,046 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • Socket pass 18 Mar 2026
  • Snyk pass 4 Mar 2026
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 3 findings, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Rogue Agent · line 3
    Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
    Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
  • medium Privilege Escalation · line 25
    Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
    Fix: Avoid sudo/root unless strictly required. Prefer least-privilege patterns. If elevation is needed, document the justification and scope.
  • medium Privilege Escalation · line 123
    Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
    Fix: Avoid sudo/root unless strictly required. Prefer least-privilege patterns. If elevation is needed, document the justification and scope.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00084 $0.01046
Opus 5 $0.00042 $0.00523
Sonnet 5 $0.00017 $0.00209
Haiku 4.5 $0.00008 $0.00105

Measured 11d ago against content hash 2e9d895d3b72, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade B, and why

mssql scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/query.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

chmod 600 connections.json
Origin

Copies of this mod

4 near-identical copies found in the catalogue:

  • mssql — 100% identical, 0 lines differ
  • postgres — 89% identical, 64 lines differ
  • postgres — 89% identical, 40 lines differ
  • postgres — 89% identical, 40 lines differ
skills/mssql/SKILL.md · 136 lines

How it starts

The opening of the file, as written. The whole thing — 136 lines — stays where its author put it; the contents beside it link to each section on GitHub.

MSSQL Read-Only Query Skill

Execute safe, read-only queries against configured Microsoft SQL Server databases.

Requirements

  • Python 3.8+
  • pymssql: pip install -r requirements.txt

Setup

Create connections.json in the skill directory or ~/.config/claude/mssql-connections.json.

Security: Set file permissions to 600 since it contains credentials:

chmod 600 connections.json
{
  "databases": [
    {
      "name": "production",
      "description": "Main app database - users, orders, transactions",
      "host": "db.example.com",
      "port": 1433,
      "database": "app_prod",
      "user": "readonly_user",
      "password": "your-password",
      "encrypt": true,
      "tds_version": "7.3"
    }
  ]
}

Config Fields

Field Required Description
name Yes Identifier for the database (case-insensitive)
description Yes What data this database contains (used for auto-selection)
host Yes Database hostname
port No Port number (default: 1433)
database Yes Database name
user Yes Username
password Yes Password
encrypt No Enable TLS encryption (default: false)
tds_version No TDS protocol version: 7.0, 7.1, 7.2, 7.3, 7.4 (default: auto)

Usage

List configured databases

python3 scripts/query.py --list

Query a database

python3 scripts/query.py --db production --query "SELECT TOP 10 * FROM users"

List tables

python3 scripts/query.py --db production --tables

Show schema

python3 scripts/query.py --db production --schema

Limit results

python3 scripts/query.py --db production --query "SELECT * FROM orders" --limit 100

Note: MSSQL uses TOP N instead of LIMIT. The --limit flag automatically inserts TOP N after SELECT.

Database Selection

Match user intent to database description:

User asks about Look for description containing
users, accounts users, accounts, customers
orders, sales orders, transactions, sales
analytics, metrics analytics, metrics, reports
logs, events logs, events, audit

Read the full file on GitHub · 136 lines

Files

What ships with it

5 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 136 lines · 84 tokens per session scan B 2e9d895d3b72

Subscribe to this mod's changes

mssql is a skill published in the GitHub repository sanjay3290/ai-skills (422 stars, last pushed today), licensed Apache-2.0. It adds 84 tokens to every session and 1,046 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it B with 1 finding (asks for root). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

postgresql

PostgreSQL database documentation - SQL queries, database design, administration, performance tuning, and advanced features. Use when working with PostgreSQL databases, writing SQL, or managing database systems.

aiskillstore/marketplace · 40 tokens

insforge

Use this skill when writing app code with InsForge or @insforge/sdk: database CRUD, auth, storage uploads/storage RLS, functions, OpenRouter AI, realtime, emails, Stripe or Razorpay payments, or pointing S3-compatible tooling (aws CLI, AWS SDKs, rclone, Terraform, boto3) at InsForge Storage. Trigger on requests like…

aiskillstore/marketplace · 121 tokens

python-database-patterns

SQLAlchemy and database patterns for Python. Triggers on: sqlalchemy, database, orm, migration, alembic, async database, connection pool, repository pattern, unit of work.

aiskillstore/marketplace · 43 tokens

convex-design

Design and build reactive, type-safe, production-grade backends on Convex. Covers schema, queries/mutations/actions, indexes, auth, file storage, scheduling, real-time multiplayer, mobile backends, and LLM/agent workflows on Convex's one-platform stack.

aiskillstore/marketplace · 59 tokens

convex-expert

Convex backend specialist. Use this agent for any code inside a convex/ directory — function definitions, schemas, indexes, queries, mutations, actions, HTTP endpoints, cron jobs, file storage, auth wiring, and component installation. Knows the object-form function syntax, validator patterns, resource limits, and…

aiskillstore/marketplace · 78 tokens

timescaledb

TimescaleDB - PostgreSQL extension for high-performance time-series and event data analytics, hypertables, continuous aggregates, compression, and real-time analytics.

aiskillstore/marketplace · 33 tokens