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/Kilo-Org/kilo-marketplaceWrote 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/kilo-org/kilo-marketplace/cortex-snowflake-routing)<a href="https://agentmods.dev/rules/kilo-org/kilo-marketplace/cortex-snowflake-routing"><img src="https://agentmods.dev/badge/rules/kilo-org/kilo-marketplace/cortex-snowflake-routing.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.00425 | $0.00425 |
| Opus 5 | $0.00212 | $0.00212 |
| Sonnet 5 | $0.00085 | $0.00085 |
| Haiku 4.5 | $0.00042 | $0.00042 |
Grade A, and why
cortex-snowflake-routing 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
Snowflake Query Routing
When the user asks about Snowflake, databases, warehouses, Cortex, or SQL queries, invoke the cortex-code skill with conversation context.
/cortex-code [user's question with relevant context]
Detection Keywords
Invoke /cortex-code when user mentions:
- Snowflake, warehouse, database, schema, table, view
- SQL, query, SELECT, data quality, data analysis
- Cortex Search, Cortex Analyst, Cortex AI
- Snowpark, dynamic tables, streams, tasks
- "how many databases", "show me", "query", "check data"
How to Invoke
- Detect Snowflake query
- Include context: If there were previous Snowflake-related exchanges in this conversation, include that context
- Invoke skill: Call
/cortex-codewith enriched query - Display results: Show output from Cortex Code agent
Examples
Standalone query: User: "How many databases do I have in Snowflake?" You: /cortex-code How many databases do I have in Snowflake?
Query with context: User: "Which databases have stock data?" → [answered: DB_STOCK, FINANCE__ECONOMICS] User: "Show me the schema for the main table" You: /cortex-code User previously identified databases with stock data: DB_STOCK, FINANCE__ECONOMICS. Show me the schema for the main table in DB_STOCK.
Important
- Do NOT answer Snowflake questions yourself
- ALWAYS invoke
/cortex-codeskill - Include prior conversation context when relevant
- The skill handles: Cortex routing, SQL execution, formatting
Non-Snowflake Queries
Handle normally without skill:
- General programming questions
- Local file operations
- Git operations
- Non-Snowflake databases (PostgreSQL, MySQL, etc.)
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 · 54 lines · 425 tokens per session scan A 4c40481681a0
cortex-snowflake-routing is a cursor rule published in the GitHub repository Kilo-Org/kilo-marketplace (173 stars, last pushed 17d ago), licensed Apache-2.0. It adds 425 tokens to every session, about $0.0021 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 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.