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 Eliyce/paqad-ai --skill query-pattern-analysisgit clone --depth 1 https://github.com/Eliyce/paqad-aiWrote 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/eliyce/paqad-ai/query-pattern-analysis)<a href="https://agentmods.dev/skills/eliyce/paqad-ai/query-pattern-analysis"><img src="https://agentmods.dev/badge/skills/eliyce/paqad-ai/query-pattern-analysis/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/eliyce/paqad-ai/query-pattern-analysis"><img src="https://agentmods.dev/badge/skills/eliyce/paqad-ai/query-pattern-analysis.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.00013 | $0.00559 |
| Opus 5 | $0.00006 | $0.00280 |
| Sonnet 5 | $0.00003 | $0.00112 |
| Haiku 4.5 | $0.00001 | $0.00056 |
Grade A, and why
query-pattern-analysis 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 8d 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.
What it actually says
What It Does
Analyzes changed query behavior for correctness, safety, and runtime cost so new data access patterns are reviewed against realistic usage rather than tiny fixture assumptions.
Use This When
Use this when a request changes filtering, pagination, aggregation, eager loading, write batching, or any query path that could regress with real data volume.
Inputs
- Read the changed query code and the module query/schema docs first.
- Read
references/query-risk-guide.mdbefore classifying issues. - Read any existing performance rules or query inventories relevant to the stack.
Procedure
- Run
scripts/scan-query-risks.sh <files...>to surface candidate risks (orm-find-in-loop, await-in-map, select-*, unbounded pagination, ORDER BY RANDOM, leading-wildcard LIKE, group-having). - For each hit, look up the remediation rule in
assets/risk-rules.txt. - Confirm whether the changed query relies on schema/index assumptions; treat missing index as a Migration Safety risk, not Performance.
- Bucket findings per
assets/output.template.md. - Validate with
scripts/lint-output.sh.
Output Contract
- Return sections named
Correctness Risks,Migration Safety Risks, andPerformance Risks. - Each finding must name the affected query path and the user or operational impact.
- If one bucket has no issues, write it explicitly as
none.
Escalate / Stop Conditions
- Ask when expected row counts, pagination strategy, or consistency rules are unknown and would change the analysis.
- Warn when a query relies on undefined ordering, broad scans, or hidden fan-out behavior.
- Do not treat micro-optimizations as findings if the changed behavior is not on a meaningful path.
Resources
references/query-risk-guide.mdscripts/scan-query-risks.shscripts/lint-output.shassets/output.template.mdassets/risk-rules.txtruntime/capabilities/coding/stacks/laravel/rules/performance/guide.mdagents/openai.yaml
What ships with it
6 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.
- 8d ago First seen · 68 lines · 13 tokens per session scan A 4eb2d85e3040
query-pattern-analysis is a skill published in the GitHub repository Eliyce/paqad-ai (8 stars, last pushed today), licensed MIT. It adds 13 tokens to every session and 559 once invoked, about $0.0001 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-09-03.
Other skills, from other repositories
session-investigator
Investigate fast-agent session and history files to diagnose issues. Use when a session ended unexpectedly, when debugging tool loops, when correlating sub-agent traces with main sessions, or when analyzing conversation flow and timing. Covers session.json metadata, history JSON format, message structure, tool…
auto-fix
A bug-fixing workflow that first reproduces a problem with a test, then applies the smallest code change needed. It also checks the related code path and runs tests afterward.
doris-debug-cloud
Use for Doris storage-compute separation (cloud mode) issues: meta-service latency, cache miss storms, object store throughput, and shared-nothing config conflicts in compute groups.
doris-debug-data-lake
Use for Doris external catalog issues: Hive/Iceberg/Paimon/Hudi query failures, metadata refresh, filesystem S3/HDFS connectivity, external MV rewrite misses.
doris-debug-deployment
Use for Doris FE/BE startup failures, port conflicts, prioritynetworks misrouting, metadir corruption, and ADD/DROP BACKEND issues.
doris-debug-node
Use for Doris FE/BE OOM, crash, or false Alive. BE: MemTrackerLimiter lines in be.WARNING; FE: JVM heap / jstack. Distinguish heartbeat Alive from query/brpc serving health.