Loading...
Loading...
Generates and queries Salesforce metadata with 120-point scoring. Use when creating custom objects, fields, profiles, permission sets, validation rules, or querying org metadata structures via sf CLI.
npx skill4agent add jaganpro/sf-skills sf-metadata| Need | Document | Description |
|---|---|---|
| PermSet auto-gen | references/permset-auto-generation.md | Phase 3.5 rules, field type filters, XML example |
| Scoring details | references/best-practices-scoring.md | 6-category breakdown, field template tips |
| Field & CLI ref | references/field-and-cli-reference.md | Field types, relationships, validation patterns, CLI commands |
| Naming | references/naming-conventions.md | API name conventions |
| Orchestration | references/orchestration.md | Extended orchestration patterns |
Glob: **/*-meta.xml| Metadata Type | Template |
|---|---|
| Custom Object | |
| Text/Number/Currency/Date/Checkbox Field | |
| Picklist / Multi-Select Picklist | |
| Lookup / Master-Detail | |
| Formula / Roll-Up Summary | |
| Email/Phone/URL/Text Area | |
| Profile / Permission Set | |
| Validation Rule / Record Type / Layout | |
~/.claude/plugins/marketplaces/sf-skills/sf-metadata/assets/[path][project-root]/sf-metadata/assets/[path]| Query Type | Command |
|---|---|
| Describe object | |
| List custom objects | |
| List metadata types | |
See references/field-and-cli-reference.md for complete CLI commands and interactive generation.
force-app/main/default/objects/[ObjectName__c]/[ObjectName__c].object-meta.xmlforce-app/main/default/objects/[ObjectName]/fields/[FieldName__c].field-meta.xmlforce-app/main/default/permissionsets/[PermSetName].permissionset-meta.xmlforce-app/main/default/objects/[ObjectName]/validationRules/[RuleName].validationRule-meta.xmlScore: 105/120 ⭐⭐⭐⭐ Very Good
├─ Structure & Format: 20/20 (100%)
├─ Naming Conventions: 18/20 (90%)
├─ Data Integrity: 15/20 (75%)
├─ Security & FLS: 20/20 (100%)
├─ Documentation: 18/20 (90%)
└─ Best Practices: 14/20 (70%)See references/best-practices-scoring.md for detailed category breakdowns and field template tips.
See references/permset-auto-generation.md for the complete workflow, field type rules, and XML template.
editable: falsesf org assign permset --name [ObjectName]_Access --target-org [alias]See references/best-practices-scoring.md for full criteria.
| From Skill | To sf-metadata | When |
|---|---|---|
| sf-apex | → sf-metadata | "Describe Invoice__c" (discover fields before coding) |
| sf-flow | → sf-metadata | "Describe object fields, record types, validation rules" |
| sf-data | → sf-metadata | "Describe Custom_Object__c fields" (discover structure) |
| From sf-metadata | To Skill | When |
|---|---|---|
| sf-metadata | → sf-deploy | "Deploy with --dry-run" |
| sf-metadata | → sf-flow | After creating objects/fields that Flow will reference |
| Anti-Pattern | Fix |
|---|---|
| Profile-based FLS | Use Permission Sets for granular access |
| Hardcoded IDs in formulas | Use Custom Settings or Custom Metadata |
| Validation rule without bypass | Add |
| Too many picklist values (>200) | Consider Custom Object instead |
| Auto-number without prefix | Add meaningful prefix: |
| No description on custom objects | Always document purpose |
| Insight | Issue | Fix |
|---|---|---|
| FLS is the Silent Killer | Deployed fields invisible without FLS | Always prompt for Permission Set generation |
| Required Fields ≠ Permission Sets | Salesforce rejects required fields in PS | Filter out required fields from fieldPermissions |
| Orchestration Order | sf-data fails if objects not deployed | sf-metadata → sf-flow → sf-deploy → sf-data |
| Error | Fix |
|---|---|
| Remove from fieldPermissions (auto-visible) |
| Create Permission Set with field access |
| Deploy metadata first |
| Reorder XML elements alphabetically |
python3 ~/.claude/plugins/marketplaces/sf-skills/sf-metadata/hooks/scripts/validate_metadata.py <file_path>references/