
Mssql
A read-only query tool for Microsoft SQL Server that connects to multiple databases through a JSON config file. It validates queries to block writes (INSERT, UPDATE, DELETE), enforces timeouts, and caps results at 10,000 rows to prevent memory issues. The intelligent database selection matches user intent to database descriptions, so you can ask about "orders" and it routes to the right connection. Practical for exploring schemas, running analytics queries, and checking production data without the risk of accidental modifications. Setup requires creating a credentials file with proper permissions, and it handles TDS protocol versions and TLS encryption for Azure SQL connections. Works through a Python CLI with flags for listing databases, showing schemas, and running queries with automatic TOP N conversion.
- skills.sh installs
- 549
- GitHub stars
- 454
- last updated
- Aug 21, 2026
Install
$ npx -y skills add sanjay3290/ai-skills --skill mssql --agent claude-codeInstalls into .claude/skills of the current project.
Files
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
Sponsors
Details
- Repository
- github.com/sanjay3290/ai-skills
- Categories
- Backend & APIs, AI & Agent Building, Databases
- License
- Apache-2.0
- First seen
- Jun 3, 2026