技能创建器
skill-creator
创建、改进和评估自定义技能,把专业流程转化为可重复使用的 AI 能力。
snowflake-data-quality-sentinel【数据与研究】Assess trusted Snowflake data metric function coverage and expectation evidence without reading customer rows. Use when evaluations, definitions, schedules, notifications, anomaly state, or monitoring coverage may be incomplete or unhealthy. Trigger with "Snowflake data quality", "DMF expectation", "definition drift", "missing evaluation", or "notifi…
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Produce separate configuration, history-observation, and history-completeness verdicts from an owner-approved requirement denominator and trusted schema-2 collector receipts. Missing or untrusted evidence never becomes a pass, and this history surface never supports an unqualified present-tense quality pass.
Read the input contract before assembly and consult the source notes when interpreting provider semantics.
Use Python 3.10+, an owner-approved policy, and Snowflake CLI with an existing least-privilege profile. Never accept credentials or request customer rows, failed-row payloads, metric values, or SQL text.
Collect one bounded history receipt. For every distinct governed object, collect
one selector-bound live association receipt and one selector-bound live
expectation receipt. Also collect one notification receipt for every distinct
governed object whose notification_required is true:
# Example fixed UTC window; replace with the audited interval.
python3 "${CLAUDE_SKILL_DIR}/scripts/collect_snowflake_evidence.py" \
--surface data-quality --connection readonly-observer \
--window-start 2026-09-01T00:00:00Z --window-end 2026-09-02T00:00:00Z \
--output ./dq-history.json
python3 "${CLAUDE_SKILL_DIR}/scripts/collect_snowflake_evidence.py" \
--surface data-quality-associations-current --connection readonly-observer \
--data-quality-object GOVERNED_DB.GOVERNED_SCHEMA.GOVERNED_TABLE \
--data-quality-domain TABLE \
--output ./dq-associations.json
python3 "${CLAUDE_SKILL_DIR}/scripts/collect_snowflake_evidence.py" \
--surface data-quality-expectations-current --connection readonly-observer \
--data-quality-object GOVERNED_DB.GOVERNED_SCHEMA.GOVERNED_TABLE \
--data-quality-domain TABLE \
--output ./dq-expectations.json
python3 "${CLAUDE_SKILL_DIR}/scripts/collect_snowflake_evidence.py" \
--surface data-quality-notification-current --connection readonly-observer \
--data-quality-object GOVERNED_DB.GOVERNED_SCHEMA.GOVERNED_TABLE \
--data-quality-domain TABLE --output ./dq-notification.json
The object selector is used only in reviewed local SQL. The receipt retains its scoped object hash and domain, never the raw selector. Do not escalate roles when a source is permission-blocked.
Maintain the owner-approved policy as a separate policy.json. Assemble exactly
schema_version, the byte-equivalent parsed policy, and collector_receipts in
the evidence wrapper. Record the evidence and policy digests independently when
each crosses its trusted local boundary. The embedded receipt checksums are not
trust anchors.
# Record these at their independent trusted local boundaries.
python3 "${CLAUDE_SKILL_DIR}/scripts/analyze_data_quality.py" evidence.json \
--print-input-sha256
python3 "${CLAUDE_SKILL_DIR}/scripts/analyze_data_quality.py" \
--policy-file policy.json --print-policy-sha256
python3 "${CLAUDE_SKILL_DIR}/scripts/analyze_data_quality.py" evidence.json \
--policy-file policy.json \
--evaluated-at 2026-09-03T12:00:00Z \
--trusted-input-sha256 sha256:RECORD_FROM_EVIDENCE_BOUNDARY \
--trusted-policy-sha256 sha256:RECORD_FROM_POLICY_BOUNDARY --pretty
Supplying digests recomputed from an already suspect file does not establish
trust. The policy's analysis_as_of_utc must equal --evaluated-at, preventing a
trusted old policy from being replayed against a shifted clock.
Preserve configuration_status, history_observation_status,
history_completeness_status, every finding code and hashed scope, evidence
integrity and coverage, the evaluated denominator, receipt hashes, and fixed
non-claims. Do not convert an inconclusive result or satisfied observation into
operational approval. If remediation would mutate Snowflake, produce a dry-run
proposal and obtain separate authorization.
EXPECTATION_VIOLATED=false is SATISFIED_OBSERVATION, never quality PASS.
Snowflake publishes no finality SLA for the history surface, so
history_completeness_status remains UNPROVEN_NO_PROVIDER_SLA,
pass_supported remains false, and settled_through_utc remains null.DQ_NO_EVALUATION, not a pass. true is a violation;
null is an evaluation failure.ENABLED proves configuration only. Delivery always remains
NOT_OBSERVED; missing visibility differs from disabled configuration.(association_key_sha256, expectation_key_sha256) policy key is unique.The report includes the three status axes, pass_supported,
settled_through_utc, integrity and coverage, denominator counts, deterministic
findings, safe provenance, fixed non-claims, and report_sha256. Findings contain
fixed text and validated requirement hashes only.
2 is a fixed generic malformed-input error and never reflects rejected input.evidence_integrity_status=INVALID means a trust or receipt check failed; recollect.evidence_complete remains false because history completeness is not provider-proven.False produces SATISFIED_OBSERVATION, while a missing row produces
DQ_NO_EVALUATION; neither produces quality PASS. A true row produces
VIOLATION_OBSERVED and quality FAIL.
The analyzer and collector are read-only. A remediation request ends at a dry-run change proposal unless the caller separately authorizes mutation. Findings use validated requirement hashes as scopes and fixed text, so rejected receipt fields or values are never reflected into output.