Borrowing it
Nothing to install: this file belongs to abdullah1854/MCPGateway. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/abdullah1854/MCPGateway/main/.agents/skills/sql-analyzer/SKILL.mdgit clone --depth 1 https://github.com/abdullah1854/MCPGatewayWrote 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/abdullah1854/mcpgateway/sql-analyzer)<a href="https://agentmods.dev/skills/abdullah1854/mcpgateway/sql-analyzer"><img src="https://agentmods.dev/badge/skills/abdullah1854/mcpgateway/sql-analyzer/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.
<a href="https://agentmods.dev/skills/abdullah1854/mcpgateway/sql-analyzer"><img src="https://agentmods.dev/badge/skills/abdullah1854/mcpgateway/sql-analyzer.svg" alt="Reviewed on agentmods" width="80" 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.00000 | $0.00729 |
| Opus 5.5 | $0.00000 | $0.00292 |
| Sonnet 5.5 | $0.00000 | $0.00146 |
| Haiku 4.5 | $0.00000 | $0.00073 |
Grade A, and why
sql-analyzer 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 1mo 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 — 101 lines — stays where its author put it; the contents beside it link to each section on GitHub.
sql-analyzer
Analyzes SQL queries for anti-patterns, performance issues, and suggests optimizations.
Metadata
- Version: 1.0.0
- Category: database
- Source: workspace
Tags
sql, database, performance, optimization
MCP Dependencies
None specified
Inputs
query(string) (required): SQL query to analyzedialect(string) (optional): SQL dialect: mssql, postgres, mysql
Workflow
No workflow defined
Anti-Hallucination Rules
None specified
Verification Checklist
None specified
Usage
// Execute via MCP Gateway:
gateway_execute_skill({ name: "sql-analyzer", inputs: { ... } })
// Or via REST API:
// POST /api/code/skills/sql-analyzer/execute
// Body: { "inputs": { ... } }
Code
const { query, dialect = 'mssql' } = inputs;
const upperQuery = query.toUpperCase();
const issues = [];
// Check for SELECT *
if (/SELECT\s+\*/.test(upperQuery)) {
issues.push({ severity: 'medium', issue: 'SELECT * retrieves all columns', fix: 'List only needed columns' });
}
// Check for missing WHERE on UPDATE/DELETE
if (/(UPDATE|DELETE)\s+\w+/.test(upperQuery) && !/WHERE/.test(upperQuery)) {
issues.push({ severity: 'critical', issue: 'UPDATE/DELETE without WHERE', fix: 'Add WHERE clause' });
}
// Check for leading wildcard LIKE
if (/LIKE\s+['"]%/.test(upperQuery)) {
issues.push({ severity: 'high', issue: 'LIKE with leading wildcard prevents index usage', fix: 'Use full-text search or remove leading wildcard' });
}
// Check for ORDER BY ordinal
if (/ORDER\s+BY\s+\d+/.test(upperQuery)) {
issues.push({ severity: 'low', issue: 'ORDER BY with ordinal position', fix: 'Use column names' });
}
// Complexity score
let score = 1;
const joinCount = (upperQuery.match(/\bJOIN\b/g) || []).length;
score += joinCount * 2;
const subqueryCount = (upperQuery.match(/SELECT/g) || []).length - 1;
score += subqueryCount * 3;
let result = `# SQL Analysis\n\n`;
result += `**Complexity**: ${score < 5 ? 'Low' : score < 10 ? 'Medium' : 'High'} (${score}/10)\n\n`;
if (issues.length === 0) {
result += '✅ No significant issues found\n';
} else {
result += `## Issues (${issues.length})\n\n`;
for (const i of issues) {
const icon = i.severity === 'critical' ? '🔴' : i.severity === 'high' ? '🟡' : '🟢';
result += `${icon} **${i.severity.toUpperCase()}**: ${i.issue}\n Fix: ${i.fix}\n\n`;
}
}
console.log(result);
What ships with it
3 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.
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.
- 1mo ago First seen · 101 lines · 0 tokens per session scan A 12b59b87198a
sql-analyzer is a skill published in the GitHub repository abdullah1854/MCPGateway (17 stars, last pushed 3mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 729 tokens. 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-30.
Other skills, from other repositories
review-prs
Review a GitHub pull request in the googleapis/mcp-toolbox repo against the team's reviewer checklist: PR title/description conventions, linked issue, logic errors and unhandled edge cases, breaking changes, test coverage, docs updates, security (input handling), and new dependencies. Use whenever a maintainer asks…
github-commenting
How to post clean, rich, deduplicated GitHub PR review comments — suggestion blocks, multi-line anchors, markers, formatting rules. Load before posting or fixing any PR comment.
table-api-reads
What a Table API read through this MCP actually returns — the 200-character truncation in snowquerytable, the three different displayvalue defaults, reference fields as {link, value} objects, why worknotes come back empty, and which reported totals are real counts and which are guesses.
cmdb-patterns
Create ServiceNow CIs and cmdbrelci relationships, walk upstream/downstream impact, detect orphan/stale CIs, and align discovered CIs with the proper sysclassname hierarchy.
transform-maps
Build ServiceNow transform maps — sysdatasource configurations (CSV/JDBC/REST), systransformmap field/reference/script entries, coalesce keys for update-vs-insert, and onBefore/onAfter/onComplete transform scripts.
data-policies
Manage ServiceNow dictionary (sysdictionary), table/field creation, choice lists, dictionary overrides, and sysdatapolicy2 rules that enforce mandatory/read-only/visible field behavior on the data layer.