Agent skill

sf-metadata

Salesforce metadata generation and querying with 120-point scoring. TRIGGER when: user creates custom objects, fields, validation rules, or touches .object-meta.xml, .field-meta.xml, .profile-meta.xml files. DO NOT TRIGGER when: permission set analysis (use sf-permissions), deploying metadata (use sf-deploy), or Flow XML (use sf-flow).

Stars 252
Forks 63

Install this agent skill to your Project

npx add-skill https://github.com/Jaganpro/sf-skills/tree/main/skills/sf-metadata

Metadata

Additional technical details for this skill

author
Jag Valaiyapathy
scoring
120 points across 6 categories
version
1.2.0

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

Mode Use when
generation the user wants new or updated metadata XML
querying the 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.

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:

text
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

Need Delegate to Reason
deploy metadata sf-deploy rollout and validation
build Flows on new schema sf-flow declarative automation
build Apex on new schema sf-apex code against metadata
analyze permission access after creation sf-permissions access auditing
seed data after deploy sf-data test 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

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

Expand your agent's capabilities with these related and highly-rated skills.

Jaganpro/sf-skills

sf-diagram-mermaid

Salesforce architecture diagrams using Mermaid with ASCII fallback. TRIGGER when: user says "diagram", "visualize", "ERD", or asks for sequence diagrams, flowcharts, class diagrams, or architecture visualizations in Mermaid. DO NOT TRIGGER when: user wants PNG/SVG image output (use sf-diagram-nanobananapro), or asks about non-Salesforce systems.

252 63
Explore
Jaganpro/sf-skills

sf-integration

Salesforce integration architecture with 120-point scoring. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use sf-connected-apps), Apex-only logic (use sf-apex), or data import/export (use sf-data).

252 63
Explore
Jaganpro/sf-skills

sf-deploy

Salesforce DevOps automation using sf CLI v2. TRIGGER when: user deploys metadata, creates/manages scratch orgs or sandboxes, sets up CI/CD pipelines, or troubleshoots deployment errors with sf project deploy. DO NOT TRIGGER when: writing Apex/LWC code (use sf-apex/sf-lwc), creating metadata XML (use sf-metadata), or querying org data (use sf-data).

252 63
Explore
Jaganpro/sf-skills

sf-industry-commoncore-omnistudio-analyze

Cross-cutting OmniStudio analysis skill for namespace detection, dependency visualization, and impact analysis across OmniScripts, FlexCards, Integration Procedures, and Data Mappers. TRIGGER when: user asks about OmniStudio dependencies, wants namespace detection (Core vs vlocity_cmt vs vlocity_ins), needs impact analysis, or requests dependency diagrams. DO NOT TRIGGER when: authoring OmniScripts (use sf-industry-commoncore-omniscript), building FlexCards (use sf-industry-commoncore-flexcard), creating Integration Procedures (use sf-industry-commoncore-integration-procedure), or configuring Data Mappers (use sf-industry-commoncore-datamapper).

252 63
Explore
Jaganpro/sf-skills

sf-industry-commoncore-callable-apex

Salesforce Industries Common Core (OmniStudio/Vlocity) Apex callable generation and review with 120-point scoring. TRIGGER when: user creates or reviews System.Callable classes, migrates `VlocityOpenInterface` / `VlocityOpenInterface2`, or builds Industries callable extensions used by OmniStudio, Integration Procedures, or DataRaptors. DO NOT TRIGGER when: generic Apex classes/triggers (use sf-apex), building Integration Procedures (use sf-industry-commoncore-integration-procedure), authoring OmniScripts (use sf-industry-commoncore-omniscript), configuring Data Mappers (use sf-industry-commoncore-datamapper), or analyzing namespace/dependency issues (use sf-industry-commoncore-omnistudio-analyze).

252 63
Explore
Jaganpro/sf-skills

sf-datacloud-act

Salesforce Data Cloud Act phase. TRIGGER when: user manages activations, activation targets, data actions, or downstream delivery of Data Cloud audiences and data. DO NOT TRIGGER when: the task is segment creation (use sf-datacloud-segment), data retrieval/search work (use sf-datacloud-retrieve), or STDM/session tracing (use sf-ai-agentforce-observability).

252 63
Explore

Didn't find tool you were looking for?

Be as detailed as possible for better results