Skip to content
Skill

Sqlpysim

Runs SQL queries and multi-threaded workloads from Python using mssql-python

Sqlpysim is an open-source agent skill for databases. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

Scripts
None
Platforms
Claude Code, Codex, Cursor
GitHub stars
50
Last commit
License
MIT
Listing updated

Similar skills

About Sqlpysim

sqlpysim is a Python port of the sqlsim load and query tool, built on Microsoft's native mssql-python driver. It gives an agent a way to run single queries, SQL script files and multi-threaded workloads against SQL Server and Azure SQL from a Python environment, with options for quiet output, JSON results written to a file, and mixed workload groups loaded from a sqlsim-format workload file.

The skill tells the agent how to resolve the entry point, either a sqlpysim.py copy in the workspace or an installed sqlpysim command, and to install the release requirements before running anything. It includes canonical command patterns for Windows authentication, Azure access tokens passed through stdin, live progress streaming as newline-delimited JSON, and periodic query-statistic snapshots written to a file during a run.

The skill sets rules for the agent: keep secrets out of process arguments, do not set the reserved application name, treat sqlpysim JSON as separate from sqlsim JSON, and start load tests with small thread counts while watching client and server resources. Running it requires Python, the sqlpysim release and access to a SQL Server or Azure SQL instance.

When your agent uses it

Public Preview Python-based port of sqlsim built on Microsoft's native `mssql-python` driver. USE FOR — running SQL queries, scripts, and multi-threaded workloads from Python environments; mixed workload files (`-workload`); live progress streaming (`-stream-json`); periodic query-statistic snapshots (`-querystats-interval`); comparing driver behavior between native ODBC (sqlsim) and `mssql-python`; producing sqlpysim JSON for automation. DO NOT USE FOR — sqlsim-only replay modes; setting an application name (`-app`, which the driver reserves); exact cross-tool JSON compatibility; or performance comparisons that require the lowest possible client overhead (use sqlsim instead).

From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.

What it can access

From a static check of its 1 file (6 KB) on GitHub on 3 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.

Check another skill before you install it.

Install

Copy the skill folder to ~/.claude/skills/sqlpysim to use it in all your projects:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/microsoft/sqlsimtools.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/sqlpysim &&
cp -R "$tmp/.github/skills/sqlpysim" ~/.claude/skills/sqlpysim &&
rm -rf "$tmp"

For one project only, put the folder in .claude/skills/sqlpysim inside it instead.

Claude Code docs on skills

Copy the skill folder to ~/.agents/skills/sqlpysim to use it in every repository:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/microsoft/sqlsimtools.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/sqlpysim &&
cp -R "$tmp/.github/skills/sqlpysim" ~/.agents/skills/sqlpysim &&
rm -rf "$tmp"

For one repository only, put the folder in .agents/skills/sqlpysim inside it instead.

Codex docs on skills

Copy the skill folder to ~/.cursor/skills/sqlpysim to use it in every project:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/microsoft/sqlsimtools.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/sqlpysim &&
cp -R "$tmp/.github/skills/sqlpysim" ~/.cursor/skills/sqlpysim &&
rm -rf "$tmp"

For one project only, put the folder in .cursor/skills/sqlpysim inside it instead.

Cursor docs on skills

Run in a terminal (add --scope workspace to install it for the current workspace only):

gemini skills install https://github.com/microsoft/sqlsimtools.git --path .github/skills/sqlpysim

Or copy the folder to ~/.gemini/skills/sqlpysim yourself.

Gemini CLI docs on skills

For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/sqlpysim:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/microsoft/sqlsimtools.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/sqlpysim &&
cp -R "$tmp/.github/skills/sqlpysim" ~/.copilot/skills/sqlpysim &&
rm -rf "$tmp"

For one project only, put the folder in .github/skills/sqlpysim inside it instead.

VS Code docs on skills

Get the folder:

git clone --depth 1 https://github.com/microsoft/sqlsimtools.git

Then copy sqlsimtools/.github/skills/sqlpysim into your agent's skills folder as sqlpysim. Agents that support SKILL.md read one folder per skill.

The SKILL.md format

What it does

Single query execution
Runs an inline query or a SQL script file against a SQL Server or Azure SQL database.
Multi-threaded workloads
Runs queries across several threads with set thread counts and repetition counts.
Mixed workload groups
Loads grouped workloads from a sqlsim-format workload file.
Live progress streaming
Emits one JSON event per line during a run for a supervising process to read.
Query statistic snapshots
Writes periodic server-side query statistics to a file while a run is in progress.
Token and secure password input
Passes Azure access tokens or passwords through stdin so secrets stay out of process arguments.

Good for

  • Run a SQL script against a local SQL Server with Windows authentication
  • Load test an Azure SQL database with several threads and collect JSON results
  • Replay a mixed workload file from a sqlsim-format definition
  • Stream live progress from a long benchmark run to a monitoring script
  • Compare driver behavior between native ODBC sqlsim and mssql-python

Sqlpysim FAQ

What does the skill need before Sqlpysim runs?

A sqlpysim release installed in the workspace with its Python requirements, or an installed sqlpysim command on PATH. The skill itself supplies agent guidance only, not the runtime.

Can Sqlpysim set an application name?

No. The -app option is rejected because mssql-python reserves the application name and always reports MSSQL-Python. The skill advises using sqlsim when the application name matters.

How does live progress work?

With -stream-json, sqlpysim prints one JSON event per line on stdout. Events are cumulative, so the current rate has to be computed from differences between events.

Does Sqlpysim write query statistics to a file during a run?

Yes, with -querystats-interval it writes periodic snapshots to a file, defaulting to querystats-live.json, and the run continues even if a write fails.

How do I install Sqlpysim in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/sqlpysim to use it in all your projects, or to .claude/skills/sqlpysim in one project.

Does Sqlpysim run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

Which AI agents can use Sqlpysim?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

What are the best alternatives to Sqlpysim?

The closest alternatives to Sqlpysim are Sqlsim, SQL optimization, Azure cosmos db py, SQL server table reconciliation and Azure data tables py.

Where this comes from

  • Description: from the skill's own SKILL.md.

More from microsoft/sqlsimtools

  1. Lets an agent run SQL queries and multi-threaded load tests against SQL Server and Azure

    • Open source
    • 50 GitHub stars
    • Databases
  2. Install, run, monitor and compare SQL Server workloads in the sqlsim Studio browser app

    • Open source
    • 50 GitHub stars
    • Developer tools
  3. Guides a contributor through tiered Sqlsim Studio load tests against AdventureWorksLT

    • Open source
    • 50 GitHub stars
    • Developer tools
  4. Guides a contributor through the sqlsim Studio manual acceptance checklist, one test at

    • Open source
    • 50 GitHub stars
    • Developer tools
  5. Lets an agent build and test the sqlsimtools tools from source on Windows or Linux

    • Open source
    • 50 GitHub stars
    • Developer tools
  6. Reports sqlsimtools download counts, website status, and repository traffic

    • Open source
    • 50 GitHub stars
    • Developer tools