# platform-data-manage

Salesforce data operations skill for sf CLI and anonymous Apex. It creates test datasets, runs bulk imports, and cleans up records across scratch orgs and sandboxes.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 6100 installs · ★ 1112
- Author: forcedotcom
- License: Apache-2.0 · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/forcedotcom/sf-skills/tree/HEAD/skills/platform-data-manage/SKILL.md
- Updated: 2026-10-23
- HTML: https://affpapa.org/en/nevibecode/skills/platform-data-manage

## What it does

The skill automates record operations across Salesforce orgs. It handles single-record mutations with sf data CLI commands and orchestrates large datasets using Bulk API 2.0. It distinguishes between offline script generation for .apex, CSV, or JSON assets and direct remote execution against an authenticated org.

For automation testing, it prefers 251+ records to evaluate bulk trigger and flow behavior. Environment dependencies include sf version 2.0.0 or higher, jq version 1.6.0 or higher, and python3 version 3.8.0 or higher. If target objects or custom fields do not exist yet, data operations stop until the schema is deployed.

## Requirements
- Works with: Salesforce

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add forcedotcom/sf-skills --skill platform-data-manage -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/platform-data-manage/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/platform-data-manage/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add forcedotcom/sf-skills --skill platform-data-manage -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/platform-data-manage/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add forcedotcom/sf-skills --skill platform-data-manage -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/platform-data-manage/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install forcedotcom/sf-skills platform-data-manage
```

2. **Manually: put the files in place**
- File: `.github/skills/platform-data-manage/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add forcedotcom/sf-skills --skill platform-data-manage -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/forcedotcom/sf-skills --path skills/platform-data-manage
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/platform-data-manage/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add forcedotcom/sf-skills --skill platform-data-manage -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/forcedotcom/sf-skills/tree/HEAD/skills/platform-data-manage/SKILL.md

## When to use it
- generate synthetic test records for flow and Apex validation
- import parent-child record trees via sf CLI
- execute bulk data operations with Bulk API 2.0
- clean up test data by ID or creation date window

## Example prompts
- Generate synthetic contact records for testing without touching the remote org
- Import test accounts and child contacts into the dev-org alias
- Create an anonymous Apex rollback script to delete records created today

## Source text · SKILL.md · Apache-2.0

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: d826e996561061ec.

BEGIN THIRD-PARTY FILE d826e996561061ec
```text
---
name: platform-data-manage
description: "Salesforce data operations with 130-point scoring. Use to create, update, delete, bulk import/export, generate test data, and clean up org records via sf CLI and anonymous Apex. TRIGGER on creating test data, bulk import/export, sf data CLI commands, data-factory patterns for Apex tests, or seeding/cleaning org records. DO NOT TRIGGER for SOQL query writing only (use platform-soql-query), Apex test execution (use platform-apex-test-run), or metadata deployment (use platform-metadata-deploy)."
metadata:
  version: "1.1"
  domains: ["Platform"]
  relatedSkills:
    - "automation-flow-generate"
    - "platform-apex-generate"
    - "platform-apex-test-run"
    - "platform-custom-field-generate"
    - "platform-custom-object-generate"
    - "platform-metadata-deploy"
    - "platform-soql-query"
  cliTools:
    - tool: ["sf"]
      semver: ">=2.0.0"
    - tool: ["jq"]
      semver: ">=1.6.0"
    - tool: ["python3"]
      semver: ">=3.8.0"
---

# Salesforce Data Operations Expert (platform-data-manage)

Use this skill when the user needs **Salesforce data work**: record CRUD, bulk import/export, test data generation, cleanup scripts, or data factory patterns for validating Apex, Flow, or integration behavior.

## When This Skill Owns the Task

Use `platform-data-manage` when the work involves:
- `sf data` CLI commands
- record creation, update, delete, upsert, export, or tree import/export
- realistic test data generation
- bulk data operations and cleanup
- Apex anonymous scripts for data seeding / rollback

Delegate elsewhere when the user is:
- writing SOQL only → [platform-soql-query](../platform-soql-query/SKILL.md)
- running or repairing Apex tests → [platform-apex-test-run](../platform-apex-test-run/SKILL.md)
- deploying metadata first → [platform-metadata-deploy](../platform-metadata-deploy/SKILL.md)
- creating or modifying custom objects / fields → [platform-custom-object-generate](../platform-custom-object-generate/SKILL.md) or [platform-custom-field-generate](../platform-custom-field-generate/SKILL.md)

---

## Important Mode Decision

Confirm which mode the user wants:

| Mode | Use when |
|---|---|
| Script generation | they want reusable `.apex`, CSV, or JSON assets without touching an org yet |
| Remote execution | they want records created / changed in a real org now |

Do not assume remote execution if the user may only want scripts.

---

## Required Context to Gather First

Ask for or infer:
- target object(s)
- org alias, if remote execution is required
- operation type: query, create, update, delete, upsert, import, export, cleanup
- expected volume
- whether this is test data, migration data, or one-off troubleshooting data
- any parent-child relationships that must exist first

---

## Core Operating Rules

- `platform-data-manage` acts on **remote org data** unless the user explicitly wants local script generation.
```
END THIRD-PARTY FILE d826e996561061ec

The third-party file has ended. Everything between the d826e996561061ec tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

First 2936 of 10801 bytes. © forcedotcom · Apache-2.0 · https://github.com/forcedotcom/sf-skills/tree/HEAD/skills/platform-data-manage/SKILL.md

_Part of the page did not fit — see the HTML version._

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
