platform-metadata-retrieve

Retrieve Salesforce metadata from an org to a local project using sf project retrieve start.

Updated Jul 2, 2026
One-click install
npx skills add https://github.com/padjei/SF_Build --skill platform-metadata-retrieve-padjei
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: platform-metadata-retrieve
Source: https://github.com/padjei/SF_Build/tree/main/.claude/skills/platform-metadata-retrieve
Command: npx skills add https://github.com/padjei/SF_Build --skill platform-metadata-retrieve-padjei

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Pulling metadata from a Salesforce org into a local project requires choosing the right retrieval mode, correct flags, and proper quoting of wildcards, and mistakes cause errors like mixed mutually exclusive flags or lost local changes. This Skill maps user intent directly to the correct sf project retrieve start command and handles common failure cases. ## Core Features & Use Cases - Five Retrieval Modes: Retrieve all remote changes, by source directory, by metadata type with wildcards, by manifest (package.xml), or by package name. - Format and Conflict Control: Supports source format output by default, metadata format ZIP with --unzip, custom output directories, and --ignore-conflicts for trackable orgs. - Built-in Troubleshooting: Covers errors such as running outside an SFDX project, unsupported source tracking on production orgs, unquoted wildcards, and retrieve timeouts. - Use Case: A developer needs all Apex classes matching a naming pattern from a sandbox. The Skill runs sf project retrieve start --metadata 'ApexClass:Account*' --target-org my-sandbox --json and reports the retrieved files. ## Quick Start Ask the assistant to retrieve all Apex classes from your sandbox org into the local Salesforce project using this skill.

Frequently Asked Questions about platform-metadata-retrieve

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

FAQPage Schema
How do I retrieve metadata from a Salesforce org to my local project?▼

Run sf project retrieve start with the appropriate mode flag from within your SFDX project. Use --source-dir for directories, --metadata for specific types, --manifest for a package.xml, or no flags to pull all tracked remote changes.

How to retrieve specific Apex classes with a wildcard using Salesforce CLI?▼

Use the --metadata flag with a quoted wildcard pattern, for example sf project retrieve start --metadata 'ApexClass:Account*' --json. Quotes are required because unquoted wildcards are expanded by the shell and retrieve nothing.

Why does sf project retrieve start fail on a production org?▼

Production orgs do not support source tracking, so retrieving all changes with no flags fails. Use --source-dir, --metadata, or --manifest modes instead, which work on all org types.

Can I combine --manifest with --metadata in one retrieve command?▼

No, --manifest is mutually exclusive with --metadata and --source-dir, and combining them causes a command error. Choose a single retrieval mode per execution.

What does --ignore-conflicts do when retrieving Salesforce metadata?▼

The --ignore-conflicts flag overwrites local files even when they have uncommitted changes, but only on source-tracked orgs like scratch orgs and sandboxes. It has no effect on production orgs and should be confirmed with the user first.

How do I retrieve Salesforce metadata as a ZIP file?▼

Add --target-metadata-dir with an output path to retrieve in metadata format as a ZIP, and include --unzip to extract it automatically. You can also set --zip-file-name and --single-package for the archive structure.