forcedotcom avatar

Platform Metadata Retrieve

This pulls Salesforce metadata from an org to your local project using the sf CLI. It handles all the common retrieval patterns: grabbing all remote changes, pulling specific directories or metadata types, working from a package.xml manifest, or retrieving by package name. The workflow is straightforward, just runs sf project retrieve start through the Bash tool with the right flags. One thing to remember is that production orgs don't support source tracking, so you can't use the "retrieve all changes" mode there. You'll need to fall back to explicit metadata types or manifests instead. Good coverage of the gotchas like wildcard quoting and flag conflicts.

skills.sh installs
6.9K
GitHub stars
1.2K
last updated
Aug 21, 2026

Install

$ npx -y skills add forcedotcom/sf-skills --skill platform-metadata-retrieve --agent claude-code

Installs into .claude/skills of the current project.

Files

platform-metadata-retrieve

Retrieves metadata from a Salesforce org to your local project using sf project retrieve start. Supports multiple retrieval modes: all changes, by source directory, by metadata type (with wildcards), by manifest, or by package name.


Tool Restrictions

Use ONLY the Bash tool to execute sf project retrieve start. Do NOT use MCP tools — ignore them completely.


Scope

  • In scope: Retrieving metadata via sf project retrieve start in all supported modes (all changes, source-dir, metadata type, manifest, package name), source and metadata format output
  • Out of scope: Deploying metadata (use platform-metadata-deploy), listing metadata types, generating package.xml files, source tracking commands (sf project retrieve preview)

Required Inputs

Infer from the user's request:

  • Retrieval mode: all changes | source directory | metadata type | manifest | package name
  • Target org: org alias/username (uses default if not specified)
  • Output format: source format (default) | metadata format (ZIP)
  • Additional options: ignore conflicts, output directory, wait time, API version

Workflow

Sponsors

Details

Repository
github.com/forcedotcom/sf-skills
Categories
DevOps & CI/CD, Code Review & Quality, AI & Agent Building, Release Management, CLI & Terminal
First seen
Jul 14, 2026

More from forcedotcom/sf-skills

All 158
1forcedotcom avatarplatform-custom-field-generateforcedotcom/sf-skillsUse this skill when users need to create, generate, or validate Salesforce Custom Field metadata. Trigger when users mention custom fields, field types, Roll-up6.8Kskills.sh installs
2pixijs avatarpixijs-createpixijs/pixijs-skillsUse this skill when scaffolding a new PixiJS v8 project with the create-pixi CLI or adding PixiJS to an existing project. Covers npm/yarn/pnpm/bun create comman6.8Kskills.sh installs
3openai avataropenai-docsopenai/skillsUse when the user asks how to build with OpenAI products or APIs, asks about Codex itself or choosing Codex surfaces, needs up-to-date official documentation wi6.8Kskills.sh installs
4wshobson avatarsigned-audit-trails-recipewshobson/agentsStep-by-step cookbook for setting up cryptographically signed audit trails on Claude Code tool calls. Use when explaining, evaluating, or demonstrating the patt6.7Kskills.sh installs
5rorkai avatarasc-crash-triagerorkai/app-store-connect-cli-skillsTriage TestFlight crashes, beta feedback, and performance diagnostics using asc. Use when the user asks about TF crashes, TestFlight crash reports, beta tester 6.6Kskills.sh installs
6mvanhorn avatarprinting-press-reprintmvanhorn/cli-printing-pressRegenerate an existing printed CLI from scratch under the current Printing Press, with prior research, prior novel features, and prior patches (post-publish han6.6Kskills.sh installs