Featured

Deploy OpenClaw in 60 seconds — 20% off logoDeploy OpenClaw in 60 seconds — 20% off

Launch OpenClaw on Hostinger in about 60 seconds and keep your agent live 24/7. Our referral link gives you 20% off, no coupon code needed.

Launch on Hostinger
Run your Hermes agent on Hostinger, fully managed logoRun your Hermes agent on Hostinger, fully managed

Launch Hermes on Hostinger in one click, fully managed, no VPS knowledge needed. Use code ZACAARON10 for 10% off.

Launch on Hostinger
Crawl and scrape any site into clean data, 10% off logoCrawl and scrape any site into clean data, 10% off

Firecrawl crawls and scrapes any site into clean markdown for your agent. Get 1,000 free credits, and new users get 10% off their first purchase.

Try Firecrawl free
Your own AI agent, running 24/7 with QwikClaw logoYour own AI agent, running 24/7 with QwikClaw

QwikClaw sets up and runs an always-on OpenClaw agent for you. One click, no config files, no server setup.

Deploy now
One API to scrape, enrich, and extract the internet. logoOne API to scrape, enrich, and extract the internet.

Context.dev gives your agents a single API to scrape, enrich, and extract live web data — no proxies, no parsers, no maintenance.

Start building free
SetupClaw: done-for-you OpenClaw for founders & exec teams logoSetupClaw: done-for-you OpenClaw for founders & exec teams

White-glove OpenClaw for founders and exec teams (4–50+ employees): we install, harden, integrate your tools, and maintain it — secured from day one.

Get it set up for you
SEO data APIs for your agent, $1 free credit logoSEO data APIs for your agent, $1 free credit

DataForSEO gives your agent live access to SERP results, keyword data, backlinks, and on-page SEO data through one API. New accounts get a $1 credit, good for up to 20,000 keyword or backlink lookups.

Try DataForSEO free
Reach 47,000+ AI builders

A flat monthly placement in front of developers actively installing AI tools. No lock-in, cancel anytime.

Advertise here

Installation

npx skills add https://github.com/jaganpro/sf-skills --skill sf-metadata

Summary

>

SKILL.md

sf-metadata: Salesforce Metadata Generation and Org Querying

Use this skill when the user needs metadata definition or org metadata discovery: custom objects, fields, validation rules, record types, page layouts, permission sets, or schema inspection with sf CLI.

When This Skill Owns the Task

Use sf-metadata when the work involves:

  • object, field, validation rule, record type, layout, profile, or permission-set metadata
  • .object-meta.xml, .field-meta.xml, .profile-meta.xml, and related metadata files
  • describing schema before coding or Flow work
  • generating metadata XML from requirements

Delegate elsewhere when the user is:

  • analyzing permission access rather than defining metadata → sf-permissions
  • deploying metadata → sf-deploy
  • editing Flow XML → sf-flow

---

Required Context to Gather First

Ask for or infer:

  • whether the user wants generation or querying
  • metadata type(s) involved
  • target object / field / package directory
  • target org alias if querying is required
  • whether new custom objects or fields should also include permission-set / FLS generation

Unless the user explicitly opts out, assume new custom objects or fields need permission-set follow-up.

---

Recommended Workflow

1. Choose the mode

ModeUse when
generationthe user wants new or updated metadata XML
queryingthe user needs object / field / metadata discovery

2. Start from templates or CLI describe data

For generation, use the assets under:

  • assets/objects/
  • assets/fields/
  • assets/permission-sets/
  • assets/profiles/
  • assets/record-types/
  • assets/validation-rules/
  • assets/layouts/

For querying, prefer sf metadata and sobject describe commands.

Recent SDR/CLI support worth knowing when reading older examples: CnfgItemSourceDefinition, ExtlClntAppOauthSecuritySettings, and UIBundle are now source-supported under their current names. See references/metadata-types-reference.md.

3. Validate metadata quality

Check:

  • naming conventions
  • structural correctness
  • field-type fit
  • security / FLS implications
  • downstream deployment dependencies

4. Plan permission impact by default

When new custom fields or objects are created:

  • default to generating or updating a Permission Set unless the user opts out
  • include fieldPermissions for eligible custom fields
  • note any metadata categories that are excluded because Salesforce treats them as system-managed or always-available
  • remember that object CRUD alone does not make custom fields visible

5. Hand off deployment

Use sf-deploy when the user needs the metadata rolled out.

---

High-Signal Rules

  • field-level security is often the hidden blocker after deployment
  • object permissions ≠ field permissions
  • prefer permission sets over profile-centric access patterns
  • generate Permission Set follow-up by default for new custom objects and fields
  • include fieldPermissions for eligible custom fields instead of leaving FLS as a manual afterthought
  • avoid hardcoded IDs in formulas or metadata logic
  • validation rules should have intentional bypass strategy when operationally necessary
  • create metadata before attempting Flow or data tasks that depend on it

---

Output Format

When finishing, report in this order:

  1. Metadata created or queried
  2. Files created or updated
  3. Key schema/security decisions
  4. Permission / layout follow-ups
  5. Deploy next step

Suggested shape:

Metadata task: <generate / query>
Items: <objects, fields, rules, layouts, permsets>
Files: <paths>
Notes: <naming, field types, security, dependencies>
Next step: <deploy, assign permset, or verify in Setup>

---

Cross-Skill Integration

NeedDelegate toReason
deploy metadatasf-deployrollout and validation
build Flows on new schemasf-flowdeclarative automation
build Apex on new schemasf-apexcode against metadata
analyze permission access after creationsf-permissionsaccess auditing
seed data after deploysf-datatest data creation

---

Reference Map

Start here

  • references/field-and-cli-reference.md
  • references/metadata-types-reference.md
  • references/naming-conventions.md
  • references/orchestration.md

Security / scoring / examples

  • references/fls-best-practices.md
  • references/permset-auto-generation.md
  • references/best-practices-scoring.md
  • references/field-types-guide.md
  • references/field-types-example.md
  • references/custom-object-example.md
  • references/permission-set-example.md
  • references/profile-permission-guide.md
  • references/sf-cli-commands.md
  • assets/

---

Score Guide

ScoreMeaning
108+strong production-ready metadata
96–107good metadata with minor review items
84–95acceptable but validate carefully
< 84block deployment until corrected

Recommended skills

Browse all →

Related guides

Hand-picked reading to help you choose, install, and use agent skills.