Sf metadata

From Jaganpro/sf-skills · View interactive version

Sf metadata is an AI agent skill from the GitHub repository Jaganpro/sf-skills. 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 s

How to use this skill

Skill file

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:

Delegate elsewhere when the user is:


Required Context to Gather First

Ask for or infer:

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:

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:

4. Plan permission impact by default

When new custom fields or objects are created:

5. Hand off deployment

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


High-Signal Rules


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

| 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

Security / scoring / examples


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 |

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.