### Install Dependencies and Setup Project Locally Source: https://github.com/forcedotcom/sf-skills/blob/main/samples/ui-bundle-template-app-react-sample-b2e/README.md Installs project dependencies, sets up the UI Bundle, builds the app, and starts the development server. This is used for local development and testing. ```bash npm install npm run sf-project-setup ``` -------------------------------- ### Install Dependencies and Run Development Server Source: https://github.com/forcedotcom/sf-skills/blob/main/samples/webapp-template-app-react-sample-b2e-experimental/README.md Navigate to the web app directory, install dependencies using npm, and start the development server. ```bash cd force-app/main/default/webapplications/propertymanagementapp npm install npm run dev ``` -------------------------------- ### Start Live Preview Session Example Source: https://github.com/forcedotcom/sf-skills/blob/main/skills/developing-agentforce/references/agent-validation-and-debugging.md An example of starting a preview session with live action execution enabled. This is crucial for testing with real backing code and data. ```bash sf agent preview start --json --authoring-bundle Local_Info_Agent --use-live-actions ``` -------------------------------- ### Agent Script Quick Start Guide Source: https://github.com/forcedotcom/sf-skills/blob/main/skills/developing-agentforce/assets/README-legacy.md A guide to selecting agent templates based on starting needs, from simple 'hello-world' agents to complex agents with subagents, actions, advanced patterns, and XML metadata. ```text What do you need? │ ├─► "Just starting" │ └─► agents/hello-world.agent │ ├─► "Complete agent with subagents" │ └─► agents/multi-subagent.agent │ ├─► "Add actions to my agent" │ ├─► components/flow-action.agent │ └─► components/apex-action.agent │ ├─► "Advanced patterns" │ └─► patterns/ (see patterns/README.md) │ └─► "XML metadata" └─► metadata/ ``` -------------------------------- ### Install Dependencies and Run Development Server Source: https://github.com/forcedotcom/sf-skills/blob/main/samples/webapp-template-app-react-sample-b2x-experimental/README.md Navigate to the web app directory, install project dependencies, and start the development server. The app typically opens at http://localhost:5173. ```bash cd force-app/main/default/webapplications/propertyrentalapp npm install npm run dev ``` -------------------------------- ### Setup and Run Ingestion API Example Source: https://github.com/forcedotcom/sf-skills/blob/main/skills/preparing-datacloud/examples/ingestion-api/README.md Navigates to the example directory, copies the environment file, and runs the Python script to send data. Ensure the .env file is edited with your specific values. ```bash cd skills/preparing-datacloud/examples/ingestion-api cp .env.example .env # edit .env with your values python3 send-data.py ``` -------------------------------- ### Manual Setup for Data Cloud Plugin Source: https://github.com/forcedotcom/sf-skills/blob/main/skills/orchestrating-datacloud/references/plugin-setup.md Manual steps to set up the Data Cloud plugin, including cloning the repository, installing dependencies, compiling, and linking the plugin. ```bash git clone https://github.com/Jaganpro/sf-cli-plugin-data360.git cd sf-cli-plugin-data360 yarn install npx tsc node ~/.claude/skills/orchestrating-datacloud/scripts/generate-manifest.mjs . sf plugins link . ``` -------------------------------- ### Display Setup Script Help Source: https://github.com/forcedotcom/sf-skills/blob/main/samples/ui-bundle-template-app-react-sample-b2e/README.md View all available options and their descriptions for the setup script. ```bash npm run setup -- --help ``` -------------------------------- ### Quick Start Commands Source: https://github.com/forcedotcom/sf-skills/blob/main/skills/generating-mermaid-diagrams/README.md Use these commands to quickly generate different types of diagrams. Examples include OAuth flows, data models, and integration diagrams. ```bash # Generate an OAuth diagram "Create a JWT Bearer OAuth flow diagram" # Generate a data model "Create an ERD for Account, Contact, and Opportunity" # Generate an integration diagram "Diagram our Salesforce to SAP sync flow" ``` -------------------------------- ### Install Python Dependencies Source: https://github.com/forcedotcom/sf-skills/blob/main/skills/preparing-datacloud/examples/ingestion-api/README.md Installs the necessary Python libraries for the Ingestion API example. Run this command before setting up the project. ```bash pip install PyJWT cryptography requests ``` -------------------------------- ### Setup: Get Org Credentials Source: https://github.com/forcedotcom/sf-skills/blob/main/skills/testing-agentforce/references/action-execution.md Ensures the org is authenticated and extracts access token and instance URL for API calls. ```bash # Ensure org is authenticated sf org display --json -o # If not authenticated, login first sf org login web --json --alias # Extract credentials for API calls TOKEN=$(sf org display --json -o | jq -r '.result.accessToken') INSTANCE_URL=$(sf org display --json -o | jq -r '.result.instanceUrl') ``` -------------------------------- ### UI Bundle Setup Configuration Source: https://github.com/forcedotcom/sf-skills/blob/main/samples/ui-bundle-template-app-react-sample-b2x/README.md The `scripts/org-setup.config.json` file controls the behavior of the `npm run setup` script. This example shows configurations for permission set assignments, role assignment, and self-registration. ```json { "permsetAssignments": { "assignments": { "Property_Management_Access": { "assignee": "currentUser" }, "Tenant_Maintenance_Access": { "assignee": "skip" }, "Property_Rental_Guest_User_Access": { "assignee": "guestUser", "siteName": "propertyrentalapp" } } }, "role": { "assignee": "currentUser", "roleName": "Admin" }, "selfRegistration": { "siteName": "propertyrentalapp", "selfRegProfile": "Property Rental Prospect Profile", "accountName": "Property Rental Self-Registration" } } ``` -------------------------------- ### Bootstrap Data Cloud Plugin with Helper Script Source: https://github.com/forcedotcom/sf-skills/blob/main/skills/orchestrating-datacloud/references/plugin-setup.md Uses a helper script to clone, install dependencies, compile, and link the Data Cloud plugin. This is the recommended automated setup path. ```bash bash ~/.claude/skills/orchestrating-datacloud/scripts/bootstrap-plugin.sh ``` -------------------------------- ### Install sf-skills Installer and Data Cloud Runtime from GitHub Source: https://github.com/forcedotcom/sf-skills/blob/main/skills/orchestrating-datacloud/references/plugin-setup.md Downloads and runs the latest sf-skills installer script from GitHub, including the Data Cloud runtime. ```bash curl -sSL https://raw.githubusercontent.com/Jaganpro/sf-skills/main/tools/install.py | python3 - --with-datacloud-runtime ``` -------------------------------- ### Start Server with Specific File Source: https://github.com/forcedotcom/sf-skills/blob/main/skills/generating-mermaid-diagrams/scripts/README.md Command to start the preview server, specifying the Mermaid file to watch. ```bash python mermaid_preview.py start --file ``` -------------------------------- ### Correct Subagent Reasoning with Instructions Source: https://github.com/forcedotcom/sf-skills/blob/main/skills/developing-agentforce/references/agent-script-core-language.md This example demonstrates how to correctly guide the LLM by pairing actions with specific instructions within the reasoning block. ```agentscript subagent check_status: reasoning: instructions: -> | If the customer asks about their order status, use the {!@actions.fetch_status} action. actions: lookup: @actions.fetch_status with order_id = @variables.order_id ``` -------------------------------- ### Typical Ingestion API Setup Flow Source: https://github.com/forcedotcom/sf-skills/blob/main/skills/connecting-datacloud/SKILL.md Use these commands to create, upsert schema, and get schema for an Ingestion API connection. ```bash sf data360 connection create -o -f examples/connections/ingest-api-connection.json 2>/dev/null sf data360 connection schema-upsert -o --name -f examples/connections/ingest-api-schema.json 2>/dev/null sf data360 connection schema-get -o --name 2>/dev/null ``` -------------------------------- ### Quick Start Commands Source: https://github.com/forcedotcom/sf-skills/blob/main/skills/generating-mermaid-diagrams/scripts/README.md Basic commands to start, check status, and stop the Mermaid Preview Server. ```bash python mermaid_preview.py start --file /tmp/my-diagram.mmd ``` ```bash python mermaid_preview.py status ``` ```bash python mermaid_preview.py stop ``` -------------------------------- ### Install Project Dependencies Source: https://github.com/forcedotcom/sf-skills/blob/main/samples/ui-bundle-template-app-react-sample-b2e/README.md Run this command in the root of the project to install all top-level dependencies. ```bash npm install ``` -------------------------------- ### Example: List All DMOs Source: https://github.com/forcedotcom/sf-skills/blob/main/skills/getting-datacloud-schema/references/README.md An example command to list all Data Model Objects (DMOs) in the 'afvibe' org. ```bash python3 scripts/get_dmo_schema.py afvibe ``` -------------------------------- ### Install Data Cloud Runtime with Python Installer Source: https://github.com/forcedotcom/sf-skills/blob/main/skills/orchestrating-datacloud/references/plugin-setup.md Installs the Data Cloud runtime using the Python installer script. This is a convenient option if you use the Python installer for sf-skills. ```bash python3 ~/.claude/sf-skills-install.py --with-datacloud-runtime ``` -------------------------------- ### Correct Session Handling: Start Before Sending Source: https://github.com/forcedotcom/sf-skills/blob/main/skills/developing-agentforce/references/agent-validation-and-debugging.md Always start a preview session before sending utterances. The `start` command provides a session ID required for subsequent `send` or `end` commands. ```bash # WRONG — no session exists sf agent preview send --json --authoring-bundle My_Bundle -u "Hello" # CORRECT — start first, capture session ID sf agent preview start --json --authoring-bundle My_Bundle sf agent preview send --json --authoring-bundle My_Bundle --session-id -u "Hello" ``` -------------------------------- ### Install Nano Banana Extension Source: https://github.com/forcedotcom/sf-skills/blob/main/skills/generating-visual-diagrams/README.md Install the Nano Banana image generation extension for the Gemini CLI. ```bash gemini extensions install nanobanana ``` -------------------------------- ### Example: List All DLOs Source: https://github.com/forcedotcom/sf-skills/blob/main/skills/getting-datacloud-schema/references/README.md An example command to list all Data Lake Objects (DLOs) in the 'afvibe' org. ```bash python3 scripts/get_dlo_schema.py afvibe ``` -------------------------------- ### Run Full Setup Script with Options Source: https://github.com/forcedotcom/sf-skills/blob/main/samples/ui-bundle-template-app-react-sample-b2e/README.md Automates the complete setup process and skips the interactive step picker by providing the target org alias and the --yes flag. ```bash npm run setup -- --target-org --yes ``` -------------------------------- ### Run Full Setup Script Source: https://github.com/forcedotcom/sf-skills/blob/main/samples/ui-bundle-template-app-react-sample-b2e/README.md Automates the complete setup process including login, metadata deployment, permission set assignment, data import, GraphQL schema fetch, codegen, and UI bundle build. Optionally launches the dev server. ```bash npm run setup -- --target-org ``` -------------------------------- ### Quick Start Deployment Commands Source: https://github.com/forcedotcom/sf-skills/blob/main/samples/native-mobile-rental-tenant-app/README.md Run these commands from the sample directory to quickly log in to your org and deploy the rental app metadata. ```bash sf org login web --alias sf project deploy start --source-dir force-app --target-org ``` -------------------------------- ### Example: Get Specific DMO Schema Source: https://github.com/forcedotcom/sf-skills/blob/main/skills/getting-datacloud-schema/references/README.md An example command to retrieve the schema for the 'Individual__dlm' Data Model Object (DMO) from the 'afvibe' org. ```bash python3 scripts/get_dmo_schema.py afvibe Individual__dlm ``` -------------------------------- ### Example: Get Specific DLO Schema Source: https://github.com/forcedotcom/sf-skills/blob/main/skills/getting-datacloud-schema/references/README.md An example command to retrieve the schema for the 'Employee__dll' Data Lake Object (DLO) from the 'afvibe' org. ```bash python3 scripts/get_dlo_schema.py afvibe Employee__dll ``` -------------------------------- ### OpenAPI 3.0 Specification Example Source: https://github.com/forcedotcom/sf-skills/blob/main/skills/building-sf-integrations/references/external-services-guide.md An example of an OpenAPI 3.0 specification defining a GET operation for retrieving customer details and a Customer schema. ```json { "openapi": "3.0.0", "info": { "title": "My API", "version": "1.0.0" }, "paths": { "/customers/{id}": { "get": { "operationId": "getCustomer", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Customer" } } } } } } } }, "components": { "schemas": { "Customer": { "type": "object", "properties": { "id": { "type": "string" }, "email": { "type": "string" } } } } } } ``` -------------------------------- ### Customer API Example Source: https://github.com/forcedotcom/sf-skills/blob/main/skills/building-sf-integrations/references/external-services-guide.md This snippet demonstrates an example OpenAPI 3.0 specification for a customer API, including a GET operation to retrieve customer details. ```APIDOC ## GET /customers/{id} ### Description Retrieves the details of a specific customer. ### Method GET ### Endpoint /customers/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The unique identifier of the customer. ### Response #### Success Response (200) - **id** (string) - The customer's unique identifier. - **email** (string) - The customer's email address. #### Response Example { "example": "{\"id\": \"cus_test123\", \"email\": \"test@example.com\"}" } ``` -------------------------------- ### One-Command Project Setup Source: https://github.com/forcedotcom/sf-skills/blob/main/samples/webapp-template-app-react-sample-b2e-experimental/AGENT.md Run this command from the project root to automate login, deployment, permset/data import, GraphQL schema/codegen, and web app build. ```bash node scripts/setup-cli.mjs --target-org ``` -------------------------------- ### Apex Cleanup with Timestamp Tracking Source: https://github.com/forcedotcom/sf-skills/blob/main/skills/handling-sf-data/references/cleanup-rollback-example.md This Apex example demonstrates cleaning up records based on their creation time relative to a test's start. It captures the test start time and then deletes records created after that point. ```apex DateTime testStartTime = DateTime.now(); delete [ SELECT Id FROM Account WHERE CreatedDate >= :testStartTime AND Name LIKE 'Test%' ]; ``` -------------------------------- ### Create a Scratch Org and Deploy Source Source: https://github.com/forcedotcom/sf-skills/blob/main/skills/deploying-metadata/references/deployment-workflows.md This workflow creates a new scratch org, pushes the project source to it, assigns permission sets, imports sample data, and opens the org in a browser. ```bash sf org create scratch \ --definition-file config/project-scratch-def.json \ --alias feature-branch-123 \ --duration-days 7 \ --set-default ``` ```bash sf project deploy start --target-org feature-branch-123 ``` ```bash sf org assign permset --name AdminPermSet --target-org feature-branch-123 ``` ```bash sf data import tree --plan data/sample-data-plan.json --target-org feature-branch-123 ``` ```bash sf org open --target-org feature-branch-123 ``` -------------------------------- ### Run Full Salesforce DX Project Setup Source: https://github.com/forcedotcom/sf-skills/blob/main/samples/webapp-template-app-react-sample-b2e-experimental/README.md Execute the `setup-cli.mjs` script from the project root to perform a complete setup. This includes login, metadata deployment, permission set assignment, data import, GraphQL schema fetch, codegen, and web app build. ```bash node setup-cli.mjs --target-org ``` -------------------------------- ### Deploy Everything (Metadata + Web App) Source: https://github.com/forcedotcom/sf-skills/blob/main/samples/webapp-template-app-react-sample-b2e-experimental/README.md Build the web app and then deploy all project metadata and the web app to the target Salesforce org. ```bash cd force-app/main/default/webapplications/propertymanagementapp && npm install && npm run build && cd - sf project deploy start --source-dir force-app --target-org ``` -------------------------------- ### Install and Build UI Bundle Dependencies Source: https://github.com/forcedotcom/sf-skills/blob/main/samples/ui-bundle-template-app-react-sample-b2x/README.md Navigate to the UI Bundle directory, install its specific dependencies, and build the static artifacts. This ensures the bundle is ready for deployment. ```bash cd force-app/main/default/uiBundles/propertyrentalapp npm install npm run build cd - ``` -------------------------------- ### Start Live Agent Preview Source: https://github.com/forcedotcom/sf-skills/blob/main/skills/developing-agentforce/references/salesforce-cli-for-agents.md Starts a live preview session for an agent, which executes real backing logic (Apex, Flows, Prompt Templates) instead of simulated responses. Requires the authoring bundle name. ```bash sf agent preview start --json --authoring-bundle Agent_API_Name --use-live-actions ``` -------------------------------- ### SOQL with Trailing Wildcard (Correct) Source: https://github.com/forcedotcom/sf-skills/blob/main/skills/querying-soql/references/anti-patterns.md Employing a trailing wildcard in a LIKE clause allows the use of indexes. This example finds Account names starting with 'Acme'. ```soql // ✅ CORRECT: Trailing wildcard (uses index) SELECT Id FROM Account WHERE Name LIKE 'Acme%' ``` -------------------------------- ### Install and Build UI Bundle Dependencies Source: https://github.com/forcedotcom/sf-skills/blob/main/samples/ui-bundle-template-app-react-sample-b2e/README.md Navigate to the UI Bundle directory, install its dependencies, and build the static artifacts. The `cd -` command returns to the project root. ```bash cd force-app/main/default/uiBundles/propertymanagementapp npm install npm run build cd - ``` -------------------------------- ### LocationService Source: https://github.com/forcedotcom/sf-skills/blob/main/skills/using-mobile-native-capabilities/references/location.md Provides methods to interact with the device's location capabilities. You can get the current position, start watching for position changes, and stop watching for position changes. ```APIDOC ## LocationService ### Description Provides methods to interact with the device's location capabilities. You can get the current position, start watching for position changes, and stop watching for position changes. ### Methods * **getCurrentPosition(options?: LocationServiceOptions): Promise** Gets the device’s current geolocation. * **startWatchingPosition(options: LocationServiceOptions | null, callback: (result?: LocationResult, failure?: LocationServiceFailure) => void): number** Subscribes to asynchronous location updates for the mobile device. * **stopWatchingPosition(watchId: number): void** Unsubscribes from location updates for the mobile device. ### Interfaces * **LocationServiceOptions** An object representing configuration details for a location service session. * **enableHighAccuracy** (boolean) - Required - Whether to use high accuracy mode when determining location. Set to true to prioritize location accuracy. Set to false to prioritize battery life and response time. * **LocationResult** Interface representing the result of a location query. * **coords** (Coordinates) - The physical location. * **timestamp** (number) - The time of the location reading, measured in milliseconds since January 1, 1970. * **Coordinates** An object representing a specific point located on the planet Earth. Includes velocity details, if available. Includes accuracy information, to the best of the device’s ability to evaluate. Similar to a GeolocationCoordinates in the Geolocation Web API. * **latitude** (number) - The latitude, in degrees. Ranges from -90 to 90. * **longitude** (number) - The longitude, in degrees. Ranges from -180 to 180. * **accuracy** (number) - Optional - Accuracy of the location measurement, in meters, as a radius around the measurement. * **altitude** (number) - Optional - Meters above sea level. * **altitudeAccuracy** (number) - Optional - Accuracy of the altitude measurement, in meters. * **speed** (number) - Optional - Velocity of motion, if any, in meters per second. * **speedAccuracy** (number) - Optional - Accuracy of the speed measurement, in meters. * **heading** (number) - Optional - Direction of motion, in degrees from true north. Ranges from 0 to 360. * **headingAccuracy** (number) - Optional - Accuracy of the heading measurement, in degrees. * **LocationServiceFailure** An object representing an error that occurred when accessing LocationService features. * **code** (LocationServiceFailureCode) - A value representing the reason for a location error. * **message** (string) - A string value explaining the reason for the failure. This value is suitable for use in user interface messages. The message is provided in English, and isn’t localized. * **LocationServiceFailureCode** (Type Alias) Possible failure codes. * 'LOCATION_SERVICE_DISABLED' * 'USER_DENIED_PERMISSION' * 'USER_DISABLED_PERMISSION' * 'SERVICE_NOT_ENABLED' * 'UNKNOWN_REASON' ``` -------------------------------- ### Minimal Subagent Router Example Source: https://github.com/forcedotcom/sf-skills/blob/main/skills/developing-agentforce/references/agent-validation-and-debugging.md Illustrates a basic subagent router configuration that relies on action names for routing. This is a starting point before adding more explicit routing instructions. ```agentscript # BEFORE — relies on action names alone for routing start_agent agent_router: description: "Route to appropriate subagents" reasoning: actions: go_to_weather: @utils.transition to @subagent.local_weather go_to_events: @utils.transition to @subagent.local_events ``` -------------------------------- ### Deploy All Metadata and UI Bundle Source: https://github.com/forcedotcom/sf-skills/blob/main/samples/ui-bundle-template-app-react-sample-b2e/README.md Build the UI Bundle first, then deploy all source code, including the UI Bundle, to the target org. ```bash cd force-app/main/default/uiBundles/propertymanagementapp && npm run build && cd - sf project deploy start --source-dir force-app --target-org ``` -------------------------------- ### Deploy Everything: Metadata, Experience Cloud Site, and Web App Source: https://github.com/forcedotcom/sf-skills/blob/main/samples/webapp-template-app-react-sample-b2x-experimental/README.md Builds the web app and then deploys the entire Salesforce project, including metadata, Experience Cloud site configurations, and the web app, to the target organization. ```bash cd force-app/main/default/webapplications/propertyrentalapp && npm install && npm run build && cd - sf project deploy start --source-dir force-app --target-org ``` -------------------------------- ### Basic Usage Example Source: https://github.com/forcedotcom/sf-skills/blob/main/skills/building-sf-integrations/assets/soap/wsdl2apex-guide.md Demonstrates how to instantiate a generated WSDL stub, configure the endpoint using a Named Credential, set a timeout, create a request object, and make a callout to a SOAP service. ```apex public class CustomerServiceCaller { public static Customer getCustomer(String customerId) { // Instantiate the generated stub CustomerService.CustomerServicePort stub = new CustomerService.CustomerServicePort(); // Configure endpoint (Named Credential) stub.endpoint_x = 'callout:CustomerServiceNC'; // Set timeout (max 120 seconds) stub.timeout_x = 120000; // Create request GetCustomerRequest request = new GetCustomerRequest(); request.customerId = customerId; // Make the call GetCustomerResponse response = stub.getCustomer(request); return response.customer; } } ``` -------------------------------- ### Prompt Refinement Examples Source: https://github.com/forcedotcom/sf-skills/blob/main/skills/generating-visual-diagrams/references/iteration-workflow.md Iteratively refine prompts using the CLI, starting with a generic prompt and adding specifics for better results. Finally, generate the 4K version using the Python script. ```bash # Attempt 1: Too generic gemini --yolo "/generate 'Account ERD'" # Result: Missing relationships, wrong colors # Attempt 2: Add specifics gemini --yolo "/generate 'Account ERD with Contact and Opportunity, blue boxes'" # Result: Better, but legend missing # Attempt 3: Add styling details gemini --yolo "/generate 'Salesforce ERD: Account (blue, center), Contact (green), Opportunity (yellow). Master-detail = thick arrow. Lookup = dashed. Include legend.'" # Result: Perfect layout! # Final: Generate at 4K uv run scripts/generate_image.py \ -p "Salesforce ERD: Account (blue, center)..." \ -f "crm-erd-final.png" \ -r 4K ``` -------------------------------- ### Synchronous REST Callout Usage Example Source: https://github.com/forcedotcom/sf-skills/blob/main/skills/building-sf-integrations/references/callout-patterns.md Demonstrates how to use the synchronous REST callout class for GET and POST requests. Includes basic error handling using a try-catch block for `CalloutException`. ```Apex // GET request try { Map data = StripeCallout.get('/v1/customers/cus_123'); String email = (String) data.get('email'); } catch (CalloutException e) { // Handle error System.debug(LoggingLevel.ERROR, 'Callout failed: ' + e.getMessage()); } // POST request Map payload = new Map{ 'email' => 'customer@example.com', 'name' => 'John Doe' }; Map response = StripeCallout.post('/v1/customers', payload); ``` -------------------------------- ### Verbatim Output Example Source: https://github.com/forcedotcom/sf-skills/blob/main/skills/developing-agentforce/references/agent-validation-and-debugging.md When responding to users after getting weather results, use the exact date and temperature values returned by the action. Do not paraphrase dates or round temperatures. Quote action output values verbatim. ```text # CORRECT — explicit instructions to use verbatim values reasoning: instructions: -> | After getting weather results, respond using the exact date and temperature values returned by the action. Do NOT paraphrase dates (say "2025-02-19", not "today"). Do NOT round temperatures (say the exact value from the results). Quote action output values verbatim whenever possible. ``` -------------------------------- ### Example URL Configuration Source: https://github.com/forcedotcom/sf-skills/blob/main/skills/generating-ui-bundle-site/docs/update-site-urls.md Illustrates the correct configuration of primary and secondary URLs for Experience Sites, showing the values for DigitalExperienceConfig, Network, and CustomSite. ```xml ChatterNetworkPicasso Site (Primary): DigitalExperienceConfig: bestsupport Network + ChatterNetwork Site (Secondary): Network: bestsupportvforcesite CustomSite: bestsupportvforcesite ``` -------------------------------- ### Process JSON Query Results with jq (Get Names) Source: https://github.com/forcedotcom/sf-skills/blob/main/skills/querying-soql/references/cli-commands.md Use `jq` to parse JSON output from `sf data query` and extract specific fields, such as record names. This example extracts all 'Name' fields from the query results. ```bash # Get just the names sf data query \ --query "SELECT Name FROM Account LIMIT 10" \ --target-org my-sandbox \ --json | jq -r '.result.records[].Name' ``` -------------------------------- ### Start Agent Preview Source: https://github.com/forcedotcom/sf-skills/blob/main/skills/testing-agentforce/SKILL.md Starts a preview session for an agent, generating local traces. Use this to begin ad-hoc testing. ```bash sf agent preview start --json --authoring-bundle MyAgent -o ``` -------------------------------- ### Start Live Agent Preview Source: https://github.com/forcedotcom/sf-skills/blob/main/skills/developing-agentforce/SKILL.md Initiate a live preview of the agent using live actions. This allows you to test the agent's behavior with representative utterances. ```bash sf agent preview start --json --use-live-actions --authoring-bundle ``` -------------------------------- ### Execute Apex Tests Asynchronously with Salesforce CLI Source: https://github.com/forcedotcom/sf-skills/blob/main/skills/running-apex-tests/references/performance-optimization.md Start test execution asynchronously for large test suites to avoid blocking your development workflow. Use `--wait 0` to initiate the run and then check the status using `sf apex get test`. ```bash # Start tests asynchronously sf apex run test --class-names MyClassTest --wait 0 --target-org sandbox # Returns test run ID: 707xx0000000000 # Check status later sf apex get test --test-run-id 707xx0000000000 --target-org sandbox ``` -------------------------------- ### Bash Script Usage Example Source: https://github.com/forcedotcom/sf-skills/blob/main/skills/deploying-metadata/references/agent-deployment-guide.md Demonstrates how to execute the deploy-agent.sh script with necessary arguments. ```bash ./deploy-agent.sh myorg Customer_Support_Agent 4 ``` -------------------------------- ### Start a Session for Agent Preview Source: https://github.com/forcedotcom/sf-skills/blob/main/skills/developing-agentforce/references/agent-validation-and-debugging.md Initiates a preview session for an agent. Use `--json` for script integration and `--use-live-actions` to execute real backing logic. Capture the returned session ID for subsequent commands. ```bash sf agent preview start --json --authoring-bundle --use-live-actions ``` -------------------------------- ### Get Current Position Source: https://github.com/forcedotcom/sf-skills/blob/main/skills/using-mobile-native-capabilities/references/location.md Gets the device’s current geolocation. Use this to retrieve a one-time location reading. Ensure you handle the Promise to get the location details. ```typescript import { getLocationService } from '@salesforce/core'; const locationService = getLocationService(); locationService.getCurrentPosition({ enableHighAccuracy: true }).then(location => { console.log('Latitude: ' + location.coords.latitude + ', Longitude: ' + location.coords.longitude); }).catch(error => { console.error('Error getting location: ', error); }); ``` -------------------------------- ### Start Mermaid Preview Server Source: https://github.com/forcedotcom/sf-skills/blob/main/skills/generating-mermaid-diagrams/references/preview-guide.md Start the preview server by providing the path to the Mermaid file. This command runs in the background and serves the diagram at http://localhost:8765. ```bash python ~/.claude/skills/generating-mermaid-diagrams/scripts/mermaid_preview.py start --file /tmp/mermaid-preview.mmd ``` ```bash python [project-root]/skills/generating-mermaid-diagrams/scripts/mermaid_preview.py start --file /tmp/mermaid-preview.mmd ``` -------------------------------- ### Install Dependencies Source: https://github.com/forcedotcom/sf-skills/blob/main/samples/ui-bundle-template-app-react-sample-b2e/force-app/main/default/uiBundles/propertymanagementapp/README.md Installs the necessary project dependencies using npm. ```bash npm install ``` -------------------------------- ### Preview Experience Cloud Site Locally Source: https://github.com/forcedotcom/sf-skills/blob/main/skills/generating-lwc-components/references/cli-commands.md Launches a local development server to preview an Experience Cloud site. Specify the site name and target org for previewing. ```bash # Preview an Experience Cloud site locally sf lightning dev site --name "Partner Central" --target-org my-sandbox ``` -------------------------------- ### Example Deployment Command Source: https://github.com/forcedotcom/sf-skills/blob/main/skills/integrating-b2b-commerce-open-code-components/SKILL.md An example of the deployment command with a specific store name. This command deploys components to the 'My_B2B_Store1' site. ```bash sf project deploy start -d force-app/main/default/digitalExperiences/site/My_B2B_Store1 ``` -------------------------------- ### Install Code Analyzer Plugin Source: https://github.com/forcedotcom/sf-skills/blob/main/skills/running-code-analyzer/references/error-handling.md Install the code-analyzer plugin if it is reported as not found. ```bash sf plugins install @salesforce/plugin-code-analyzer ``` -------------------------------- ### Install Vlocity CLI Source: https://github.com/forcedotcom/sf-skills/blob/main/skills/deploying-omnistudio-datapacks/SKILL.md Install the Vlocity CLI globally using npm. ```bash npm install --global vlocity ``` -------------------------------- ### Orchestrate Deployment Order Source: https://github.com/forcedotcom/sf-skills/blob/main/skills/deploying-metadata/references/agent-deployment-guide.md This example illustrates the deployment order for cross-skill integration, ensuring dependencies like Apex and Flows are deployed before the agent. ```bash # 1. generating-apex creates InvocableMethod class # 2. generating-flow creates wrapper Flow # 3. developing-agentforce creates agent with flow:// action # 4. deploying-metadata orchestrates deployment in correct order ``` -------------------------------- ### Example Identifiers Source: https://github.com/forcedotcom/sf-skills/blob/main/skills/generating-flexipage/SKILL.md Examples of generated identifiers for different component types and contexts. ```text - First contacts related list: `relatedList_contacts_1` - Second contacts related list: `relatedList_contacts_2` - Rich text in header: `richText_header_1` - Field section: `fieldSection_details_1` ``` -------------------------------- ### SOQL Execute Example Source: https://github.com/forcedotcom/sf-skills/blob/main/skills/debugging-apex-logs/references/debug-log-reference.md An example of a SOQL query execution log entry. ```text 14:32:54.123 (123456789)|SOQL_EXECUTE_BEGIN|[45]|SELECT Id FROM Account ``` -------------------------------- ### CI/CD Deployment Script Example Source: https://github.com/forcedotcom/sf-skills/blob/main/skills/deploying-metadata/references/agent-deployment-guide.md A bash script template for integrating agent deployments into a CI/CD pipeline. ```bash #!/bin/bash ``` -------------------------------- ### Verify Java Installation Source: https://github.com/forcedotcom/sf-skills/blob/main/skills/running-code-analyzer/references/error-handling.md Check if Java is installed and accessible by running `java -version`. ```bash java -version ``` -------------------------------- ### Experience Site Deployment Steps Source: https://github.com/forcedotcom/sf-skills/blob/main/skills/building-ui-bundle-app/SKILL.md Steps for deploying an Experience Site to host the UI bundle for external users. This involves resolving site properties and generating site metadata. ```text Resolve site properties (siteName, appDevName, etc.) v Generate site metadata (Network, CustomSite, DigitalExperience) v Deploy site infrastructure ``` -------------------------------- ### Start Agent Preview for Testing Source: https://github.com/forcedotcom/sf-skills/blob/main/skills/developing-agentforce/references/agent-user-setup.md Initiates a preview of the agent bundle, allowing for testing of permissions and functionality before publishing. Recommended to test all subagents and actions. ```bash sf agent preview start --json \ --api-name \ -o TARGET_ORG ```