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.
git clone --depth 1 https://github.com/sfc-gh-cconner/support-rules-mcpWrote 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/rules/sfc-gh-cconner/support-rules-mcp/05-snowhouse-querying)<a href="https://agentmods.dev/rules/sfc-gh-cconner/support-rules-mcp/05-snowhouse-querying"><img src="https://agentmods.dev/badge/rules/sfc-gh-cconner/support-rules-mcp/05-snowhouse-querying/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/rules/sfc-gh-cconner/support-rules-mcp/05-snowhouse-querying"><img src="https://agentmods.dev/badge/rules/sfc-gh-cconner/support-rules-mcp/05-snowhouse-querying.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.03293 | $0.03293 |
| Opus 5 | $0.01647 | $0.01647 |
| Sonnet 5 | $0.00659 | $0.00659 |
| Haiku 4.5 | $0.00329 | $0.00329 |
Grade A, and why
05-snowhouse-querying 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 9d 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 — 505 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Snowhouse Querying Patterns & Best Practices
PURPOSE: Master patterns for querying Snowhouse ETL views and log tables efficiently and accurately.
🎯 Core Principles
- ALWAYS filter by
account_id - ALWAYS start with
job_etl_vfor timestamps - ALWAYS use time bounds for log queries
- NEVER query
ACCOUNT_USAGEviews in Snowhouse
🗺️ Snowhouse Structure
snowhouse_import.<deployment>.<table>
Deployments:
- prod1: Production deployment 1
- prod2: Production deployment 2
- prod3: Production deployment 3
- aws_us_west_2, azure_westus2, gcp_us_central1, etc.
📊 Core Query Patterns
Pattern 1: Find Recent Queries
-- ALWAYS start here for timestamps and context
SELECT
query_id,
query_text,
user_name,
warehouse_name,
start_time,
end_time,
execution_time,
error_code,
error_message
FROM snowhouse_import.<deployment>.job_etl_v
WHERE account_id = <account_id>
AND start_time >= CURRENT_TIMESTAMP - INTERVAL '24 hours'
AND error_code IS NOT NULL -- Only failed queries
ORDER BY start_time DESC
LIMIT 100;
Pattern 2: Query with Session Context
-- Join jobs with sessions for user context
SELECT
j.query_id,
j.query_text,
j.start_time,
j.error_message,
s.session_id,
s.user_name,
s.client_type,
s.client_version
FROM snowhouse_import.<deployment>.job_etl_v j
LEFT JOIN snowhouse_import.<deployment>.session_etl_v s
ON j.session_id = s.session_id
AND j.account_id = s.account_id
WHERE j.account_id = <account_id>
AND j.start_time >= '<start_time>'
AND j.end_time <= '<end_time>'
ORDER BY j.start_time DESC;
Pattern 3: Logs with Time Bounds
-- CRITICAL: Always get timestamps from job_etl_v first!
WITH query_context AS (
SELECT
query_id,
request_id,
start_time,
end_time
FROM snowhouse_import.<deployment>.job_etl_v
WHERE account_id = <account_id>
AND query_id = '<query_id>'
)
SELECT l.*
FROM snowhouse_import.<deployment>.gs_logs_v l
JOIN query_context q ON l.request_id = q.request_id
WHERE l.account_id = <account_id>
AND l.timestamp BETWEEN q.start_time - INTERVAL '5 minutes'
AND q.end_time + INTERVAL '5 minutes'
ORDER BY l.timestamp;
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.
- 9d ago First seen · 505 lines · 3,293 tokens per session scan A d304fceb3f99
05-snowhouse-querying is a cursor rule published in the GitHub repository sfc-gh-cconner/support-rules-mcp (0 stars, last pushed 11mo ago), licensed Apache-2.0. It adds 3,293 tokens to every session, about $0.0165 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 cursor rules, from other repositories
prefer-assertions-over-defensive-checks
Prefer assertions over defensive checks when data is guaranteed to be valid.
as-contract-cast-smell
// ❌ WRONG — bypasses the family ContractSerializer seam const contract = JSON.parse(raw) as Contract; const contract = JSON.parse(raw) as Contract .
no-backward-compatibility
Do not add backward-compatibility shims or migration scaffolding.
postgresql
This guide defines the definitive best practices for writing clean, performant, and maintainable PostgreSQL SQL, focusing on modern conventions and avoiding common pitfalls.
query-optimization
A database performance rule that requires measuring PostgreSQL queries with EXPLAIN ANALYZE under the same user permissions and row-level security (RLS) conditions used in production.
ehs-ims-conventions
EHS IMS app — RBAC, data layer, tRPC, migrations, AI boundaries.