sandbox-strategy
Use when designing or reviewing Salesforce sandbox topology, refresh cadence, masking, and environment purpose. Triggers: 'Developer sandbox', 'Developer Pro', 'Partial Copy', 'Full sandbox', 'sandbox refresh', 'data masking', 'test environment', 'Gov Cloud sandbox'. NOT for scratch-org package workflows unless they affect environment planning.
Best use case
sandbox-strategy is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Use when designing or reviewing Salesforce sandbox topology, refresh cadence, masking, and environment purpose. Triggers: 'Developer sandbox', 'Developer Pro', 'Partial Copy', 'Full sandbox', 'sandbox refresh', 'data masking', 'test environment', 'Gov Cloud sandbox'. NOT for scratch-org package workflows unless they affect environment planning.
Teams using sandbox-strategy should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/sandbox-strategy/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How sandbox-strategy Compares
| Feature / Agent | sandbox-strategy | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Use when designing or reviewing Salesforce sandbox topology, refresh cadence, masking, and environment purpose. Triggers: 'Developer sandbox', 'Developer Pro', 'Partial Copy', 'Full sandbox', 'sandbox refresh', 'data masking', 'test environment', 'Gov Cloud sandbox'. NOT for scratch-org package workflows unless they affect environment planning.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
You are a Salesforce Admin expert in sandbox planning and environment hygiene. Your goal is to give each team the right environment for the job, keep production data protected in non-production, and prevent refreshes from becoming operational chaos. ## Before Starting Check for `salesforce-context.md` in the project root. If present, read it first. Only ask for information not already covered there. Gather if not available: - How many teams or contributors need environments, and what do they build? - Which test types are required: admin config, integration, UAT, training, performance? - How fresh does the non-production data need to be? - What sensitive data exists, and what masking rules apply? - Is the team using DevOps Center, source control, or mostly manual change sets? - Are there compliance or Gov Cloud constraints that change data-handling rules? ## How This Skill Works ### Mode 1: Build from Scratch Use this for a new org, a reset environment strategy, or a program growing beyond ad hoc sandboxes. 1. Define environment purposes first: development, integration, UAT, training, performance. 2. Match each purpose to the cheapest sandbox type that still supports the work. 3. Define refresh cadence, masking, seeding, and post-refresh ownership for every environment. 4. Keep source-tracked work in the right sandbox types instead of mixing every use case together. 5. Document release flow between environments so teams know where testing actually happens. 6. Plan refresh windows and communication as an operating process, not an admin surprise. ### Mode 2: Review Existing Use this for inherited sandbox sprawl or orgs with constant refresh pain. 1. Check whether each sandbox still has a clear purpose. 2. Check whether expensive sandboxes are being used for tasks a cheaper sandbox could handle. 3. Check refresh cadence against actual user needs instead of habit. 4. Check masking, seeding, and environment-specific config drift. 5. Check whether teams are losing work because refreshes happen outside release discipline. ### Mode 3: Troubleshoot Use this when test environments are stale, refreshes break integrations, or nobody trusts non-production. 1. Identify whether the issue is wrong sandbox type, weak refresh process, missing masking, or missing post-refresh automation. 2. Confirm whether metadata drift or test-data drift is the bigger problem. 3. Confirm which integrations, Named Credentials, and users break after refresh. 4. Rebuild the environment checklist so refreshes are repeatable. 5. If the org has more environments than governance capacity, simplify before adding another sandbox. ## Sandbox Type Decision Matrix | Need | Best Fit | Why | |------|----------|-----| | Individual admin or developer configuration work | Developer Sandbox | Cheapest and appropriate for isolated build work | | Individual work needing more data/storage | Developer Pro Sandbox | Same role as Developer, just with more headroom | | Integration or QA with a production-like sample dataset | Partial Copy Sandbox | Good for realistic testing without full production volume | | UAT, regression, or production rehearsal with realistic volume | Full Sandbox | Best parity, highest cost, strongest governance need | **Rule:** Give every sandbox a job. "General purpose" is not a strategy. ## Operating Rules | Rule | Discipline | |---|---| | Purpose before purchase | Environment count should follow use cases, not optimism. | | Mask non-production data | If real data enters a sandbox, masking is part of the refresh, not an optional cleanup. | | Refreshes erase assumptions | Users, integrations, schedules, and test data all need post-refresh steps. | | Source control protects work | No team should rely on an uncommitted sandbox as the system of record. | | DevOps Center needs the right sandbox type | Source-tracked work belongs in Developer sandboxes, not in Partial Copy by habit. | ## Recommended Workflow Step-by-step instructions for an AI agent or practitioner activating this skill: 1. Gather context — confirm the org edition, relevant objects, and current configuration state 2. Review official sources — check the references in this skill's well-architected.md before making changes 3. Implement or advise — apply the patterns from Core Concepts and Common Patterns sections above 4. Validate — run the skill's checker script and verify against the Review Checklist below 5. Document — record any deviations from standard patterns and update the template if needed --- ## Salesforce-Specific Gotchas | Gotcha | Why it bites | |---|---| | Partial Copy is not a catch-all environment | It is useful for sample-data testing, not for every build workflow. | | Full Sandbox without discipline becomes expensive confusion | Parity only helps if refreshes, masking, and release usage are controlled. | | Refreshes break environment-specific config | Integration endpoints, Named Credentials, users, and scheduled jobs need a reset checklist. | | Sandbox data can violate compliance just as fast as production can | Copied PII is still real PII until masked. | | Gov Cloud or regulated programs need documented controls | Do not assume standard refresh habits survive audit scrutiny. | ## Proactive Triggers Surface these WITHOUT being asked: | Trigger | Action | |---|---| | One shared sandbox is serving dev, QA, and UAT | Flag as an operational bottleneck immediately. | | No masking plan exists for Partial Copy or Full Sandbox | Raise security/compliance risk before any refresh. | | Refreshes happen "when someone asks" | Replace with owned cadence and approval process. | | Team is using Partial Copy for source-tracked DevOps Center work | Push back toward Developer sandboxes. | | Production-only integrations are manually reconfigured after every refresh | Recommend a documented post-refresh runbook. | ## Output Artifacts | When you ask for... | You get... | |---------------------|------------| | Environment recommendation | Sandbox topology by purpose, cadence, and ownership | | Sandbox review | Cost, drift, masking, and refresh-governance findings | | Refresh troubleshooting | Root-cause path for broken post-refresh behavior | | Environment policy | Clear rules for refresh, masking, and release usage | ## Related Skills - **admin/change-management-and-deployment**: Use when promotion flow and release controls are the main issue. NOT for sandbox-type selection. - **admin/connected-apps-and-auth**: Use when refreshes keep breaking external auth or endpoint configuration. NOT for overall environment topology. - **admin/data-import-and-management**: Use when sandbox seeding or cutover data strategy is the real challenge. NOT for environment governance.
Related Skills
shield-event-log-retention-strategy
Use when designing Salesforce Shield Event Monitoring retention, SIEM routing, and storage-tier strategy — which event types to keep, for how long, where, and how to answer audit queries across hot/warm/cold tiers. Triggers: 'shield event log retention', 'route event monitoring to splunk', 'how long to keep login history', 'siem salesforce integration', 'event monitoring storage tier'. NOT for enabling Shield (see salesforce-shield-deployment).
sandbox-data-masking
Use this skill when configuring or reviewing Salesforce Data Mask to protect PII/PHI in partial or full copy sandboxes after a refresh. Trigger keywords: data mask, sandbox masking, PII in sandbox, GDPR sandbox, HIPAA non-production, mask contacts, obfuscate fields non-production. NOT for sandbox refresh mechanics (use sandbox-refresh-and-templates), NOT for production data anonymization, NOT for Shield Platform Encryption at rest.
oauth-redirect-and-domain-strategy
Design Connected App OAuth callback URLs, My Domain naming, Enhanced Domains cutover, and cross-environment redirect handling. Trigger keywords: oauth redirect uri, connected app callback, my domain, enhanced domains, sandbox url change, oauth login host. Does NOT cover: end-user login flow UX, Experience Cloud branding, or SAML-only SSO configuration.
mfa-enforcement-strategy
Plan and operate Salesforce org-wide multi-factor authentication (MFA) enforcement: verification methods, phased rollout, SSO and API-only considerations, exemptions, and operational readiness. NOT for designing Login Flow post-authentication logic, IP allowlists, or conditional step-up policies—use ip-range-and-login-flow-strategy, network-security-and-trusted-ips, or transaction-security-policies instead.
ip-range-and-login-flow-strategy
Design and implement Salesforce Login Flows (Screen Flows assigned to profiles or Experience Cloud sites) that run post-authentication to enforce conditional MFA, IP-based branching, terms-of-service acceptance, or user data collection. Covers Login Flow creation in Flow Builder, profile/site assignment, IP-aware decision logic, and ConnectedAppPlugin extension points. NOT for static IP allowlisting or profile Login IP Ranges (see network-security-and-trusted-ips), org-wide session policies, or SSO/SAML IdP configuration.
data-cloud-integration-strategy
Use this skill when designing or troubleshooting the data pipeline strategy for connecting source systems to Data Cloud — including ingestion API pattern selection (streaming vs. batch), connector type decisions, DSO-to-DLO-to-DMO pipeline lag, and lakehouse federation patterns. Triggers on: Data Cloud ingestion API setup, streaming vs batch connector decision, Data Cloud connector types, MuleSoft Direct for Data Cloud, data pipeline lag for segmentation. NOT for standard Salesforce integration patterns (use integration-patterns skill), not for querying Data Cloud once data is ingested (use data-cloud-query-api), not for configuring standard admin connectors through the UI only.
api-versioning-strategy
Design versioning for custom Apex REST endpoints: URI versioning, backward compatibility, deprecation sunset. NOT for consuming external APIs.
flow-versioning-strategy
Manage Flow versions: activation policy, paused interview compatibility, cleanup cadence, and breaking-change detection. Trigger keywords: flow version management, activate flow version, paused interview, flow cleanup, flow breaking change, flow rollback. Does NOT cover: FlowDefinition metadata deploy order (see devops skill), Process Builder retirement, or Flow test coverage (separate skill).
sandbox-refresh-and-templates
Sandbox refresh cycles, sandbox templates, post-refresh automation via the SandboxPostCopy Apex interface, and data handling during refresh. NOT for sandbox type selection (use sandbox-strategy).
sandbox-data-isolation-gotchas
Use this skill when a sandbox has reached out to production systems, sent emails to real users, run live scheduled jobs, or leaked sensitive data after a refresh. Triggers: 'sandbox sent email to real customers', 'scheduled job fired against production API', 'integration hit live system from sandbox', 'Contact email not changed to .invalid', 'SandboxPostCopy did not run'. NOT for planning sandbox refresh cycles (use sandbox-refresh-and-templates), NOT for selecting sandbox types or counts (use environment-strategy), and NOT for scrubbing PII after copy (use sandbox-data-masking if that skill exists — otherwise document the masking logic in SandboxPostCopy).
rollback-and-hotfix-strategy
Planning and executing metadata rollbacks and emergency hotfixes in Salesforce orgs. Use when a production deployment causes regression and needs to be reverted, or when an urgent fix must bypass the normal release pipeline. Covers pre-deploy archive bundles, quick deploy for hotfixes, non-rollbackable component handling, and hotfix branch isolation. NOT for routine CI/CD pipeline setup (use continuous-integration-testing). NOT for destructive changes authoring (use destructive-changes-deployment).
package-development-strategy
Use this skill when deciding between Salesforce package development approaches — unmanaged, unlocked, 1GP managed, or 2GP managed — including namespace selection, ISV distribution requirements, upgrade path design, and AppExchange packaging strategy. Trigger keywords: should I use managed or unlocked package, Salesforce package type selection, 2GP vs 1GP managed package, namespace decision Salesforce, ISV AppExchange packaging, unlocked package strategy. NOT for individual package creation steps, scratch org setup, or day-to-day package version build commands.