/snowflake-pack:snowflake-deploy-medic [redacted-deploy-evidence.json]from snowflake-pack
Reviews Snowflake infrastructure and database deployments across Terraform 2.x provider, schemachange migrations, and Snowflake CLI/drivers. Produces zero-change verdict, ordered remediation, and rollback requirements before production deploys.
Ships in snowflake-pack. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Snowflake deployment failures hide in the seams: a grant resource is declared as new although the remote grant already exists; provider state is truncated; a versioned migration was edited after application; a repeatable checksum change reruns unexpectedly; or a current CLI/driver behavior change is mistaken for a database defect. This skill creates one evidence-backed gate across those seams.
The deterministic classifier is
scripts/analyze_deploy_evidence.py. It
accepts a bounded schema-v2 projection plus its digest from an independent CI or
artifact channel. It emits privacy-safe findings, a point-in-time zero-change
status, ordered read-only checks, and post-deploy invariants. Nested receipt
hashes detect internal inconsistency; they never substitute for trusted origin.
Read
references/terraform-provider-2x.md,
references/schemachange-integrity.md,
and references/zero-change-rollback.md
for the relevant surface. Always verify current primary docs and release notes;
the versions in a local receipt are observations, not timeless recommendations.
terraform apply, terraform destroy, state editing, schemachange deploy, mutating snow sql, or Snowflake DDL/DML automatically.terraform.tfstate or CHANGE_HISTORY to make a plan green.Collect a timestamped receipt from the exact account, role, backend, and CI commit. Hash account, role, backend, workspace, object, address, operator, and owner identities before they enter the packet. Obtain the canonical packet SHA-256 independently from the trusted CI/artifact channel. The packet must include:
terraform plan -detailed-exitcode output: exit code, change count,
resource actions, replacements/destroys, grant/ownership changes, and preview
features.CHANGE_HISTORY count/hash; repeated R/A executions make those counts differ.0 and changes are 0, tied to the
saved plan hash and verified affected-object count. Otherwise, a rollback or
forward-fix test against this exact plan/migration set, including
owner, preconditions, validation, and stop condition.Missing evidence is an explicit finding. A successful command from a different role, account, or environment is not a deployment receipt.
Record the installed versions and lockfiles. Read the live provider registry, Snowflake CLI/client-driver release notes, and current behavior-change notes for the target account release window. Do not rely on a cached blog post or a generic “latest” label. Keep auth read-only and least-privileged; use key pair/OAuth/ workload identity/external-browser mechanisms without exposing secrets.
The pack's generic query collector may support diagnosis, but it is not positive
evidence for this gate. A raw query receipt, a self-asserted hash, or a receipt
with truncation_possible: true cannot prove a complete affected-object or
dependency inventory. Build the schema-v2 projection in trusted CI from sanitized
terraform show -json, backend metadata, lock-file selection, repository migration
inventory, CHANGE_HISTORY, official BCR status/items, and exact tool versions.
Validate that state parses and belongs to the intended backend/workspace. Preserve a backend version/lock receipt before refreshing. Run only the reviewed read-only plan with detailed exit status:
0 and changes=0: candidate zero-change receipt;2: valid preview with changes, requiring review;For a grant adoption, declare the intended address and use the current provider's documented import identity. Refresh and require a zero-change plan. Inspect grant scope, future grants, role/object ownership, managed access, privilege removals, and provider normalization. Never destroy a live dependency graph to avoid an import.
For provider 2.x preview resources/features, read the exact current support
boundary and release notes. A green plan does not make preview behavior stable.
See references/terraform-provider-2x.md.
Record every migration-guide segment between the locked source and target provider
versions. Each segment receipt must bind its source, versions, affected addresses,
immutable source snapshot, state-move boundary, disposition, and canonical SHA-256.
Segments must advance monotonically without gaps, cycles, or synthetic multi-minor
leaps. Empty means explicitly
verified not applicable, not “not checked.”
If dbt Project objects are in scope, inventory their deployed/staged code hashes,
current and target version model, supported runtime, behavior-change disposition,
and rollback artifact. The pending live-version behavior changes the rollback model;
see references/dbt-project-and-provider-migrations.md.
Separate migration types:
V...__...sql: versioned, tracked once; checksum drift blocks deployment until
the applied content is reconciled.R__...sql: repeatable; checksum changes intentionally cause a rerun, so prove
idempotence and scope before approval.A__...sql: always-run; review side effects and cost on every deploy.Compare repository content to the actual CHANGE_HISTORY row. Check duplicate
version names and branch ordering. Use current verify/dry-run behavior and
review upgrade notes for checksum normalization regressions before changing the
tool version. Never alter history by hand. See
references/schemachange-integrity.md.
python3 "${CLAUDE_SKILL_DIR}/scripts/analyze_deploy_evidence.py" \
--input ./snowflake-deploy-evidence.json \
--as-of '<current-utc-evaluation-timestamp>' \
--trusted-bundle-sha256 'sha256:<digest-from-trusted-ci-or-artifact-channel>'
The explicit --as-of value prevents wall-clock-dependent output. A clean
verdict is PASS_AS_OF, expires at that exact timestamp, and is never permission
to apply. Expected findings include:
TRUSTED_BUNDLE_DIGEST_MISSING_OR_MISMATCHED,
EVIDENCE_CONTEXT_INVALID_OR_STALE, PLAN_RECEIPT_UNVERIFIABLE,
PLAN_EXIT_ACTION_CONTRADICTION, TERRAFORM_STATE_UNREADABLE_OR_UNBOUND;GRANT_IMPORT_REQUIRED, DESTRUCTIVE_PLAN_CHANGE,
AFFECTED_OBJECT_DENOMINATOR_UNVERIFIED;VERSIONED_CHECKSUM_DRIFT, REPEATABLE_CHANGE_DETECTED,
ALWAYS_MIGRATION_UNREVIEWED, MIGRATION_DENOMINATOR_UNVERIFIED;PROVIDER_PREVIEW_FEATURE, PROVIDER_PREVIEW_DENOMINATOR_UNVERIFIED,
PROVIDER_MIGRATION_DENOMINATOR_UNVERIFIED, DEPLOY_TOOLCHAIN_UNVERIFIED;BCR_INVENTORY_UNVERIFIED, DBT_PROJECT_DENOMINATOR_UNVERIFIED,
PREFLIGHT_DENOMINATOR_UNVERIFIED, STATE_BACKUP_RECEIPT_UNVERIFIABLE;ROLLBACK_RECEIPT_UNVERIFIABLE, POST_CHANGE_INVARIANTS_UNVERIFIED,
ZERO_CHANGE_RECEIPT_UNVERIFIABLE.The script is pure and connector-neutral. It reports findings from supplied evidence; it does not call Terraform, schemachange, Snowflake CLI, or Snowflake.
Return a receipt containing scope/identity, current toolchain sources, zero-change or plan verdict, grant/import/state findings, migration checksum findings, BCR review, and rollback status. For each finding distinguish observed, derived, unknown, and hypothesis. Name the exact next read-only check and the approval boundary for any later mutation.
After a separately approved deployment, collect fresh evidence. The preflight classifier validates only the invariant plan; it does not claim to execute or verify post-deploy checks. Reconcile the saved state/plan, grant addresses, migration history, toolchain/BCR receipt, observed invariant results, and rollback/forward-fix validation in a separate operator-reviewed receipt.
BLOCKED or PASS_AS_OF; neither authorizes apply.issued status when the plan is truly zero-change.If the JSON receipt is malformed, the classifier exits with code 2; correct the receipt instead of reading a partial verdict. If state, plan, change history, toolchain, or BCR evidence is missing, emit an explicit unknown/blocking finding. If the account, backend, role, or repository commit cannot be established, stop at identity verification. If a user asks to auto-apply, destroy, deploy, mutate SQL, or edit state/history, return the reviewed read-only checks and approval boundary instead. A successful CLI command from another environment is not proof of this deployment.
When Terraform wants to create a grant that already exists, classify
GRANT_IMPORT_REQUIRED. Declare the intended address, use the current provider's
documented import identity, refresh, and require a zero-change plan. Do not hand-
edit terraform.tfstate or destroy the database to force adoption.
When a V... checksum differs from CHANGE_HISTORY, block the release and restore
the applied content or create a new migration. When an R__... checksum changes,
review the intentional rerun and idempotence separately. Never update the history
table by hand to silence either finding.
references/terraform-provider-2x.md —
provider support, state/plan, grant import, ownership, and preview review.references/schemachange-integrity.md —
versioned/repeatable/always scripts, checksums, history, and upgrade risk.references/toolchain-bcr.md — current CLI,
driver, authentication, and behavior-change review.references/zero-change-rollback.md —
detailed plan semantics and change-specific rollback boundaries.references/source-notes.md — primary research
routes; verify live pages at execution time.references/dbt-project-and-provider-migrations.md
— provider migration segments and dbt Project live-version preflight.eval-spec.yaml (opens in a new tab)references/dbt-project-and-provider-migrations.md (opens in a new tab)references/schemachange-integrity.md (opens in a new tab)references/source-notes.md (opens in a new tab)references/terraform-provider-2x.md (opens in a new tab)references/toolchain-bcr.md (opens in a new tab)references/zero-change-rollback.md (opens in a new tab)scripts/analyze_deploy_evidence.py (opens in a new tab)scripts/fixtures/clean-preview.json (opens in a new tab)scripts/fixtures/unsafe-deploy.json (opens in a new tab)scripts/test_analyze_deploy_evidence.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
10 skills in this plugin
/snowflake-access-guardianAudit Snowflake effective access and produce a safe least-privilege change packet.
Trace account-role inheritance, primary and secondary roles, managed-access
schemas, ownership, direct-to-user/PUBLIC grants, orphaned principals, and
existing-versus-future-grant conflicts. Use when access is unexpectedly broad or
denied, a role graph needs review, or an authorization cleanup needs evidence.
Trigger with phrases like "Snowflake access audit", "trace Snowflake grants",
"why can this user read", "Snowflake RBAC drift", or "future grants conflict".
/snowflake-cost-leak-hunterAudit and analyze Snowflake warehouse, serverless, Adaptive, storage, transfer, and AI cost evidence with a typed ledger that prevents double counting and exposes freshness, attribution, control, and invoice boundaries. Use when a Snowflake bill increased, a team needs chargeback/showback evidence, credits appear unexplained, or an operator asks which usage merits investigation. Trigger with "Snowflake bill increased", "find idle Snowflake credits", "Snowflake cost attribution", or "untagged Snowflake spend". Do not use to mutate cost controls or claim savings./snowflake-data-quality-sentinelAssess 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 "notification gap".
/snowflake-failover-readiness-drillAnalyze Snowflake failover-group RPO/RTO readiness from independently trusted,
privacy-preserving live receipts without executing refresh, failover, failback,
redirect, cancellation, resume, or session changes. Use when an owner needs a
Business Critical disaster-recovery preflight, replication failure diagnosis,
dangling-reference check, or operator-executed drill proof. Trigger with "Snowflake
failover drill", "replication RPO", "failback proof", or "secondary refresh".
/snowflake-governance-coverage-auditorAudit trusted Snowflake classification, tags, masking, row access, projection,
join, aggregation, and privacy-policy evidence without reading customer data.
Use when governance enforcement may be missing or ambiguous. Trigger with
"Snowflake governance coverage", "policy precedence", "tag policy gaps",
"classification failure", or "POLICY_CONTEXT verification".
/snowflake-native-app-release-sheriffPreflight Snowflake Native App package releases from trusted, privacy-safe
provider evidence without publishing, upgrading, altering, granting, or
approving anything. Use when reviewing manifest/setup safety, security-scan gates,
version and release-directive validation, App Spec or privilege changes,
upgrade-cohort compatibility, and rollback readiness. Trigger with "Native
App release", "application package scan", "upgrade cohort", or "App Spec".
npx claudepluginhub jeremylongshore/tons-of-skills-marketplace --plugin snowflake-packOther plugins' skills for the same job