Shapediver appbuilder fork
Skill shapediver/agent-skills/skills/shapediver-appbuilder-fork
Agent skills for ShapeDiver
npx -y skills add shapediver/agent-skills --skill shapediver-appbuilder-forkAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Use this skill when the user wants to fork the open-source ShapeDiver App Builder React app to add custom UI components, integrate with backend services, or heavily modify the parameter layout. Covers repository structure, Mantine UI conventions, parameter commit patterns, and the boundary between forking and using the Viewer V3 API directly. Do NOT use this skill for theming, branding, colors, or logo changes — those are handled by the shapediver-appbuilder-theme skill without forking.
The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.
SKILL.md
7.6 KB, as published. Nobody here has run it
ShapeDiver App Builder — Open-Source Fork
Prerequisite: This skill assumes you have already read and followed the
shapediver-routerskill. If you arrived here directly, stop — readshapediver-routerfirst. It selects the correct integration strategy and gathers required credentials before any implementation skill is read.
Follow every rule in this file exactly. Do not improvise or work around any constraint.
Scope discipline: Only modify or create files directly related to the user's request. Do
not modify the src/shared submodule. Do not refactor existing App Builder code.
Fork the App Builder when you need custom React components but still want the App Builder's session management, parameter routing, model state handling, and responsive layout.
Workflow
Follow these steps in order.
Step 1: Set Up the Development Environment
Clone and initialize the repository:
git clone https://github.com/shapediver/AppBuilderSdk.git
cd AppBuilderSdk
pnpm i
git submodule init
git submodule update
pnpm start
This runs the app in development mode at http://127.0.0.1:3000.
Checkpoint: The dev server starts and loads the App Builder at localhost:3000.
Step 2: Understand the Architecture
Read these before writing any custom component:
- AppBuilderSdk — The main App Builder React application (TypeScript, Vite).
- AppBuilderShared — Shared hooks,
utilities, and components used by the App Builder. Included as a git submodule in
AppBuilderSdkunder thesrc/shareddirectory. Contains parameter handling logic, session management, state stores, and Mantine-based UI components.
AppBuilderShared directory layout (Feature-Sliced Design):
| Directory | Contents |
|---|---|
entities/ | Core domain entities |
features/ | Feature-level logic and components |
pages/ | Page templates (appshell default, grid alternative) |
shared/ | Low-level shared utilities and hooks |
widgets/appbuilder/ | App Builder widget components |
Key architectural facts:
-
Mantine is the UI library, Vite is the build tool.
-
State management uses zustand stores:
useShapeDiverStoreSession— manages viewer sessions.useShapeDiverStoreViewport— manages viewports.useShapeDiverStoreParameters— stateful abstraction of parameter and export functionality.
-
App Builder skeleton: The UI renders from a JSON "skeleton" defined by the
AppBuilderdata output. Type definitions are inshared/types/shapediver/appbuilder.ts. -
Page templates: Two templates available (
appshelldefault,grid). -
Parameter commit patterns use
onChangefor display +onChangeEndfor commit (Mantine's convention). This fires one commit at the END of interaction, not continuously.Wrong:
<Slider onChange={(v) => commitParam(p.id, v)} />— commits on every drag movement Correct:<Slider onChange={(v) => setLocal(v)} onChangeEnd={(v) => commitParam(p.id, v)} />— commits once at end
Checkpoint: You have reviewed src/shared and identified existing hooks and components
relevant to the user's request. You are reusing existing abstractions, not reinventing them.
Step 3: Implement the Custom Component or Widget
If adding a new widget type:
- Extend the skeleton type definition in
shared/types/shapediver/appbuilder.ts(look forIAppBuilderWidget). - Extend the skeleton validator in
shared/types/shapediver/appbuildertypecheck.ts. - Implement the widget React component.
- Plug it into
AppBuilderWidgetsComponentinshared/widgets/appbuilder/.
If modifying existing behavior: make targeted edits in the appropriate component or hook.
Checkpoint: The custom component uses existing stores and hooks from src/shared. The
commit pattern uses onChange for display + onChangeEnd for commit (not onChange alone).
Step 4: Verify and Deliver
Build and test the result.
Checkpoint — exit criteria (all must be true):
- The dev server starts without errors.
- The custom component renders and behaves as the user requested.
- Parameter commits fire once at interaction end, not continuously.
- No files outside the user's request were modified.
- The
src/sharedsubmodule was not modified.
Step 5: Verify Domain Whitelisting
The dev server runs at http://127.0.0.1:3000. If model metadata was retrieved via the
API script, check the allowedDomains array in the script output for a matching localhost
entry (e.g., localhost:3000, 127.0.0.1:3000).
If no matching entry exists, inform the user that they need to add localhost:3000 (or
127.0.0.1:3000) to the model's embedding domains at
https://www.shapediver.com/app/settings/domains before the app will work locally —
otherwise session creation will fail with HTTP 403.
Checkpoint: The dev server port matches a whitelisted domain, or the user has been informed about the domain whitelisting requirement.
Anti-Rationalization Table
| You will think… | Why it is wrong |
|---|---|
| "I'll write my own session management hook — it's simpler." | useShapeDiverStoreSession already handles this. Reinventing it introduces bugs and diverges from upstream updates. |
"I'll use onChange to commit slider values since Mantine supports it." | Mantine's onChange fires on every drag movement. Use onChange for display + onChangeEnd for commit — this is the App Builder's own pattern. |
| "I need to modify the shared submodule to add my widget." | New widgets plug in via AppBuilderWidgetsComponent without modifying shared code. Never modify src/shared. |
| "This would be easier with the Viewer API directly." | The fork gives you session management, parameter routing, and responsive layout for free. |
When to Fork vs. When to Use Viewer 3 API
- Fork when you want custom React components but still want the App Builder's session management, parameter routing, model state handling, and responsive layout.
- Viewer 3 API (see the
shapediver-viewerskill) when you need complete control over the viewport, camera, materials, interaction features, or a non-React stack.
Gives 0 of the 12 instructions most design systems skills give
Counted across 528 of the 534 authors here whose files we hold, read 2026-08-06
- create a custom theme if neededin 54 of 528, across 10 files
- read the corresponding theme filein 54 of 528, across 10 files
- ask which theme to applyin 53 of 528, across 9 files
- show the theme showcasein 53 of 528, across 9 files
- maintain visual identity across all slidesin 50 of 528, across 6 files
- apply the specified colors and fontsin 47 of 528, across 3 files
- get explicit confirmationin 45 of 528, across 1 file
- Generate a design system before codingin 19 of 528, across 6 files
- Maintain at least 4.5:1 color contrast ratioin 19 of 528, across 8 files
- Describe component shapes, colors, shadows, and interaction statesin 18 of 528, across 4 files
- Check Python installation and install if missingin 17 of 528, across 4 files
- Default to html-tailwind if stack is unspecifiedin 17 of 528, across 4 files
Said here and by no other author read
- follow the shapediver router skill first
- follow every rule exactly
- modify only files related to the request
- clone and initialize the repository
- reuse existing hooks and abstractions
- extend the skeleton type for new widgets
Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once.