
Generating Custom Tab
Generate and configure Salesforce CustomTab metadata so custom objects, web URLs, Visualforce, and Lightning tabs appear correctly in app navigation.
Overview
generating-custom-tab is an agent skill for the Build phase that creates and configures Salesforce CustomTab metadata for objects, web content, Visualforce, and Lightning navigation.
Install
npx skills add https://github.com/forcedotcom/afv-library --skill generating-custom-tabWhat is this skill?
- CustomTab metadata spec for object, web, Visualforce, Lightning component, and app page tabs
- Covers motif selection, labels, URLs, page references, and visibility/access configuration
- Always-use gate for any tab, navigation tab, or custom object tab request
- Troubleshooting hooks for deployment errors involving CustomTab
- Version 1.0 skill aligned to AFV library packaging patterns
- Metadata skill version 1.0
Adoption & trust: 1.4k installs on skills.sh; 512 GitHub stars; 3/3 security scanners passed (skills.sh audits).
What problem does it solve?
You need Salesforce app tabs for objects or pages but CustomTab metadata rules (motifs, labels, URLs, deployment errors) are easy to get wrong without the spec.
Who is it for?
Indie Salesforce developers or small teams adding or fixing tabs in metadata-driven Salesforce apps.
Skip if: Non-Salesforce web apps, pure LWC-only UI with no tab metadata, or org-wide permission redesign unrelated to tab records.
When should I use this skill?
Users mention tabs, navigation tabs, object tabs, web tabs, Visualforce tabs, Lightning component tabs, app page tabs, tab configuration, or custom object navigation—always for custom tab work.
What do I get? / Deliverables
You produce deployable CustomTab definitions with correct properties and access configuration aligned to your application navigation plan.
- CustomTab metadata files
- Tab visibility and access configuration guidance
- Deployment-oriented troubleshooting notes for tab errors
Recommended Skills
Journey fit
Custom tabs are platform metadata you author while building the Salesforce product surface, not a launch or growth tactic. Tabs wire objects and pages into Salesforce apps—core integration work between your org metadata and user navigation.
How it compares
Salesforce metadata generator skill, not a generic REST API integration or MCP server.
Common Questions / FAQ
Who is generating-custom-tab for?
Builders using AI coding agents to author Salesforce metadata—especially solo developers wiring custom objects and pages into app navigation.
When should I use generating-custom-tab?
Use it during Build integrations whenever you create object tabs, web tabs, Visualforce tabs, Lightning page tabs, or need to fix tab-related deployment failures.
Is generating-custom-tab safe to install?
It guides metadata authoring only; review the Security Audits panel on this Prism page and your org deployment practices before running agent-generated XML.
SKILL.md
READMESKILL.md - Generating Custom Tab
## When to Use This Skill Use this skill when you need to: - Create tabs for objects, web pages, or Visualforce pages - Add navigation tabs to applications - Configure tab visibility and access - Troubleshoot deployment errors related to custom tabs ## Specification # CustomTab Metadata Specification ## 📋 Overview Custom tabs for navigating to objects, web content, or Visualforce pages within Salesforce applications. ## 🎯 Purpose - Provide navigation to custom objects - Link to external web content - Access Visualforce pages - Organize application navigation ## ⚙️ Required Properties ### Core Tab Properties - **customObject**: `true` for custom object tabs, `false` for all others. - **motif**: Tab icon style — choose a motif that semantically matches the object's purpose. Do NOT reuse the same motif for every tab. - **label**: Display name (required for non-object tabs ONLY; object tabs inherit label from the object) - **url**: Web URL (for web tabs) - **page**: Visualforce page name (for Visualforce tabs) ### 🚨 STRICT ELEMENT ALLOWLIST — READ THIS FIRST **The root element MUST always be `<CustomTab>` (NOT `<Tab>`).** The XML namespace must be `xmlns="http://soap.sforce.com/2006/04/metadata"`. Only the elements listed below are valid. **Any element not on this list WILL cause a deployment error.** | Tab Type | ONLY these elements are allowed (nothing else) | |---|---| | **Object tabs** | `<customObject>` (required, set to `true`), `<motif>` (required), `<description>` (optional) | | **Web tabs** | `<customObject>` (required, set to `false`), `<label>` (required), `<motif>` (required), `<url>` (required), `<urlEncodingKey>` (required, set to `UTF-8`), `<description>` (optional), `<frameHeight>` (optional) | | **Visualforce tabs** | `<customObject>` (required, set to `false`), `<label>` (required), `<motif>` (required), `<page>` (required), `<description>` (optional) | ### ⚠️ FORBIDDEN ELEMENTS (every one of these causes a deployment error) `<sobjectName>`, `<name>`, `<fullName>`, `<apiVersion>`, `<isHidden>`, `<tabVisibility>`, `<type>`, `<mobileReady>`, `<urlFrameHeight>`, `<urlType>`, `<urlRedirect>`, `<encodingKey>`, `<height>`, `<auraComponent>` Also forbidden: - `<label>` on object tabs (object tabs inherit their label from the custom object) - `<page>` on web tabs (only for Visualforce tabs) - Empty elements like `<page></page>` or `<description></description>` - Any element not in the allowlist table above ## 🔧 Tab Types ### Object Tabs - **Purpose**: Navigate to custom or standard objects - **File name** determines the object: `{ObjectApiName}.tab-meta.xml` (e.g., `Space_Station__c.tab-meta.xml`) - **Required elements**: `<customObject>true</customObject>` and `<motif>` - **Correct example** (for a Space_Station__c.tab-meta.xml): ```xml <?xml version="1.0" encoding="UTF-8"?> <CustomTab xmlns="http://soap.sforce.com/2006/04/metadata"> <customObject>true</customObject> <motif>Custom39: Telescope</motif> </CustomTab> ``` - **Correct example** (for a Supply__c.tab-meta.xml — note different motif): ```xml <?xml version="1.0" encoding="UTF-8"?> <CustomTab xmlns="http://soap.sforce.com/2006/04/metadata"> <customObject>true</customObject> <motif>Custom98: Truck</motif> </CustomTab> ``` - **❌ WRONG** — do NOT add `<sobjectName>`, `<name>`, `<fullName>`, or `<label>`: ```xml <CustomTab xmlns="http://soap.sforce.com/2006/04/metadata"> <sobjectName>Space_Station__c</sobjectName> <!-- DEPLOYMENT ERROR --> <label>