Skip to content
Development
Skill

/dx-project-create

Scaffold a new Salesforce DX project of any template — standard, empty, analytics, agent, or a React/Angular UI-bundle app — and set it up end-to-end: relocate the session, connect an org, set the default, enable source tracking. Use when the user asks to create or scaffold a

From plugin
sf-skills
1.1k200 skills6 agents15 commands4 MCP

Claude Code

$ npx -y skills add forcedotcom/sf-skills --skill dx-project-create --agent claude-code

SKILL.md

dx-project-create.SKILL.md
name: dx-project-create
description: "Scaffold a Salesforce DX project from any template (standard, agent, analytics, React/Angular/Vue app), move the session in, connect an org, enable source tracking. Use to create a Salesforce/SFDX project. DO NOT TRIGGER for: existing UI-bundle apps (experience-ui-bundle-frontend-generate); UI-bundle scaffold in a larger build (experience-ui-bundle-project-generate, experience-ui-bundle-app-coordinate); tool checks (platform-environment-validate); org login (login); scratch orgs (dx-org-manage)."
metadata:
  domains: ["Developer Experience"]
  relatedSkills:
    - "experience-ui-bundle-project-generate"
    - "experience-ui-bundle-frontend-generate"
    - "experience-ui-bundle-deploy"
    - "platform-environment-validate"
    - "dx-org-manage"
  cliTools:
    - tool: ["npm"]
      semver: ">=8.0.0"
    - tool: ["sf"]
      semver: ">=2.0.0"
allowed-tools:
  - Bash
  - Read

Creating a New Salesforce Project

Walk the user through a wizard that scaffolds a new Salesforce DX project, relocates this session into the new project, connects it to an org, and configures it for development. Run each step in order, confirming with the user before any environment-changing action.

The plugin's MCP servers come from the **installed plugin**, not the project, so they stay available after the session relocates. There is no per-project `.mcp.json` to copy.

Step 1: Choose a Project Template

This skill scaffolds **every** template the CLI offers, including UI-bundle web apps (React, Angular, Vue), so creating a project never requires installing another plugin. Once the project exists, the `experience-ui-bundle-*` skills own *building it out* (pages, components, deploy).

Read the template set **live from the CLI**, never from a baked-in list, because Salesforce adds templates over time:

sf template generate project --help

Parse the `-t, --template=<option>` line's `<options: a|b|c|…>` list; those names are the authoritative set. Fallback, only if the live list cannot be read: `standard`, `empty`, `analytics`, `agent`, `reactinternalapp`, `reactexternalapp`, `angularinternalapp`, `angularexternalapp`. Vue (`vueinternalapp`) is left out of the fallback because stable CLI builds reject it; newer builds list it in the live parse. If the parse failed and the user wants Vue, say the template list could not be read and ask them to update the Salesforce CLI. UI-bundle templates are named `<framework><audience>app`; internal = employee-facing, already authenticated; external = customer/partner-facing with login, registration, and profile.

**Intent shortcut first.** Take it **only when the request resolves to exactly one template in the live list.** Otherwise use the picker; never guess. Resolve `{template}` directly when:

  • The request **names a non-UI template**: "empty/minimal project" → `empty`; "analytics project" → `analytics`; "agent project" → `agent`; "standard project" → `standard`.
  • The request is a **UI-bundle app where the live list leaves one match for the framework and audience given**: "internal React app" → `reactinternalapp`; "customer-facing Angular portal" → `angularexternalapp`; "Vue app" → `vueinternalapp` (the only Vue template, so no audience to ask).

**A description of the app is NOT a template name.** "A personal todo app", "an inventory tracker", "a CRM for my team" say *what* to build, not *which* template, so they do not qualify for the shortcut. Do not infer `standard` (or any template) from the app's purpose; `standard` being the picker's default does not license skipping the picker.

Everything else goes to the picker, including:

  • a bare "new project" with no template named (the picker defaults to **Standard**),
  • a described app with no template or framework named, and
  • a **partially specified UI app**, such as "create a React app" with no audience. Never assume an audience; skip the top-level picker and ask only the missing piece in the follow-up below.

**Otherwise ask one `AskUserQuestion` — "What kind of project?"** (single-select, four options). `AskUserQuestion` caps at four choices, so the picker shows the four most-requested kinds; **`empty` is deliberately omitted** and reached only via the shortcut.

  • **Standard** → `standard` (default): general-purpose `force-app` metadata project (Apex, LWC, objects, flows).
  • **Agentforce agent** → `agent`: ships a sample Local Info Agent.
  • **CRM Analytics** → `analytics`: adds the `waveTemplates` directory.
  • **UI web app (React / Angular / Vue)** → a UI-bundle starter. Ask a follow-up `AskUserQuestion` ("Which UI framework?") with one option per framework in the live list. Then, only if the chosen framework has both `internal` and `external` templates, ask "Who is the audience?" (internal or external). A framework with a single template needs no audience question.

The resolved template is `{template}`, which feeds Step 3. When the live CLI adds a template, it surfaces through the live parse; only add a keyword to the intent shortcut if it is a rarely-picked non-UI template.

Step 2: Choose a Project Name

Prompt the user for a project name. It becomes the new directory name **and is interpolated into the shell commands below**, so it MUST be strictly validated before any command uses it — never pass a raw name through.

**Validate, then reject-and-re-prompt.** Run this check on the candidate before it is used anywhere. Pass the candidate inside single quotes, exactly as typed. The regexes live in the command, so the check is deterministic:

node -e 'const [kind, value] = process.argv.slice(1); const re = {name: /^[A-Za-z0-9][A-Za-z0-9_-]*$/, namespace: /^(?=.{1,15}$)[A-Za-z][A-Za-z0-9]*(_[A-Za-z0-9]+)*$/, package: /^[A-Za-z0-9_][A-Za-z0-9_-]*(\/[A-Za-z0-9_][A-Za-z0-9_-]*)*$/, apiversion: /^[0-9]+\.0$/}[kind]; process.exit(re.test(value) ? 0 : 1)' name '{candidate}' && echo valid || echo invalid

Use `name` as the kind for the project name. Ste

Read more
@forcedotcom
Ships withsf-skills

This repository provides Salesforce agent skills, plugins, and sample apps for building applications.

1.1k200 skills6 agents4 MCP
Get the whole plugin

Stars on GitHub

Momentum

stars in total
1.1k
Star history of forcedotcom/sf-skills on GitHub, a chart by star-history.com

Other skills on sf-skills.

agentforce-observe

agentforce-observe

Analyze production Agentforce agent behavior using session traces and Data Cloud, and manage Agent Health Monitoring (AHM)…

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills12d309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc13d293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react3d252k
@facebook@facebookInstall Skill

Questions about dx-project-create.

Which coding agents can use dx-project-create?
dx-project-create installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.