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.
npx agentmods add skills/sdebruyn/fabric-dw-mcp-cli/query-optimizernpx skills add sdebruyn/fabric-dw-mcp-cli --skill query-optimizergit clone --depth 1 https://github.com/sdebruyn/fabric-dw-mcp-cliWrote 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.
[](https://agentmods.dev/skills/sdebruyn/fabric-dw-mcp-cli/query-optimizer)<a href="https://agentmods.dev/skills/sdebruyn/fabric-dw-mcp-cli/query-optimizer"><img src="https://agentmods.dev/badge/skills/sdebruyn/fabric-dw-mcp-cli/query-optimizer.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00103 | $0.01590 |
| Opus 5 | $0.00051 | $0.00795 |
| Sonnet 5 | $0.00021 | $0.00318 |
| Haiku 4.5 | $0.00010 | $0.00159 |
Grade A, and why
query-optimizer scanned grade A with 0 findings 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 6d ago.
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.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 128 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Query Performance Analysis & Optimization
Analyzes and optimizes a query on a Fabric Data Warehouse using the fabric-dw MCP tools.
Inputs
Gather these from the user (via $ARGUMENTS or natural language) before starting:
- workspace: workspace name or GUID
- warehouse: warehouse name or GUID (must be a Fabric Data Warehouse, not a SQL Analytics Endpoint, for clustering steps)
- query: the SQL query text to analyze (or a historical query ID / text snippet to look up)
If the warehouse is a SQL Analytics Endpoint, skip steps 8, 9, 11 (clustering), and 13 (set_cluster_columns).
Workflow
Step 1 - Capture the estimated execution plan
Call get_query_plan with the query text. This returns a SHOWPLAN_XML document without executing the query.
To visualize the plan, use the CLI (pass the warehouse name as the first argument and the query via -q):
fdw sql plan <warehouse> -q "<query>" --format html -o plan.html # writes self-contained HTML; open plan.html in any browser
fdw sql plan <workspace>/<warehouse> -q "<query>" --format svg -o plan.svg # renders SVG via system dot binary (requires Graphviz)
Note: --format html requires -o/--output; it writes a file and does not open the browser automatically.
Step 2 - Parse the plan XML
Analyze the returned SHOWPLAN_XML for:
- Costly operators: Hash Join, Sort, nested-loop Scan on large row estimates, Spool
- Residual predicates: predicates that cannot be applied early (non-SARGable)
- Missing-index hints embedded in the plan
- Data skew warnings or large estimated vs. actual row count mismatches (if available)
- Type mismatch conversions: e.g.
CONVERT_IMPLICITon a column used in a predicate
Step 3 - Pull recent history
Use list_request_history (filter by SQL text substring if supported) and list_long_running_queries to see whether this query pattern has a history of slow executions. Note elapsed time and status.
Step 4 - List statistics on referenced tables
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.
- 6d ago First seen · 128 lines · 103 tokens per session scan A c85ec084d5ef
query-optimizer is a skill published in the GitHub repository sdebruyn/fabric-dw-mcp-cli (10 stars, last pushed 2d ago), licensed MIT. It adds 103 tokens to every session and 1,590 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
erd-studio
Schema rules for ERD Studio data model files — the .erd-studio/ directory uses a two-file system (YAML model definitions + JSON domain diagrams) with strict format rules you must read before editing. Use this skill whenever the task touches files in .erd-studio/ (domain JSON, logical-models YAML, or .sync-plan.json)…
redteam-sqli-detail-pack
Domain routing and boundary guidance for authorized SQL injection testing, including union-based, blind, error-based, stacked query, and second-order SQL injection variants. Use when a task belongs to the SQL injection domain and needs scope, evidence, pivot, or exit criteria.
api-canvas
DataCanvas primitive reference — a Tier 3 SQL/analytical workspace for tabular MCP servers, backed by DuckDB. Use when registering tables from upstream APIs, running ad-hoc SQL across them, and exporting results. Covers the acquire → register → query → export flow, per-table TTL, the token-sharing pattern for…
data-governance
Use this skill when designing or reviewing data governance: schema ownership, PII handling, retention, lineage, access policy, and migration safety for WrongStack services and stores. Triggers: user says "data governance", "PII", "schema ownership", "retention policy", "data lineage", "migration safety".
persistence-setup
Generates SwiftData or CoreData persistence layer with optional iCloud sync. Use when user wants to add local storage, data persistence, or cloud sync.
multitenant
Architecture multitenant avec approche tiered (Shared/Dedicated Schema/DB), RBAC/ABAC, field-level encryption. Use when working with multitenant applications, tenant isolation, data segregation.