Skip to content

forcedotcom/sf-skills / plugins/builder/experience-react/skills/experience-ui-bundle-project-generate

experience-ui-bundle-project-generate

Verified

Generates a minimal, ready-to-develop SFDX starter project from template instead of hand-scaffolding files. Use this skill when starting a brand-new Salesforce UI bundle app (React or Angular) and the initial project must be scaffolded — trigger phrases include create, start, or scaffold a new UI bundle app, generate a starter project, or use a prebuilt/starter template. DO NOT TRIGGER when: editing, styling, or adding pages or components to an EXISTING app (use experience-ui-bundle-frontend-generate); configuring ui-bundle.json or metadata files (use experience-ui-bundle-metadata-generate); deploying to an org (use experience-ui-bundle-deploy); when the user explicitly says they want to hand-scaffold from scratch; or when creating a brand-new standalone Salesforce project that also needs full setup — relocating the session, connecting an org, setting the default, and enabling source tracking (use dx-project-create in the salesforce-development plugin).

scripts/install-deps.mjs

View on GitHub
#!/usr/bin/env node
// Install dependencies for a generated UI bundle starter project: the
// project root `package.json`, plus each `package.json` under
// force-app/main/default/uiBundles/*/ (the toolchain the preview server
// loads). Then verify node_modules landed everywhere it was installed.
//
// Usage: node <skill_dir>/scripts/install-deps.mjs <dest>
//   <dest> — the project root (same value passed to generate-project.mjs)
//
// Always invoke via `node` (never as a bare executable, and never wrap this
// in a bash/cmd/PowerShell script) so this works on Windows cmd/PowerShell
// as well as macOS/Linux/Git Bash. Runs `npm install` via spawnSync with an
// explicit `cwd` (no `cd &&` subshell chaining) and shell:true so the
// platform's own shell resolves the `npm` CLI shim correctly.
//
// Exit 0 if every install succeeded (or there was nothing to install).
// Exit 1 with a summary of which installs failed — surface it, don't hand
// off a half-installed project.

import fs from "node:fs";
import path from "node:path";
import { spawnSync } from "node:child_process";

const [dest] = process.argv.slice(2);

if (!dest) {
  console.error("usage: node <skill_dir>/scripts/install-deps.mjs <dest>");
  process.exit(1);
}

function npmInstall(cwd) {
  console.log(`Running "npm install" in ${cwd} ...`);
  const result = spawnSync("npm", ["install"], { cwd, stdio: "inherit", shell: true });
  if (result.error) {
    return `${cwd}: ${result.error.message}`;
  }
  if (result.status !== 0) {
    return `${cwd}: npm install exited with code ${result.status}`;
  }
  return null;
}

const failures = [];

// 1. Project root.
if (fs.existsSync(path.join(dest, "package.json"))) {
  const failure = npmInstall(dest);
  if (failure) failures.push(failure);
} else {
  console.error(`ERROR: no package.json found at project root: ${dest}`);
  failures.push(`${dest}: missing package.json`);
}

// 2. Each UI bundle.
const bundlesDir = path.join(dest, "force-app", "main", "default", "uiBundles");
const bundleDirs = fs.existsSync(bundlesDir)
  ? fs
      .readdirSync(bundlesDir, { withFileTypes: true })
      .filter((entry) => entry.isDirectory())
      .map((entry) => path.join(bundlesDir, entry.name))
  : [];

for (const bundleDir of bundleDirs) {
  if (fs.existsSync(path.join(bundleDir, "package.json"))) {
    const failure = npmInstall(bundleDir);
    if (failure) failures.push(failure);
  }
}

// 3. Verify node_modules landed everywhere it was installed.
console.log("\nVerifying installs:");
let allInstalled = true;
if (fs.existsSync(path.join(dest, "package.json"))) {
  const ok = fs.existsSync(path.join(dest, "node_modules"));
  console.log(`  ${ok ? "OK" : "MISSING"}: ${path.join(dest, "node_modules")}`);
  allInstalled = allInstalled && ok;
}
for (const bundleDir of bundleDirs) {
  if (fs.existsSync(path.join(bundleDir, "package.json"))) {
    const ok = fs.existsSync(path.join(bundleDir, "node_modules"));
    console.log(`  ${ok ? "OK" : "MISSING"}: ${path.join(bundleDir, "node_modules")}`);
    allInstalled = allInstalled && ok;
  }
}

if (failures.length > 0 || !allInstalled) {
  console.error("\nFAILED: one or more installs did not complete:");
  for (const failure of failures) {
    console.error(`  - ${failure}`);
  }
  process.exit(1);
}

console.log("\nOK: all dependencies installed.");
process.exit(0);
writing-skillsobra/superpowersUse when creating new skills, editing existing skills, or verifying skills work before deploymentStars: 322kUpdated Claude CodeCodexVerifiedInstall
xlsxanthropics/skillsUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .xltx, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
shipping-and-launchaddyosmani/agent-skillsPrepares production launches. Use when preparing to deploy to production, or when asking what needs to be in place before shipping. Use when you need a pre-launch checklist, when setting up monitoring, when planning a staged rollout, or when you need a rollback strategy.Stars: 119kUpdated Claude CodeCodexVerifiedInstall
childhoodthedotmack/claude-memBabysit a shipped release after merge, publication, or deployment. Verify published packages, production behavior, installed plugins, and late CI or user reports until the observation window is clean; use babysit for PR readiness before release.Stars: 118kUpdated Claude CodeCodexVerifiedInstall