# platform-manifest-generate

Writes a Salesforce package.xml or a destructive manifest from a source folder, a component list, or org introspection. Handy when the deploy is ready but the manifest is not.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 3000 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/plugins/builder/salesforce-development/skills/platform-manifest-generate/SKILL.md
- Updated: 2026-10-23
- HTML: https://affpapa.org/en/nevibecode/skills/platform-manifest-generate

## What it does

The skill wraps `sf project generate manifest` and gives you three input modes that do not overlap. `--source-dir` scans a folder on disk. `--metadata` takes named components such as `ApexClass:AccountService`. `--from-org` pulls whatever sits in the org, optionally narrowed per metadata type. The `--type` flag picks the output: `package`, `pre`, `post` or `destroy`. One run writes one file, so a package plus a destructive manifest means two calls.

Going through the CLI means no `*` ever lands in the manifest, which takes care of the wildcard-member trap. Some cases fit neither a folder nor a clean list, say a change set derived from `git diff`. Then the skill lets you assemble the XML yourself and still advises a cross-check with `sf project deploy start --manifest <file> --dry-run`. The hand-built path spells out that component-bound types like `CustomField` or `RecordType` use `Object.Name` members, and that all three destructive files share one structure.

You need the `sf` CLI at version `>=2.0.0`. The skill stops at file authoring; deploying and deleting belong to the neighbouring `platform-metadata-deploy` and `platform-destructive-deploy`. It also rules out MCP tools, so the work happens through Bash and Write.

## Requirements
- Works with: Salesforce

## Install

### Claude Code (native platform)

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

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

### Codex

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

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

### Cursor

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

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

### GitHub Copilot

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

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

### Gemini CLI

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

2. **Platform CLI**
```bash
gemini skills install https://github.com/forcedotcom/sf-skills --path plugins/builder/salesforce-development/skills/platform-manifest-generate
```

### Windsurf (Devin Desktop)

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

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add forcedotcom/sf-skills --skill platform-manifest-generate -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/plugins/builder/salesforce-development/skills/platform-manifest-generate/SKILL.md

## When to use it
- build a `package.xml` from the `force-app/main/default` tree
- produce `destructiveChanges.xml` for fields you are removing
- get a manifest from a list of classes instead of a folder
- introspect an org for a manifest limited to chosen types
- prepare Pre and Post destructive manifests for one deploy

## Example prompts
- Generate `package.xml` from `force-app/main/default` into the `manifest` folder
- Build a manifest for `ApexClass:AccountService` and `CustomObject:Account`
- Create `destructiveChanges.xml` for `Account.OldField__c` and `Account.OldStatus__c`

## 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: 7f2fb0f171649a07.

BEGIN THIRD-PARTY FILE 7f2fb0f171649a07
```text
---
name: platform-manifest-generate
description: "Use to generate a package.xml (and optionally destructiveChanges.xml / Pre / Post) from a source dir, a component list, or org introspection. Trigger on 'generate a package.xml from this folder', 'create a manifest for these classes', 'I need a deploy manifest', or 'destructiveChanges.xml for deletions'. Encodes wildcard-vs-explicit-member rules per metadata type. DO NOT TRIGGER to deploy (platform-metadata-deploy), delete (platform-destructive-deploy), or retrieve (platform-metadata-retrieve)."
metadata:
  version: "1.0"
  relatedSkills:
    - "platform-metadata-deploy"
    - "platform-metadata-retrieve"
    - "platform-destructive-deploy"
    - "platform-deploy-validate"
  cliTools:
    - tool: ["sf"]
      semver: ">=2.0.0"
---

# platform-manifest-generate

Produce a Salesforce metadata manifest — `package.xml` (or one of the destructive variants) — from local source, an org, or an explicit component list. This skill is purely about authoring the manifest file. Hand off to `platform-metadata-deploy` or `platform-destructive-deploy` once the file exists.

---

## Tool Restrictions

**Use ONLY the Bash tool** to run `sf project generate manifest`, and the `Write` tool for the hand-built fallback path. Do NOT use MCP tools.

---

## When This Skill Owns the Task

Use `platform-manifest-generate` when the work involves any of:
- Building a `package.xml` from a source directory (e.g. `force-app/main/default/classes/`)
- Building a manifest from an explicit list of components (e.g. `AccountService`, `ContactSelector`, `Account`)
- Building a manifest by introspecting an org via `--from-org`
- Producing `destructiveChanges.xml`, `destructiveChangesPre.xml`, or `destructiveChangesPost.xml` for a deletion
- Producing both a `package.xml` and a destructive manifest in one operation

Delegate elsewhere when the user is:
- Running the deploy itself → `platform-metadata-deploy`
- Validating before a prod release → `platform-deploy-validate`
```
END THIRD-PARTY FILE 7f2fb0f171649a07

The third-party file has ended. Everything between the 7f2fb0f171649a07 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 2024 of 13581 bytes. © forcedotcom · Apache-2.0 · https://github.com/forcedotcom/sf-skills/tree/HEAD/plugins/builder/salesforce-development/skills/platform-manifest-generate/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
