handling-sf-data

Automate Salesforce data operations and test data generation using sf CLI.

Updated Jun 1, 2026
One-click install
npx skills add https://github.com/Collabalist/SFDC --skill handling-sf-data-collabalist
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: handling-sf-data
Source: https://github.com/Collabalist/SFDC/tree/main/.agents/skills/handling-sf-data
Command: npx skills add https://github.com/Collabalist/SFDC --skill handling-sf-data-collabalist

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires sfcli, apex, and includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

This Skill simplifies complex Salesforce data operations, providing a robust and comprehensive toolset for CRUD, bulk operations, test data generation, and cleanup scripts.

Core Features & Use Cases

  • CRUD Operations: Create, read, update, delete records via sf CLI.
  • Describe-First Validation: Inspect required fields, picklists, and createable fields before data creation.
  • CLI-First Test Data: Prefer sf data commands for straightforward seed data.
  • Bulk Operations: Import/export via Bulk API 2.0.
  • Record Tracking & Cleanup: Savepoint/rollback, cleanup scripts, delete-by-pattern workflows.
  • Use Case: When you need to create a large number of test records for Salesforce testing, use this Skill to automate the process with validation and cleanup.

Quick Start

To create 251 test Account records with varying Industries for trigger testing in org dev, use the following command:

Skill(skill="handling-sf-data")
Request: "Create 251 test Account records with varying Industries for trigger testing in org dev"

Frequently Asked Questions about handling-sf-data

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

FAQPage Schema
How do I automate Salesforce bulk data operations and test data generation?

You can automate Salesforce data operations by using sf CLI and anonymous Apex to handle CRUD, bulk imports via Bulk API 2.0, and test data generation with built-in validation and cleanup scripts.

What is the best way to generate test records in Salesforce for trigger testing?

The best way to generate test records is using CLI-first commands to create multiple records with varying fields, utilizing describe-first validation to inspect required fields and picklists before data creation.

How does describe-first validation work for Salesforce CRUD operations?

Describe-first validation inspects required fields, picklists, and createable fields before data creation, ensuring your Salesforce CRUD operations via sf CLI succeed by preventing invalid record submissions.

Can I use anonymous Apex for Salesforce data cleanup and rollback workflows?

Yes, you can use anonymous Apex for Salesforce data cleanup and rollback workflows, executing delete-by-pattern workflows and savepoint operations to manage and revert data changes accurately.

Does this approach support Salesforce Bulk API 2.0 for large scale data imports?

Yes, this approach supports Salesforce Bulk API 2.0 for large scale data imports and exports, enabling efficient processing of massive datasets while maintaining a 130-point validation scoring system.

Why do my Salesforce data creation scripts fail due to missing required fields?

Salesforce data creation scripts fail when required fields are missing, but applying describe-first validation to inspect createable fields and picklists before execution prevents these invalid data submissions.