PluginBench
Skill
Pass
Audit score 90

generating-custom-tab

forcedotcom/sf-skills

How to install generating-custom-tab

npx skills add https://github.com/forcedotcom/sf-skills --skill generating-custom-tab
Claude Code
Cursor
Windsurf
Cline
Full instructions (SKILL.md)

Source of truth, from forcedotcom/sf-skills.


name: generating-custom-tab description: "Use this skill when users need to create or configure Salesforce Custom Tabs. Trigger when users mention tabs, navigation tabs, object tabs, web tabs, Visualforce tabs, Lightning component tabs, app page tabs, or tab configuration. Also use when users want to add navigation to custom objects, create tabs for external content, or set up Lightning page tabs. Always use this skill for any custom tab work." metadata: version: "1.0"

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 TypeONLY 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 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 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>:
<CustomTab xmlns="http://soap.sforce.com/2006/04/metadata">
    <sobjectName>Space_Station__c</sobjectName>  <!-- DEPLOYMENT ERROR -->
    <label>Space Station</label>                  <!-- DEPLOYMENT ERROR on object tabs -->
    <customObject>true</customObject>
    <motif>Custom57: Desert</motif>
</CustomTab>

Web Tabs

  • Purpose: Link to external websites or web applications
  • File name: Use a descriptive name: {TabName}.tab-meta.xml (e.g., Knowledge_Base.tab-meta.xml)
  • COPY THIS EXACT TEMPLATE โ€” only replace the placeholder values. Do NOT add, remove, or rename any XML elements:
<?xml version="1.0" encoding="UTF-8"?>
<CustomTab xmlns="http://soap.sforce.com/2006/04/metadata">
    <customObject>false</customObject>
    <description>REPLACE_WITH_DESCRIPTION</description>
    <frameHeight>600</frameHeight>
    <label>REPLACE_WITH_LABEL</label>
    <motif>REPLACE_WITH_MOTIF</motif>
    <url>REPLACE_WITH_URL</url>
    <urlEncodingKey>UTF-8</urlEncodingKey>
</CustomTab>
  • These 7 elements above are the ONLY elements allowed in a web tab file. Do not add ANY other elements.
  • The <description> element is optional โ€” you may remove it if not needed, but do not add anything else.

Visualforce Tabs

  • Purpose: Access custom Visualforce pages
  • File name: {TabName}.tab-meta.xml (e.g., Custom_Page_Tab.tab-meta.xml)
  • Required elements: <customObject>false</customObject>, <label>, <motif>, <page>
  • Correct example:
<?xml version="1.0" encoding="UTF-8"?>
<CustomTab xmlns="http://soap.sforce.com/2006/04/metadata">
    <customObject>false</customObject>
    <label>Custom Page</label>
    <motif>Custom46: Computer</motif>
    <page>CustomPage</page>
</CustomTab>

๐ŸŽจ Tab Configuration

Tab Style

  • Default: Use standard tab styling
  • Custom: Can specify custom tab styles if needed

Tab Visibility

  • Default: Visible to all users with access
  • Custom: Can be configured for specific user profiles

๐Ÿ“ฑ Supported Applications

  • Standard Apps: Available in standard Salesforce applications
  • Custom Apps: Can be included in custom applications
  • Community Apps: Available in community applications

๐Ÿ”— Integration Points

  • Object Relationships: Links to related object records
  • Web Content: External website integration
  • Visualforce Pages: Custom page functionality
  • Lightning Components: Modern component integration

โœ… Best Practices

  • Use clear, descriptive tab labels
  • Choose appropriate tab types for functionality
  • Select a unique, contextually relevant motif for each tab โ€” do not default every tab to the same icon
  • Consider user experience and navigation flow
  • Test tab functionality across different applications
  • Ensure proper permissions and visibility settings
  • Follow consistent naming conventions
  • Object tab files MUST only contain <customObject>true</customObject> and <motif> โ€” nothing else
  • Web tab files MUST only contain: <customObject>false</customObject>, <label>, <motif>, <url>, <urlEncodingKey>, and optionally <description>, <frameHeight> โ€” nothing else
  • Never include <isHidden>, <tabVisibility>, <type>, <mobileReady>, or empty elements

Related skills

More from forcedotcom/sf-skills and the wider catalog.

GE

generating-apex

forcedotcom/sf-skills

Primary Apex authoring skill for class generation, refactoring, and review. ALWAYS ACTIVATE when the user mentions Apex, .cls, triggers, or asks to create/refactor a class (service, selector, domain, batch, queueable, schedulable, invocable, DTO, utility, interface, abstract, exception, REST resource). Use this skill for requests involving SObject CRUD, mapping collections, fetching related records, scheduled jobs, batch jobs, trigger design, @AuraEnabled controllers, @RestResource endpoints, custom REST APIs, or code review of existing Apex.

2.6k installsAudited
GE

generating-apex-test

forcedotcom/sf-skills

Generate and validate Apex test classes with TestDataFactory patterns, bulk testing (251+ records), mocking strategies, assertion best practices, and disciplined test-fix loops. Use this skill when creating new Apex test classes, improving test coverage, debugging and fixing failing Apex tests, running test execution and coverage analysis, or implementing testing patterns for triggers, services, controllers, batch jobs, queueables, and integrations. Triggers on *Test.cls, *_Test.cls files, sf apex run test workflows, coverage reports, test-fix loops. Do NOT trigger for production Apex code (use generating-apex) or Jest/LWC tests.

2.6k installsAudited
GE

generating-lwc-components

forcedotcom/sf-skills

Lightning Web Components with PICKLES methodology and 165-point scoring. Use this skill when the user creates or edits LWC components, builds wire service patterns, or writes Jest tests for LWC. TRIGGER when: user creates/edits LWC components, touches lwc/**/*.js, .html, .css, .js-meta.xml files, or asks about wire service, SLDS, or Jest LWC tests. DO NOT TRIGGER when: Apex classes (use generating-apex), Aura components, or Visualforce.

2.6k installsAudited
GE

generating-flow

forcedotcom/sf-skills

Generate Salesforce Flows using the MCP tool execute_metadata_action. Use when the user asks to create, build, or generate a flow โ€” including Screen, Autolaunched, Record-Triggered (before/after-save), Scheduled. Also trigger for flow-like requests such as \"when a record is created\", \"trigger daily at\", \"send an email when\", \"update the field when\", \"automate\", \"workflow\", or \"flow XML/metadata\". This is the only skill for Salesforce Flow generation.

2.5k installsAudited
QU

querying-soql

forcedotcom/sf-skills

SOQL query generation, optimization, and analysis with 100-point scoring. Use this skill when the user needs SOQL/SOSL authoring or optimization: natural-language-to-query generation, relationship queries, aggregates, query-plan analysis, and performance or safety improvements for Salesforce queries. TRIGGER when: user writes, optimizes, or debugs SOQL/SOSL queries, touches .soql files, or asks about relationship queries, aggregates, or query performance. DO NOT TRIGGER when: bulk data operations (use handling-sf-data), Apex DML logic (use generating-apex), or report/dashboard queries.

2.5k installsAudited
GE

generating-custom-object

forcedotcom/sf-skills

Use this skill when users need to create, generate, or validate Salesforce Custom Object metadata. Trigger when users mention custom objects, creating objects, object metadata, .object files, sharing models, name fields, or validation rules on objects. Also use when users say things like \"create a custom object\", \"generate object metadata\", \"set up an object for...\", or when they're troubleshooting object deployment errors especially around sharing models and Master-Detail relationships. Always use this skill for any custom object metadata work.

2.5k installsAudited