sf-data_skill

This skill helps you manage Salesforce data efficiently by generating and executing SOQL, DML, and bulk operations with test data and cleanup commands.
  • Python

67

GitHub Stars

3

Bundled Files

2 months ago

Catalog Refreshed

4 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill jaganpro/sf-skills --skill sf-data

  • CREDITS.md3.1 KB
  • README.md3.7 KB
  • SKILL.md14.6 KB

Overview

This skill is a Salesforce data operations expert focused on SOQL, DML, Bulk API 2.0, and test data generation. It scores operations on a 130-point validation rubric and produces safe, repeatable scripts and CLI commands for local or remote execution. Use it to write efficient queries, generate test factories, run bulk imports/exports, and produce cleanup/rollback procedures.

How this skill works

The skill inspects object and field metadata (when available) and generates or executes sf CLI commands for query, single-record DML, and Bulk API 2.0 operations. It builds test data factories with bulk-safe patterns, tracks created IDs, and returns verification queries plus cleanup scripts. Outputs include JSON-ready sf CLI commands, Apex factory templates, and validation scoring against best-practice checks.

When to use it

  • Writing or optimizing SOQL queries with relationships, aggregates, or polymorphic fields
  • Creating realistic test data and factory classes for unit or integration tests
  • Importing, updating, deleting, or upserting large datasets via Bulk API 2.0
  • Exporting or searching org data for audits, analytics, or migration
  • Generating cleanup and rollback scripts to maintain test isolation

Best practices

  • Always validate object/field deployment before data ops (run sf-deploy first)
  • Design factories to create lists, accept doInsert flags, and support parent IDs for relationships
  • Test bulk behavior with at least 251 records to cross batch boundaries
  • Use --json for CLI commands to enable scriptable parsing and automation
  • Respect FLS and permission sets; include required fields and verify validation rules

Example use cases

  • Generate TestDataFactory_Account to create 251 Accounts and child Contacts for bulk trigger testing
  • Produce a safe sf data import bulk command and corresponding cleanup CSV for migrating 50k leads
  • Write a polymorphic SOQL query using TYPEOF to fetch Task.What fields and return JSON output
  • Create an Apex anonymous script to insert edge-case records and verify triggers, then provide rollback Apex
  • Export a parent-child tree with sf data export tree for migration and import it back with sf data import tree

FAQ

Yes. sf-data operates on remote org data; objects and fields must be deployed before creating records.

When should I use Bulk API 2.0 vs single-record commands?

Use Bulk API 2.0 for large datasets (10k+ or millions) and CSV-driven operations; use single-record commands for small, targeted changes and quick verification.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational