Skip to content
Development
Skill

/snowflake-governance

Audit data access, inspect masking and row access policies, review tags and classification, and analyze role hierarchies and grants in Snowflake.

From plugin
snowflake-ai-kit
4210 skills

Claude Code

$ npx -y skills add Snowflake-Labs/snowflake-ai-kit --skill snowflake-governance --agent claude-code

SKILL.md

snowflake-governance.SKILL.md
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.

Snowflake Governance

Audit access, inspect policies, and review security configuration.

When to use

  • User asks "who can access this table", "what policies are applied"
  • User wants to audit access history or login activity
  • User asks about tags, data classification, or PII
  • User wants to understand the role hierarchy or grant structure

Access control and grants

**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

Masking policies

-- 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.

Row access policies

-- 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.

Tags and classification

-- 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';

Access history (who accessed what)

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;

Login history

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;

Network policies

SHOW NETWORK POLICIES;
DESCRIBE NETWORK POLICY my_policy;

Important

  • ACCOUNT_USAGE views have up to 45-minute latency. They are not real-time.
  • Some views require ACCOUNTADMIN or specific grants on the SNOWFLAKE database.
  • Never attempt to bypass governance — if data is masked or filtered, explain that to the user.
Read more
@snowflake-labs
Ships withsnowflake-ai-kit

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.

Stars on GitHub

Momentum

stars in total
42
Star history of Snowflake-Labs/snowflake-ai-kit on GitHub, a chart by star-history.com

Other skills on snowflake-ai-kit.

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills10d309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc11d293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react1d252k
@facebook@facebookInstall Skill

Questions about snowflake-governance.

Which coding agents can use snowflake-governance?
snowflake-governance installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.