cortex-router
Auto-routing skill loaded by the prompt filter hook. Routes Snowflake-related operations to Cortex Code CLI. Not for direct…
Audit data access, inspect masking and row access policies, review tags and classification, and analyze role hierarchies and grants in Snowflake.
Claude Code
$ npx -y skills add Snowflake-Labs/snowflake-ai-kit --skill snowflake-governance --agent claude-code
Codex
$ npx skills add Snowflake-Labs/snowflake-ai-kit --skill snowflake-governance -a codex -y
Cursor
$ npx skills add Snowflake-Labs/snowflake-ai-kit --skill snowflake-governance -a cursor -y
Gemini CLI
$ npx skills add Snowflake-Labs/snowflake-ai-kit --skill snowflake-governance -a gemini-cli -y
GitHub Copilot
$ npx skills add Snowflake-Labs/snowflake-ai-kit --skill snowflake-governance -a github-copilot -y
OpenCode
$ npx skills add Snowflake-Labs/snowflake-ai-kit --skill snowflake-governance -a opencode -y
Windsurf
$ npx skills add Snowflake-Labs/snowflake-ai-kit --skill snowflake-governance -a windsurf -y
name: snowflake-governance description: >- Audit data access, inspect masking and row access policies, review tags and classification, and analyze role hierarchies and grants in Snowflake.
Audit access, inspect policies, and review security configuration.
**Grants on a specific object:**
SHOW GRANTS ON TABLE my_db.my_schema.customers;
**What a role can access:**
SHOW GRANTS TO ROLE analyst_role;
**Who has a role:**
SHOW GRANTS OF ROLE analyst_role;
**Role hierarchy (what roles does a role inherit):**
SHOW GRANTS TO ROLE analyst_role; -- Look for USAGE grants on other roles
-- List masking policies SHOW MASKING POLICIES IN ACCOUNT; -- See where a policy is applied SELECT * FROM TABLE(INFORMATION_SCHEMA.POLICY_REFERENCES( POLICY_NAME => 'my_db.my_schema.mask_pii' ));
If data appears as `***` or `NULL` unexpectedly, a masking policy is likely applied. Tell the user which policy is active and what role would see unmasked data.
-- List row access policies SHOW ROW ACCESS POLICIES IN ACCOUNT; -- See where applied SELECT * FROM TABLE(INFORMATION_SCHEMA.POLICY_REFERENCES( POLICY_NAME => 'my_db.my_schema.row_filter' ));
Row access policies filter rows based on the querying role. Different users may see different result sets from the same table.
-- List tags SHOW TAGS IN ACCOUNT; -- See what's tagged SELECT * FROM TABLE(INFORMATION_SCHEMA.TAG_REFERENCES( 'my_db.my_schema.customers', 'TABLE' )); -- Find all objects with a specific tag SELECT * FROM SNOWFLAKE.ACCOUNT_USAGE.TAG_REFERENCES WHERE TAG_NAME = 'PII' AND TAG_VALUE = 'true';
SELECT user_name, query_start_time, direct_objects_accessed FROM SNOWFLAKE.ACCOUNT_USAGE.ACCESS_HISTORY WHERE query_start_time >= DATEADD(day, -7, CURRENT_TIMESTAMP()) ORDER BY query_start_time DESC LIMIT 50;
SELECT user_name, client_ip, first_authentication_factor, is_success, error_message FROM SNOWFLAKE.ACCOUNT_USAGE.LOGIN_HISTORY WHERE event_timestamp >= DATEADD(day, -7, CURRENT_TIMESTAMP()) ORDER BY event_timestamp DESC LIMIT 50;
SHOW NETWORK POLICIES; DESCRIBE NETWORK POLICY my_policy;
Connect your AI coding agent to Snowflake. Plugins for Claude Code and OpenAI Codex that automatically detect Snowflake prompts and route them to Cortex Code — where 55+ built-in skills handle SQL, data governance, dynamic tables, ML, and more.
Auto-routing skill loaded by the prompt filter hook. Routes Snowflake-related operations to Cortex Code CLI. Not for direct…
ONLY load this skill when the user explicitly types $cortex-run or /cortex-run. NEVER load this skill from auto-routing hooks or…
Install Snowflake CLI and Cortex Code CLI. Use when cortex is not installed, when the user asks to set up Cortex Code, or when…
Use Cortex AI services — Cortex Analyst for natural-language-to-SQL through semantic views, Cortex Search for semantic search,…
Manage Database Change Management (DCM) projects in Snowflake. DCM is infrastructure-as-code for Snowflake objects — databases,…
Discover databases, schemas, tables, views, and columns in Snowflake. Use when the user wants to understand what data is…
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
Ask which skill or flow fits your situation. A router over the skills in this repo.