Skip to content
Back to skills

Create Lwc Tab

ASecurity

Creates a new Lightning Web Component with a tab and flexipage for display. Use when you need to create a new standalone page/tab with an LWC component.

  • 666 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added February 8, 2026
developmentjavascriptjavabashapi

Works with

  • api

Security analysis

A100/100

Scanned February 12, 2026

npx -y skills add majiayu000/claude-skill-registry --skill create-lwc-tab --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Create Lwc Tab?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Create Lwc Tab
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/majiayu000-create-lwc-tab/badge)](https://www.skillsdirectory.com/skills/majiayu000-create-lwc-tab)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: create-lwc-tab
description: Creates a new Lightning Web Component with a tab and flexipage for display. Use when you need to create a new standalone page/tab with an LWC component.
allowed-tools: Write, Bash, Read, Glob
---

# Create LWC with Tab

Creates a new Lightning Web Component along with the necessary tab and flexipage metadata to make it accessible as a standalone page.

## Arguments

`$ARGUMENTS` should be the component name in camelCase (e.g., `pledgeList`)

## Files to Create

### 1. LWC Component

Create directory: `force-app/main/default/lwc/{componentName}/`

**{componentName}.js**:
```javascript
import { LightningElement } from 'lwc';

export default class ComponentName extends LightningElement {
    // Component logic
}
```

**{componentName}.html**:
```html
<template>
    <!-- Component template -->
</template>
```

**{componentName}.js-meta.xml**:
```xml
<?xml version="1.0" encoding="UTF-8"?>
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
    <apiVersion>62.0</apiVersion>
    <isExposed>true</isExposed>
    <targets>
        <target>lightning__Tab</target>
        <target>lightning__AppPage</target>
        <target>lightning__HomePage</target>
    </targets>
</LightningComponentBundle>
```

### 2. Custom Tab (Optional)

Create: `force-app/main/default/tabs/{TabName}.tab-meta.xml`

```xml
<?xml version="1.0" encoding="UTF-8"?>
<CustomTab xmlns="http://soap.sforce.com/2006/04/metadata">
    <label>Tab Label</label>
    <lwcComponent>{componentName}</lwcComponent>
    <motif>Custom70: Handsaw</motif>
</CustomTab>
```

### 3. Lightning App Page (Recommended)

Create: `force-app/main/default/flexipages/{Page_Name}.flexipage-meta.xml`

**Important**: Component instances MUST have an `<identifier>` element or deployment fails.

```xml
<?xml version="1.0" encoding="UTF-8"?>
<FlexiPage xmlns="http://soap.sforce.com/2006/04/metadata">
    <flexiPageRegions>
        <itemInstances>
            <componentInstance>
                <componentName>c:{componentName}</componentName>
                <identifier>{componentName}1</identifier>
            </componentInstance>
        </itemInstances>
        <name>main</name>
        <type>Region</type>
    </flexiPageRegions>
    <masterLabel>Page Label</masterLabel>
    <template>
        <name>flexipage:defaultAppHomeTemplate</name>
    </template>
    <type>AppPage</type>
</FlexiPage>
```

## Deploy

```bash
sf project deploy start \
  --source-dir force-app/main/default/lwc/{componentName} \
  --source-dir force-app/main/default/flexipages/{Page_Name}.flexipage-meta.xml \
  --target-org lubavitchrv_partial \
  --wait 10
```

## After Deployment

New flexipages require activation before appearing in App Launcher. Use the `activate-lightning-page` skill if needed.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.