/platform-manifest-generate
Use this skill to generate a package.xml (and optionally destructiveChanges.xml, destructiveChangesPre.xml, or destructiveChangesPost.xml) from a local source directory, an explicit component list, or org introspection. Trigger when the user says \"generate a package.xml from
$ npx -y skills add forcedotcom/sf-skills --skill platform-manifest-generate --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/platform-manifest-generate
Context preview
The summary Claude sees to decide when to auto-load this skill.
Use this skill to generate a package.xml (and optionally destructiveChanges.xml, destructiveChangesPre.xml, or destructiveChangesPost.xml) from a local source directory, an explicit component list, or org introspection. Trigger when the user says \"generate a package.xml from
SKILL.md
platform-manifest-generate.SKILL.mdname: platform-manifest-generate
description: "Use this skill to generate a package.xml (and optionally destructiveChanges.xml, destructiveChangesPre.xml, or destructiveChangesPost.xml) from a local source directory, an explicit component list, or org introspection. Trigger when the user says \"generate a package.xml from this folder\", \"create a manifest for these classes\", \"I need a deploy manifest\", \"build package.xml for the contacts changes\", or \"create both package.xml and destructiveChanges.xml for these deletions\". Encodes which metadata types accept a wildcard member and which must be enumerated, avoiding the common \"Wildcards are not supported for this metadata type\" deploy failure. DO NOT TRIGGER for executing a deploy (use platform-metadata-deploy), performing the deletion in destructiveChanges.xml (use platform-destructive-deploy), or retrieving metadata (use 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`
- Executing the destructive deploy → `platform-destructive-deploy` (that skill **uses** the manifest this skill **generates**)
- Retrieving metadata to local → `platform-metadata-retrieve`
---
Two Generation Paths
Path A — CLI-driven (recommended)
Wrap `sf project generate manifest`. Always prefer this path; it knows about every metadata type and produces canonical XML — and never emits `*`, sidestepping the wildcard hazard entirely.
The CLI offers three input modes (mutually exclusive):
| Input | Flag | Use when | |---|---|---| | Source directory | `--source-dir` (`-p`) | User points to a folder containing already-on-disk metadata | | Component list | `--metadata` (`-m`) | User names specific components, e.g. `ApexClass:AccountService CustomObject:Account` | | Org introspection | `--from-org` | User wants every component currently in an org (or a filtered subset) |
You can specify either `--source-dir` or `--metadata`, not both. `--from-org` may be combined with `--metadata` (filter included types) or `--excluded-metadata` (filter out types).
**Verified flags** (do not invent flags — verify with `sf project generate manifest --help` if unsure):
| Flag | Purpose | |---|---| | `--source-dir`, `-p` | Local source paths to scan | | `--metadata`, `-m` | Component names to include (e.g. `ApexClass:AccountService`) | | `--from-org` | Username or alias of org to introspect | | `--name`, `-n` | Custom output filename (mutually exclusive with `--type`) | | `--type`, `-t` | Predefined manifest kind: `package` \| `pre` \| `post` \| `destroy` | | `--output-dir`, `-d` | Directory to write the manifest into | | `--api-version` | Override the API version for the request | | `--include-packages`, `-c` | Include `managed` and/or `unlocked` package metadata when using `--from-org` | | `--excluded-metadata` | Types to exclude when using `--from-org` | | `--json` | Machine-readable output |
**Manifest filename by `--type`:**
| `--type` | Output file | |---|---| | `package` (default) | `package.xml` | | `pre` | `destructiveChangesPre.xml` | | `post` | `destructiveChangesPost.xml` | | `destroy` | `destructiveChanges.xml` |
You can specify either `--type` or `--name`, not both.
Canonical CLI examples
# Build package.xml from a source dir
sf project generate manifest \
--source-dir force-app/main/default \
--name package.xml \
--output-dir manifest \
--json
# Build package.xml from an explicit component list
sf project generate manifest \
--metadata ApexClass:AccountService \
--metadata ApexClass:ContactSelector \
--metadata CustomObject:Account \
--name package.xml \
--output-dir manifest \
--json
# Build destructiveChanges.xml from a component list
sf project generate manifest \
--metadata CustomField:Account.OldField__c \
--metadata CustomField:Account.OldStatus__c \
--type destroy \
--output-dir manifest \
--json
# Build a manifest by introspecting an org (filtered)
sf project generate manifest \
--from-org <alias> \
--metadata ApexClass,CustomObject,CustomLabels \
--output-dir manifest \
--json
If both a `package.xml` and a destructive manifest are needed, run the CLI twice — once with `--type package` (or default), once with `--type destroy` / `pre` / `post`.
Path B — Hand-built fallback
Use this only when the CLI cannot express the user's intent — e.g. they want "just the Apex classes I changed today" and the change set is derived from `git diff` rather than a clean directory or component list. In that case:
1. Resolve the components yourself (e.g. parse `git diff --name-
Read more
name: platform-manifest-generate
description: "Use this skill to generate a package.xml (and optionally destructiveChanges.xml, destructiveChangesPre.xml, or destructiveChangesPost.xml) from a local source directory, an explicit component list, or org introspection. Trigger when the user says \"generate a package.xml from this folder\", \"create a manifest for these classes\", \"I need a deploy manifest\", \"build package.xml for the contacts changes\", or \"create both package.xml and destructiveChanges.xml for these deletions\". Encodes which metadata types accept a wildcard member and which must be enumerated, avoiding the common \"Wildcards are not supported for this metadata type\" deploy failure. DO NOT TRIGGER for executing a deploy (use platform-metadata-deploy), performing the deletion in destructiveChanges.xml (use platform-destructive-deploy), or retrieving metadata (use 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`
- Executing the destructive deploy → `platform-destructive-deploy` (that skill **uses** the manifest this skill **generates**)
- Retrieving metadata to local → `platform-metadata-retrieve`
---
Two Generation Paths
Path A — CLI-driven (recommended)
Wrap `sf project generate manifest`. Always prefer this path; it knows about every metadata type and produces canonical XML — and never emits `*`, sidestepping the wildcard hazard entirely.
The CLI offers three input modes (mutually exclusive):
| Input | Flag | Use when | |---|---|---| | Source directory | `--source-dir` (`-p`) | User points to a folder containing already-on-disk metadata | | Component list | `--metadata` (`-m`) | User names specific components, e.g. `ApexClass:AccountService CustomObject:Account` | | Org introspection | `--from-org` | User wants every component currently in an org (or a filtered subset) |
You can specify either `--source-dir` or `--metadata`, not both. `--from-org` may be combined with `--metadata` (filter included types) or `--excluded-metadata` (filter out types).
**Verified flags** (do not invent flags — verify with `sf project generate manifest --help` if unsure):
| Flag | Purpose | |---|---| | `--source-dir`, `-p` | Local source paths to scan | | `--metadata`, `-m` | Component names to include (e.g. `ApexClass:AccountService`) | | `--from-org` | Username or alias of org to introspect | | `--name`, `-n` | Custom output filename (mutually exclusive with `--type`) | | `--type`, `-t` | Predefined manifest kind: `package` \| `pre` \| `post` \| `destroy` | | `--output-dir`, `-d` | Directory to write the manifest into | | `--api-version` | Override the API version for the request | | `--include-packages`, `-c` | Include `managed` and/or `unlocked` package metadata when using `--from-org` | | `--excluded-metadata` | Types to exclude when using `--from-org` | | `--json` | Machine-readable output |
**Manifest filename by `--type`:**
| `--type` | Output file | |---|---| | `package` (default) | `package.xml` | | `pre` | `destructiveChangesPre.xml` | | `post` | `destructiveChangesPost.xml` | | `destroy` | `destructiveChanges.xml` |
You can specify either `--type` or `--name`, not both.
Canonical CLI examples
# Build package.xml from a source dir sf project generate manifest \ --source-dir force-app/main/default \ --name package.xml \ --output-dir manifest \ --json # Build package.xml from an explicit component list sf project generate manifest \ --metadata ApexClass:AccountService \ --metadata ApexClass:ContactSelector \ --metadata CustomObject:Account \ --name package.xml \ --output-dir manifest \ --json # Build destructiveChanges.xml from a component list sf project generate manifest \ --metadata CustomField:Account.OldField__c \ --metadata CustomField:Account.OldStatus__c \ --type destroy \ --output-dir manifest \ --json # Build a manifest by introspecting an org (filtered) sf project generate manifest \ --from-org <alias> \ --metadata ApexClass,CustomObject,CustomLabels \ --output-dir manifest \ --json
If both a `package.xml` and a destructive manifest are needed, run the CLI twice — once with `--type package` (or default), once with `--type destroy` / `pre` / `post`.
Path B — Hand-built fallback
Use this only when the CLI cannot express the user's intent — e.g. they want "just the Apex classes I changed today" and the change set is derived from `git diff` rather than a clean directory or component list. In that case:
1. Resolve the components yourself (e.g. parse `git diff --name-
This repository provides a curated collection of Salesforce agent skills for building applications.
Repo: forcedotcom/sf-skills
Other skills on sf-skills.
- /agentforce-generate
Build, modify, optimize, debug, and deploy agents with Agentforce Agent Script. TRIGGER when: user creates, modifies, optimizes, or asks about .agent files or aiAuthoringBundle metadata; changes agent behavior, responses, or conversation logic; designs agent actions, tools,
Open skill - /agentforce-observe
Analyze production Agentforce agent behavior using session traces and Data Cloud. TRIGGER when: user queries STDM session data or Data Cloud trace records; investigates production agent failures, regressions, or performance issues; asks about session traces, conversation logs,
Open skill - /agentforce-test
Write, run, and analyze structured test suites for Agentforce agents — functional AND security. TRIGGER when: user writes or modifies test spec YAML (AiEvaluationDefinition); runs sf agent test create, run, run-eval, or results commands; asks about test coverage strategy, metric
Open skill - /automation-flow-generate
Generate Salesforce Flows using the MCP tool execute_metadata_action. Use when the user asks to create, build, or generate a flow — including Screen, Autolaunched, Record-Triggered (before/after-save), Scheduled. Also trigger for flow-like requests such as \"when a record is
Open skill - /dx-code-analyzer-configure
Set up, configure, and troubleshoot Salesforce Code Analyzer for any project. Handles installation, prerequisite checks, diagnosing broken setups, creating and editing code-analyzer.yml overrides, engine-specific settings, ignore patterns, severity overrides, and CI/CD pipeline
Open skill - /dx-code-analyzer-custom-rule-create
Create custom Code Analyzer rules for Regex (pattern matching), PMD (XPath/AST for Apex and metadata XML), and ESLint (LWC/JavaScript/TypeScript). Use when users want to enforce coding standards, ban patterns, detect hardcoded values, govern metadata, or add rules not in the
Open skill

