sf-data-management

Moves Salesforce records between orgs using sObject tree plans, Bulk API 2.0, and sf data commands.

2|Updated Sep 12, 2026
One-click install
npx skills add https://github.com/grzmol/vibe-force --skill sf-data-management-grzmol
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sf-data-management
Source: https://github.com/grzmol/vibe-force/tree/main/skills/sf-data-management
Command: npx skills add https://github.com/grzmol/vibe-force --skill sf-data-management-grzmol

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Moving records in and out of a Salesforce org is error-prone: loads that cannot be re-run create duplicates, children load before parents, bulk jobs fire and forget, and destructive schema changes silently lose data. This Skill provides the decision rules, command syntax, limits, and recipes to seed, migrate, backfill, extract, and delete Salesforce data safely. ## Core Features & Use Cases - Mechanism selection by volume: sObject tree for hand-written seed data, single-record commands for ad hoc changes, Bulk API 2.0 for anything over 2,000 records, and bulk export for queries over 10,000 rows. - Repeatable loads with external ids: upsert patterns keyed on unique external id fields, relationship columns for parent-child loads in one pass, and load-ordering rules for tree plans. - Limits and safety planning: Bulk API 2.0 allocations (15,000 batches per 24 hours, 100 MB practical file size), hard delete and Recycle Bin behavior, and data-loss rules for destructive schema changes. - Use Case: Seed a scratch org by exporting a shaped Account-Contact sample with sf data export tree --plan, committing it, and replaying it with sf data import tree on every new org, then verifying counts and orphan Contacts. ## Quick Start Ask the assistant to seed your scratch org with the committed data plan, or to write a repeatable bulk upsert script for a CSV of Accounts keyed on an external id field.

Frequently Asked Questions about sf-data-management

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

FAQPage Schema
How do I bulk load records into Salesforce with the sf CLI?

Use sf data import bulk with --file, --sobject, and --target-org for inserts over 2,000 records. Add --wait to block until the job finishes, or capture the job id and poll with sf data bulk results.

How do I make a Salesforce data load re-runnable without duplicates?

Use sf data upsert bulk with --external-id pointing at a custom field marked External ID and Unique. The upsert inserts new keys and updates matching ones, so re-running the same file changes nothing.

When should I use Bulk API 2.0 vs sObject tree import?

Use sObject tree import for small hand-written seed data with referenceId relationships, and Bulk API 2.0 for any operation over 2,000 records. For queries returning more than 10,000 rows, use sf data export bulk instead of sf data query.

How do I load parent and child records without knowing Salesforce ids?

In tree JSON use referenceId and @ref attributes; in CSV loads use a relationship column like Account.Legacy_Id__c keyed on the parent's external id. Load parents first so child lookups resolve server-side.

What are the Bulk API 2.0 limits for large Salesforce data loads?

You get 15,000 batches per rolling 24 hours shared with Bulk API 1.0, 150 million records uploaded per day, and 150 MB base64-encoded per job, so keep raw CSV files under 100 MB. Results stay retrievable for 7 days.

Why did my Salesforce bulk load create duplicate records on re-run?

The load used insert instead of upsert, or the CSV had no external id column. Add a unique external id field to the object and switch to sf data upsert bulk so repeated runs match existing rows.