No slash command · from salesforce-claude-code
Guides building Salesforce Experience Cloud sites including setup, guest user configuration, sharing models, and securing Apex controllers for external access.
Ships in salesforce-claude-code. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
@../_reference/EXPERIENCE_CLOUD.md
| Site Type | Use Case |
|---|---|
| Customer Service | Self-service portal (Knowledge, Cases) |
| Partner Central | Channel partner management (Leads, Opps) |
| Build Your Own (LWR) | Custom branded site, full customization |
| Help Center | Public knowledge base, no login required |
For new sites, use LWR (Lightning Web Runtime) for better performance, SEO, and LWC-only components.
| User Type | License | Access |
|---|---|---|
| Customer Community | Community | Read/create own records |
| Customer Community Plus | Community Plus | Read/create + sharing rules |
| Partner Community | Partner Community | Leads, Opps, deal registration |
| Guest User | None | Public read access only |
External users see records based on their Account association:
External User -> Contact -> Account -> Records shared with that Account
Configure Sharing Sets in Setup for account-based access. Each community has automatic share groups: All Customer Portal Users, All Partner Users.
Guest users access your site without logging in. This is the highest-risk area for data exposure.
Configure in Setup > Sharing Settings > Guest User Sharing Rules:
Object: Knowledge__kav
Criteria: IsPublished__c = TRUE AND Channel__c includes 'Public'
Access: Read Only
Shared With: Guest User (site-specific)
// Use "with sharing" to enforce sharing rules
// Use WITH USER_MODE for CRUD/FLS enforcement
public with sharing class PublicKnowledgeController {
@AuraEnabled(cacheable=true)
public static List<Knowledge__kav> getPublicArticles() {
return [
SELECT Title, Summary FROM Knowledge__kav
WHERE PublishStatus = 'Online' AND IsVisibleInPkb = true
WITH USER_MODE
];
}
}
with sharing is necessary but not sufficient for guest users. You must also configure Guest User Sharing Rules. Without them, the query returns zero results.
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
<apiVersion>66.0</apiVersion>
<isExposed>true</isExposed>
<targets>
<target>lightningCommunity__Page</target>
<target>lightningCommunity__Default</target>
</targets>
<targetConfigs>
<targetConfig targets="lightningCommunity__Default">
<property name="title" type="String" label="Card Title" default="Welcome"/>
</targetConfig>
</targetConfigs>
</LightningComponentBundle>
import communityId from '@salesforce/community/Id';
import communityBasePath from '@salesforce/community/basePath';
import isGuest from '@salesforce/user/isGuest';
LWR sites support Light DOM, allowing site-level CSS to style component internals:
export default class ThemedComponent extends LightningElement {
static renderMode = 'light';
}
import { NavigationMixin } from 'lightning/navigation';
// Navigate to a community named page
this[NavigationMixin.Navigate]({
type: 'comm__namedPage',
attributes: { name: 'Home' }
});
Manage content via CMS Workspaces, publish to site channels.
import { getContent } from 'experience/cmsDeliveryApi';
@wire(getContent, { channelId: '$channelId', contentKeyOrId: '$contentId' })
content;
get title() { return this.content?.data?.title?.value; }
global class CustomRegistrationHandler implements Auth.RegistrationHandler {
global User createUser(Id portalId, Auth.UserData data) {
Account portalAccount = [SELECT Id FROM Account WHERE Name = 'Community Users' LIMIT 1];
Contact c = new Contact(
AccountId = portalAccount.Id, FirstName = data.firstName,
LastName = data.lastName, Email = data.email
);
insert c;
Profile p = [SELECT Id FROM Profile WHERE Name = 'Customer Community User'];
return new User(
ContactId = c.Id, ProfileId = p.Id,
Username = data.email + '.community',
FirstName = data.firstName, LastName = data.lastName,
Email = data.email, Alias = data.firstName != null ? data.firstName.left(8) : 'guest',
EmailEncodingKey = 'UTF-8', LanguageLocaleKey = 'en_US',
LocaleSidKey = 'en_US', TimeZoneSidKey = 'America/Los_Angeles'
);
}
global void updateUser(Id userId, Id portalId, Auth.UserData data) {
update new User(Id = userId, FirstName = data.firstName,
LastName = data.lastName, Email = data.email);
}
}
Social login: configure in Settings > Login & Registration > Social Sign-On (Google, Facebook, Apple, LinkedIn, or custom OAuth providers).
| Metadata Type | Directory |
|---|---|
| Network | networks/ |
| ExperienceBundle | experiences/ |
| CustomSite | sites/ |
| NavigationMenu | navigationMenus/ |
sf project deploy start --source-dir force-app/main/default/experiences
sf project deploy start --source-dir force-app/main/default/networks
Publish via Experience Builder UI or Apex: ConnectApi.Communities.publishCommunity(null, communityId);
/orders/12345 not /s/detail/a01xx000003ABC)@AuraEnabled(cacheable=true) for read-only dataWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
salesforce, experience-cloud, guest-user, sharing-model, lwc, apex
npx claudepluginhub jiten-singh-shahi/salesforce-claude-code --plugin salesforce-claude-code58 skills in this plugin
/asideUse when you need a quick Salesforce answer mid-task. Answer a side question about Apex, org config, or metadata without losing context, then resume work automatically./checkpointUse when saving Salesforce development progress. Create a named checkpoint via git stash before risky Apex deploys or org changes for easy recovery./configure-sccUse when setting up SCC for Salesforce Apex and LWC development. Interactive wizard to install profiles, modules, and customize the harness for your org./continuous-agent-loopUse when building autonomous Claude Code loops for Salesforce Apex and LWC projects. Patterns from sequential pipelines to RFC-driven multi-agent DAG systems with quality gates. Do NOT use for single-shot Apex tasks./mcp-server-patternsUse when building MCP servers for Salesforce Apex or org integration. Node/TypeScript SDK patterns — tools, resources, prompts, Zod validation, stdio vs Streamable HTTP. Do NOT use for Apex class writing or deployment./model-routeUse when selecting Claude model tier for Salesforce development tasks. Recommend haiku, sonnet, or opus based on Apex complexity, deploy risk, and budget.Other plugins' skills for the same job