pii-audit

Classify PII columns and audit query exposure with risk reports.

792|138|Updated Feb 27, 2026
One-click install
npx skills add https://github.com/AltimateAI/altimate-code --skill pii-audit
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pii-audit
Source: https://github.com/AltimateAI/altimate-code/tree/main/.opencode/skills/pii-audit
Command: npx skills add https://github.com/AltimateAI/altimate-code --skill pii-audit

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Classify schema columns for PII (SSN, email, phone, name, address, credit card) and check whether queries expose them. Use for GDPR/CCPA/HIPAA compliance audits.

Core Features & Use Cases

  • Classify PII from schema context using altimate_core_classify_pii(schema_context: <schema_object>) or by indexing a warehouse with schema_index(warehouse: <name>), then schema_inspect(warehouse: <name>, database: <db>, schema: <schema>, table: <table>), followed by schema_detect_pii(warehouse: <name>).
  • Check PII exposure for individual queries or dbt models with altimate_core_query_pii(sql: <sql>, schema_context: <schema_object>), returning which PII columns are accessed, the risk level, and whether data is exposed in the output.
  • Audit dbt models in batch (glob models/**/*.sql) and generate a comprehensive PII audit report.
  • Present an audit report listing HIGH/MEDIUM risk columns and recommended mitigations.

Quick Start

Run /pii-audit to scan the full project schema for PII.

Frequently Asked Questions about pii-audit

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I audit dbt models for PII exposure in my data warehouse?

To check if a SQL query exposes PII, use the query PII inspection function with your SQL string and schema context object. It returns the specific PII columns accessed, the associated risk level, and whether sensitive data is exposed in the query output.

How do I classify schema columns for GDPR and CCPA compliance?

To classify PII across a warehouse, first index the warehouse, then inspect specific databases, schemas, and tables, and finally run PII detection. This process identifies sensitive columns and generates a risk assessment report with recommended mitigations.

Can I detect PII in a data warehouse schema without writing SQL queries?

Yes, you can detect PII without writing SQL by indexing your warehouse and inspecting the target database, schema, and table structures. The system analyzes the schema context directly to identify and classify sensitive PII columns automatically.

What is the best way to generate a PII risk assessment report for dbt projects?

The best way to generate a PII risk assessment report for dbt projects is to run a batch audit using glob patterns on your SQL models. This evaluates every model for PII access and outputs a final report listing HIGH and MEDIUM risk columns with mitigation recommendations.

Does PII schema auditing work with existing warehouse metadata or do I need to define schemas manually?

PII schema auditing works directly with existing warehouse metadata. You simply index your warehouse by name and inspect the desired databases and schemas, eliminating the need to manually define schema objects for PII classification and risk assessment.