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 skills add TencentCloudCommunity/mcp-server --skill tencent-pg-slowquery-diagnosisgit clone --depth 1 https://github.com/TencentCloudCommunity/mcp-serverWrote 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/tencentcloudcommunity/mcp-server/tencent-pg-slowquery-diagnosis)<a href="https://agentmods.dev/skills/tencentcloudcommunity/mcp-server/tencent-pg-slowquery-diagnosis"><img src="https://agentmods.dev/badge/skills/tencentcloudcommunity/mcp-server/tencent-pg-slowquery-diagnosis/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/tencentcloudcommunity/mcp-server/tencent-pg-slowquery-diagnosis"><img src="https://agentmods.dev/badge/skills/tencentcloudcommunity/mcp-server/tencent-pg-slowquery-diagnosis.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.00075 | $0.00988 |
| Opus 5 | $0.00037 | $0.00494 |
| Sonnet 5 | $0.00015 | $0.00198 |
| Haiku 4.5 | $0.00007 | $0.00099 |
Grade A, and why
tencent-pg-slowquery-diagnosis 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 10d 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 — 43 lines — stays where its author put it; the contents beside it link to each section on GitHub.
tencent-pg-slowquery-diagnosis
When to use
- Need to analyze slow SQL, latency spikes, or performance degradation.
- Need a first-pass diagnosis before proposing or executing tuning and change actions.
- Need a reusable workflow that calls Tencent Cloud OpenAPI directly instead of relying on a deployed MCP server.
Steps
- Confirm the scope first: region, target instance, optional database or SQL fingerprint, and preferred time window. If the region, instance ID, or both are missing from the user's request, immediately reply with a direct message (no interactive prompt or choice menu) that includes: (a) the console link https://console.cloud.tencent.com/postgres where the user can find their instance ID and region, and (b) a concrete example reply format like "ap-guangzhou postgres-abc12345". Do not proceed with any API call until the target scope is confirmed.
- Normalize region input before any OpenAPI call by following
@references/common/region_normalization.md. Accept standard region codes such asap-guangzhouand common aliases such as广州,上海,成都,北京, then convert them to the canonical region code likeap-guangzhou,ap-shanghai,ap-chengdu,ap-beijing. If the input cannot be normalized safely, stop and use theinvalid-regiontemplate in@references/common/error_handling.md, including the official region links. - Check runtime prerequisites using a foolproof order. Prefer
TENCENTCLOUD_SECRET_ID,TENCENTCLOUD_SECRET_KEY,TENCENTCLOUD_REGION, and optionalTENCENTCLOUD_SESSION_TOKEN; also accept compatible names such asMCP_REQUEST_SECRET_ID,MCP_REQUEST_SECRET_KEY,MCP_REQUEST_SESSION_TOKEN,MCP_SECRET_ID, andMCP_SECRET_KEY. If required values are missing, stop and use themissing-credentialstemplate in@references/common/error_handling.md, including one copyable example plus the official API key and region links. - Call Tencent Cloud PostgreSQL OpenAPI directly. Any aligned Action listed in @references/api_reference.md may be used. Start with read-only evidence collection first. For audit, business, fee-impacting, or critical write actions, explain impact clearly and require explicit confirmation before execution.
- Prefer the official Tencent Cloud SDK. If the SDK is unavailable, do not block on that alone; generate properly TC3-signed HTTPS requests locally instead. Read credentials only from environment variables or other secure runtime context; never hardcode or persist them in code, skill files, or query parameters. If the user still wants the SDK path, follow the
missing-sdktemplate in@references/common/error_handling.md, offer the install command, and ask whether to execute it. - Gather evidence in this order:
- current instance state, lifecycle, and ongoing task context
- slow-query and query-analysis evidence
- error-log evidence when errors may explain the slowdown
- parameter, backup, readonly-topology, and other aligned context only when they help explain the symptom
- Use @references/api_reference.md as the diagnosis frame and aligned action catalog.
- Rank likely causes rather than forcing a single root cause. If the user asks for remediation and the evidence supports it, only then move to the smallest aligned action that addresses the issue, with explicit confirmation when required.
- Keep optimization guidance conservative. Recommend or execute changes only when the evidence points in that direction and the action is within the aligned 48-action boundary.
What ships with it
2 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.
- 10d ago First seen · 43 lines · 75 tokens per session scan A c361838a1a58
tencent-pg-slowquery-diagnosis is a skill published in the GitHub repository TencentCloudCommunity/mcp-server (29 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 75 tokens to every session and 988 once invoked, about $0.0004 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-30.
Other skills, from other repositories
pg-bloat-analysis
Detects and remediates table and index bloat in PostgreSQL using pgstattuple analysis. Identifies fragmentation, dead tuples, and wasted space with prioritized maintenance actions including VACUUM, REINDEX, and pgrepack recommendations.
pg-index-optimization
Performs comprehensive PostgreSQL index optimization including unused index cleanup, duplicate detection, missing index recommendations, and hypothetical index testing with HypoPG. Provides actionable CREATE/DROP INDEX statements with estimated impact.
pg-slow-query-diagnosis
Diagnoses slow PostgreSQL queries by analyzing pgstatstatements, execution plans, index opportunities, and table statistics. Guides the agent through a systematic investigation workflow using pgtuner-mcp tools to produce actionable optimization recommendations.
amazon aurora dsql
Deprecated compatibility redirect for Aurora DSQL guidance. Use when a request concerns DSQL, Aurora DSQL, distributed SQL, DSQL schemas, migrations, queries, authentication, performance, or application development.
sql-optimizer
Analyzes SQL queries for missing indexes, N+1 patterns, suboptimal joins, and full table scans. Interprets EXPLAIN, detects anti-patterns, rewrites queries. Triggers on: "optimize this query", "slow query", "add indexes", "explain plan", "N+1 query", "why is this query slow".
ecto-constraint-debug
Debug Ecto constraint violations - trace triggers, check migrations, find duplicate data. Use when seeing uniqueconstraint, foreignkeyconstraint, or checkconstraint errors.