forcedotcom/sf-skills / plugins/builder/experience-react/skills/experience-ui-bundle-project-generate
experience-ui-bundle-project-generate
VerifiedGenerates 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).
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 7.9 KB |
| references/angular-project-generate.md | markdown | 3.1 KB |
| references/react-project-generate.md | markdown | 1.3 KB |
| scripts/flatten-project.mjs | script | 2.1 KB |
| scripts/generate-project.mjs | script | 2.8 KB |
| scripts/install-deps.mjs | script | 3.3 KB |
scripts/generate-project.mjs
View on GitHub#!/usr/bin/env node
// Generate a `sf template generate project` starter and flatten it so the
// contents land directly at the target root (no `<name>/` wrapper subfolder).
//
// Usage: node <skill_dir>/scripts/generate-project.mjs <name> <dest> <template>
// <name> — project name passed to `sf template generate project --name`
// <dest> — target root directory the contents should land in
// (so sfdx-project.json sits at <dest>/sfdx-project.json)
// <template> — the `--template` flag value from the chosen framework reference
//
// 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. Pass <name>/<dest>/<template> as literal
// argv values — do not rely on shell variable assignment/interpolation
// (`$VAR` / `%VAR%` / `$env:VAR` differ per shell).
//
// Runs `sf` via spawnSync with shell:true so the platform's own shell
// resolves the CLI shim correctly (on Windows, globally-installed CLIs are
// usually `.cmd`/`.ps1` wrappers that spawn() cannot find without a shell).
//
// Exit 0 on success (project landed at <dest>).
// Exit 1 if `sf template generate project` fails, the generated project has
// no sfdx-project.json, or the flatten didn't result in a valid project root.
import fs from "node:fs";
import path from "node:path";
import { spawnSync } from "node:child_process";
import { flattenProject } from "./flatten-project.mjs";
const [name, dest, template] = process.argv.slice(2);
function fail(message) {
console.error(message);
process.exit(1);
}
if (!name || !dest || !template) {
fail("usage: node <skill_dir>/scripts/generate-project.mjs <name> <dest> <template>");
}
fs.mkdirSync(dest, { recursive: true });
const result = spawnSync(
"sf",
["template", "generate", "project", "--name", name, "--template", template, "--output-dir", dest],
{ stdio: "inherit", shell: true },
);
if (result.error) {
fail(`ERROR: failed to run "sf template generate project": ${result.error.message}`);
}
if (result.status !== 0) {
process.exit(result.status ?? 1);
}
const srcDir = path.join(dest, name);
if (!fs.existsSync(path.join(srcDir, "sfdx-project.json"))) {
fail(`ERROR: generated project has no sfdx-project.json: ${srcDir}`);
}
try {
flattenProject(srcDir, dest);
} catch (err) {
fail(`ERROR: ${err.message}`);
}
// Remove the now-empty (or leftover) generated subfolder.
fs.rmSync(srcDir, { recursive: true, force: true });
const destProjectFile = path.join(dest, "sfdx-project.json");
if (!fs.existsSync(destProjectFile)) {
fail(`FAILED: sfdx-project.json not found at ${destProjectFile} — flatten did not run correctly`);
}
console.log(`OK: project root landed at ${dest} (${destProjectFile})`);
process.exit(0);
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| writing-skillsobra/superpowersUse when creating new skills, editing existing skills, or verifying skills work before deployment | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| 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: 198k | Updated | Claude CodeCodex | Verified | Install |
| 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: 119k | Updated | Claude CodeCodex | Verified | Install |
| 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: 118k | Updated | Claude CodeCodex | Verified | Install |