sf-data

Create, bulk-load, validate, and clean up Salesforce org data using sf CLI commands.

1|Updated May 7, 2026
One-click install
npx skills add https://github.com/amanpraaj/sf-skill-hub --skill sf-data-amanpraaj
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: sf-data
Source: https://github.com/amanpraaj/sf-skill-hub/tree/main/skills/salesforce/sf-data
Command: npx skills add https://github.com/amanpraaj/sf-skill-hub --skill sf-data-amanpraaj

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) and assets (resource) components.

What problem does it solve? Creating and managing Salesforce org data for testing, demos, and migrations is error-prone: missing required fields, invalid picklist values, governor limit violations, and leftover test records cluttering orgs. This Skill provides a describe-first, CLI-driven workflow that validates schema before writing data and always leaves cleanup instructions. ## Core Features & Use Cases - CRUD and Bulk Operations: Create, update, delete, upsert, import, and export records via sf CLI single-record commands, Bulk API 2.0, or JSON tree import for parent-child hierarchies. - Describe-First Validation: Inspect required fields, createable fields, and picklist values with sf sobject describe before any data creation, with a bounded retry strategy for failures. - Test Data Factories & Cleanup: Generate 251+ record datasets for trigger bulk testing using Apex factory patterns, plus savepoint/rollback, delete-by-pattern, and delete-by-ID cleanup scripts. - Use Case: You need to validate a bulkified Account trigger. Ask the Skill to create 251 Accounts with varied Industries, verify the trigger fired across both 200-record batches, and receive exact cleanup commands afterward. ## Quick Start Ask the agent to create 251 test Account records with varying Industries in your dev org for trigger bulk testing.

Frequently Asked Questions about sf-data

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

FAQPage Schema
How do I create bulk test data in Salesforce with sf CLI?▼

Use sf data import bulk with a CSV file for large volumes, or run an anonymous Apex factory script via sf apex run for controlled generation. For trigger testing, create at least 251 records to cross the 200-record batch boundary.

How do I avoid REQUIRED_FIELD_MISSING errors when creating Salesforce records?▼

Run sf sobject describe on the target object first and filter for fields where nillable is false and createable is true. Include those fields with valid values, and verify picklist entries against the describe output rather than guessing.

When should I use Bulk API versus single-record sf data commands?▼

Use single-record sf data create or update commands for roughly 1-10 records, standard API patterns up to about 2000 records, and Bulk API 2.0 via sf data import bulk for anything larger. Bulk API supports up to 10 million records per 24 hours.

Does savepoint rollback work for asynchronous Apex test data?▼

No, Database.rollback does not undo async operations like future, queueable, or batch jobs, and transactions allow a maximum of 5 savepoints. For async scenarios, use delete-by-pattern, delete-by-created-date, or ID-tracking cleanup instead.

How do I clean up test records in a Salesforce org safely?▼

Delete children before parents, use specific name prefixes like 'Test%' to avoid deleting real data, and query records first to preview what will be removed. For large volumes, export IDs to CSV and run sf data delete bulk.

When should I not use this data operations skill?▼

Do not use it for pure SOQL query writing, Apex test execution, or metadata deployment, which belong to dedicated query, testing, and deployment skills. It also requires that target objects and fields already exist in the org before data creation.