Billing, plans, seats, permissions, access rules, auth, flag removals or data migrations that could lock real organizations out or change what they pay. Use before merging or deploying such a change to see exactly which production organizations it affects, prove the UI on production-shaped data, and only with explicit approval test against a PlanetScale copy of real data.
90%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Passed
No findings from the security scan
Tests prove the rule you wrote. They do not tell you which real organizations the rule changes. Before a risky change ships, answer three questions in order and stop at the first level that answers them:
Confidentiality (AGENTS.md, hard rule): production names, ids, emails and counts stay in chat. Never put them in a branch, commit, fixture, screenshot, PR or issue. Describe affected organizations generically ("one grandfathered org with ~30 SSO users").
Run the new rule against production inputs without writing anything.
den_query (read-only SQL against
the Den database). Never use admin write tools (den_update_org_plan,
den_set_org_capability, den_set_feature_rollout) during a dry run.dev rule) and after (the PR) for every
organization the rule can touch, and report only the ones that differ, plus
anyone at or near a new limit.den_query traps that produced wrong answers before:
GREATEST(5, JSON_EXTRACT(m,'$.limits.members'))
says '40' < '5'. Always CAST(JSON_UNQUOTE(JSON_EXTRACT(...)) AS UNSIGNED).invitation, session, account, keys and
tokens) and any statement containing a write keyword as a word, including
inside string literals ('%grant%', 'invitation.create.attempted'). Use
LIKE 'invitation.%.attempted', or count placeholder member rows
(joined_at IS NULL) instead of reading invitations.audit_event by org_id and a created_at
range; never scan it whole.feature_rollout and organization_feature, not
organization.metadata.capabilities (a legacy copy).Reproduce each affected shape with generic data and drive the real screens.
evals/worlds/*.ts, generic names such as
"Acme") and prove the journeys in a proof (write-a-spec). Use the fake
Stripe lab (evals/worlds/fake-stripe.ts) when billing must be configured,
or limits that depend on Stripe being set up switch off.pnpm evals:e2e <name> --local, or boot a preview with
preview-my-work (preview-den / preview-full, locally or on Daytona)
and click through by hand. Attach screenshots to the PR (upload-photo).Use only when Levels 1 and 2 cannot answer the question (data-dependent migrations, performance on real volume). Ask the person first and name the cost and the data involved.
Use the Dry run on a copy of production data workflow
(.github/workflows/prod-data-dry-run.yml). It seeds an isolated
dry-run-<run-id>-<attempt> copy from the latest production backup (Data
Branching), runs one read-only check, and attempts deletion when the job ends,
including on failure or cancel. Verify absence after the run; cleanup can fail.
Both --restore and --seed-data can create a branch classified as production.
The token therefore needs read-only production connection and production-branch
deletion permissions. The real source must be deletion-protected, and the job
verifies that protection before creation, credentials and cleanup. The token
cannot change branch protection or write production data. The PlanetScale MCP
has no branch-creation tools.
ee/apps/den-api/scripts/dry-run/<name>.ts on your
branch, using connect.ts (dryRunDb, report, fail, finish). It may
import the PR's own code (for example a pure rule) and must print
aggregates and pass/fail only: this repository is public, so the job
log and summary are public. Start from smoke.ts.gh workflow run prod-data-dry-run.yml --ref <branch> -f check=<name>.ts).
Database access is always read-only. This workflow cannot apply migrations.prod-data-dry-run
environment after reading the check. Approve only checks that print
aggregates.cleanup_only to delete leftover dry-run-* branches.What the workflow needs (set once, by a person, never pasted in chat): on the
prod-data-dry-run environment, a PlanetScale service token limited to the
Den database with read_database, read_branch, create_branch,
delete_branch, connect_branch, read_backups,
restore_production_branch_backup, connect_production_read_only_branch and
delete_production_branch (never connect_production_branch or write_database).
The real source must be deletion-protected first. These scopes also allow
read-only credentials on the live source and deleting other unprotected
production branches in this database; run-name guards limit the workflow,
not the underlying token. Store it only in the protected environment as PLANETSCALE_DRY_RUN_TOKEN_ID /
PLANETSCALE_DRY_RUN_TOKEN, the PlanetScale organization and database names as
variables PLANETSCALE_DRY_RUN_ORG and PLANETSCALE_DRY_RUN_DATABASE, and a restored branch costs as much as the production branch while
it exists.
Guards the workflow already applies: manual runs only, a required reviewer,
no secrets besides the branch connection (no email, Stripe, Slack, connector
or model credentials), masked credentials, one run at a time, a 90 minute
timeout, and branch deletion in an always() step. Never copy rows out of the
branch, never screenshot it, and never point a full Den deployment with real
integrations at it.
/admin (add-a-feature).different-ai/openwork
be86f8c
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.