PranavNagrecha/AwesomeSalesforceSkills / skills/admin/data-model-documentation
data-model-documentation
VerifiedUse when a BA or admin needs to document the Salesforce data model: creating field inventories, object relationship maps, ER diagrams, or analyzing field usage across objects. Triggers: 'data dictionary', 'document our data model', 'object relationship map', 'field inventory', 'ER diagram for Salesforce'. NOT for designing the model or choosing lookup vs master-detail — use data/data-model-design-patterns. NOT for generating the Mermaid or PlantUML diagram — use architect/salesforce-erd-and-diagramming. More trigger keywords: field inventory CSV, describe API, getGlobalDescribe, DescribeFieldResult, sObject describe, schema snapshot, schema drift, blank field descriptions, undocumented fields, field ownership, data dictionary review cadence.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 23.7 KB |
| references/examples.md | markdown | 6.4 KB |
| references/gotchas.md | markdown | 15.4 KB |
| references/llm-anti-patterns.md | markdown | 7.0 KB |
| references/well-architected.md | markdown | 6.9 KB |
| references/worked-examples.md | markdown | 21.9 KB |
| scripts/check_data_model_documentation.pyexecutable | script | 16.3 KB |
| templates/data-dictionary.yaml | config | 2.0 KB |
| templates/data-model-documentation-template.md | markdown | 3.3 KB |
templates/data-model-documentation-template.md
View on GitHub# Data Model Documentation — Work Template
Use this template to produce a complete data model documentation package for a Salesforce org or a scoped set of objects.
This is the **human-facing** document. The machine-lintable companion is `data-dictionary.yaml`, checked by
`scripts/check_data_model_documentation.py --file`; fill that one first and derive the tables below from it,
so the two cannot drift. The generators that populate both are in `references/worked-examples.md`.
---
## Scope
**Objects in scope:** (list each object API name)
**Requested format:** Field inventory / ER diagram / relationship map / data dictionary / all of the above
**Audience:** Developer / Business stakeholder / Integration partner / Audit/compliance
**Source:** Live org Setup access / Metadata API retrieve / Both
---
## Object Inventory
For each object in scope:
| Object Label | Object API Name | Type (Standard/Custom) | Description / Business Purpose |
|---|---|---|---|
| | | | |
---
## Field Inventory
Repeat this table per object, or use a combined table with an Object column.
**Object: `<ObjectName>`**
| Field Label | API Name | Type | Required | External ID | Description | Owner/Team | Notes |
|---|---|---|---|---|---|---|---|
| | | | | | | | |
Columns explained:
- **Type**: Text, Number, Date, Lookup(Object), Master-Detail(Object), Picklist, Formula, etc.
- **Required**: Yes / No
- **External ID**: Yes / No — marks fields used as integration keys
- **Description**: The field's documented purpose (from metadata Description property)
- **Owner/Team**: Which team or system uses this field
- **Notes**: Deprecated, in-use, being migrated, etc.
---
## Object Relationship Map
| Parent Object | Relationship Type | Child Object | Relationship Field API Name | Cascade Delete? |
|---|---|---|---|---|
| | Lookup | | | No |
| | Master-Detail | | | Yes |
| | Junction (via) | | | — |
**Polymorphic lookups (document separately):**
| Field | Parent Object | Valid Target Objects |
|---|---|---|
| Task.WhoId | Task | Contact, Lead |
| Task.WhatId | Task | Account, Opportunity, Case, Contract, ... |
---
## ER Diagram
*(Attach Schema Builder screenshot or draw.io export here)*
Annotations:
- Bold/thick lines = Master-Detail (cascade delete)
- Thin lines = Lookup (no cascade)
- Dashed lines = Polymorphic lookup (multiple valid targets)
---
## Documentation Debt — Fields With No Description
The following custom fields have empty Description values and require documentation:
| Object | Field API Name | Type | Assigned To |
|---|---|---|---|
| | | | |
---
## FLS Summary (if in scope)
For sensitive fields, document which permission sets grant access:
| Object | Field API Name | Read Access (Permission Sets) | Edit Access (Permission Sets) |
|---|---|---|---|
| | | | |
---
## Delivery Checklist
- [ ] All in-scope objects and their custom fields are in the field inventory
- [ ] Standard fields on standard objects noted from Object Reference (not from metadata retrieve)
- [ ] All relationship fields show parent object, relationship type, and cascade behavior
- [ ] Polymorphic lookups documented separately
- [ ] ER diagram attached and reviewed against the field inventory
- [ ] Documentation debt list produced and assigned
- [ ] FLS summary completed for any sensitive fields (if required by scope)
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| deprecation-and-migrationaddyosmani/agent-skillsManages deprecation and migration. Use when removing old systems, APIs, or features. Use when migrating users from one implementation to another. Use when migrating a database schema in production, such as renaming or dropping a column without downtime (expand/contract). Use when deciding whether to maintain or sunset existing code. | Stars: 119k | Updated | Claude CodeCodex | Verified | Install |
| performance-optimizationaddyosmani/agent-skillsOptimizes application performance across frontend, backend, queries, and databases. Use when performance requirements exist, when you suspect performance regressions, when Core Web Vitals or load times need improvement, when N+1 query patterns need fixing, or when profiling reveals bottlenecks. | Stars: 119k | Updated | Claude CodeCodex | Verified | Install |
| agent-cost-reportthedotmack/claude-memBelievable agent cost report for any period, default the last 7 full days PT, not counting today. Measured tokens from Claude Code transcripts priced at OpenRouter list prices (ESTIMATED), measured provider spend when a sanctioned source exists, note-taker cost separate, Timing-style HTML/PDF plus report.json, line-items.csv, evidence.json. | Stars: 118k | Updated | Claude CodeCodex | Verified | Install |
| agent-cost-reportthedotmack/claude-memBelievable agent cost report for any period, default the last 7 full days PT, not counting today. Measured tokens from Claude Code transcripts priced at OpenRouter list prices (ESTIMATED), measured provider spend when a sanctioned source exists, note-taker cost separate, Timing-style HTML/PDF plus report.json, line-items.csv, evidence.json. | Stars: 118k | Updated | Claude CodeCodex | Verified | Install |