Loading...
Loading...
Use when authoring a NEW Datex Studio hub configuration (configurationTypeId=2) on a branch — filter-driven container with tab grids, role-gated tabs, toolbar buttons. Owns the dead-wiring trap (hub filter -> tab configParameters -> grid inParams must stay in sync), filter-driven-tab pattern, and toolbar button wiring. Triggers: "create a hub", "add a tab to xxx_hub", "add a filter", "add a toolbar button to the hub", "role-gate a hub tab", "filter-driven tabs", "tab grid ignores filter value", "hub won't open", "dead wiring between hub filter and grid". For modifying an existing hub, see hub-editor.
npx skill4agent add datex/skills hub-creatorSee also:— modifying an EXISTING hub's toolbar/flows on a branch (this skill is for authoring NEW hubs).hub-editor
configurationTypeId_hub$flows$shell$utils$shellrequirements-gatheringgrid-creatorselector-creatorform-creatoreditor-creatorcomponent-wiring-checkconfigParametersinParamsdxs configurationdxs hub# 1. Build body.json from scratch (see references/hubs.md → Minimal Valid Skeleton)
# 2. Validate (recommended)
dxs configuration validate hub -b <branchId> -D body.json
# 3. Create
dxs configuration upsert hub -b <branchId> -D body.json# 1. Fetch — note the envelope wrapper
dxs configuration get hub <configId> -b <branchId> -O envelope.json
# 2. EXTRACT THE INNER BODY (round-trip footgun guard — see "Round-trip rule" below)
jq .json envelope.json > body.json
# 3. Edit body.json
# 4. Validate (recommended)
dxs configuration validate hub -b <branchId> -D body.json
# 5. Push
dxs configuration upsert hub -b <branchId> -D body.jsonhub-editordxs configuration upsert.jsonjq[Phase 1: Setup + Requirements]
Follow branch-setup.md for branch/connection selection
|
[requirements brief in context?]
+-----+-----+
| |
YES NO -> invoke `requirements-gathering`
| |
+-----+------+
|
[Phase 2: Author hub body]
Decide what the hub IS:
- which filters scope the experience
- which tabs (grids / other components) mount inside it
- role-gating, on_init access guard, hub-local flows
Consult references/hubs.md for file shape, $hub runtime,
required top-level fields, common patterns
|
[Phase 3: Wire toolbar / flows]
Toolbar buttons + click flows; dialog openers via $shell
Audit dead-wiring trap (hub filter -> tab configParameters
-> grid inParams MUST stay in sync) — invoke
`component-wiring-check` if mounted grids/selectors
need extension
|
[Phase 4: Validate + push]
dxs configuration validate hub -b <branchId> -D body.json
|
+----+----+
| |
CREATE MODIFY-EXISTING
| |
| use the corrected round-trip
| (get -O envelope -> jq .json -> body)
| |
+----+----+
|
v
dxs configuration upsert hub -b <branchId> -D body.json
(upsert creates or updates by referenceName — one command for both)
|
[Phase 5: Verify in Studio (optional)]
Reload the hub in the running app; confirm filters render,
tabs query, toolbar buttons fire
|
[invoke `post-edit-verification`; then `component-validator`]dxs source branch list --all-repos --status featurerequirements-gatheringrequirements-gatheringbody.json-hub.jsonconfigIdmoduleId*-selector.jsonselector-creatorconfigParameterdropdownConfig.configParametersvalue: ""contentConfiggrid-creatorconfigParametersinParamsvars$hub.vars.<id>varsonInitFlowConfig$hub.close()hubTitlehubDescriptionvaluetooltipplaceholderlabel"`Widget overview`"clickFlowConfig$flows.<Package>.<fn>$shell.<Package>.open<referenceName>Dialog(...)on_initconfigParametersconfigParametersinParamsconfigParametersvalue: ""value: nullprojectsproject_idscontractcontract_idinParams$grid.inParams.<id>component-wiring-checkid$hub.toolbar.save.control...$hub.tabs.rules.hidden = ...# Validate the body locally against the branch
dxs configuration validate hub -b <branchId> -D body.json
# For a new hub
dxs configuration upsert hub -b <branchId> -D body.json
# For modify-existing (round-trip — never skip the jq extract)
dxs configuration get hub <configId> -b <branchId> -O envelope.json
jq .json envelope.json > body.json
# ... edit body.json ...
dxs configuration upsert hub -b <branchId> -D body.jsonconfigParametersidinParamscomponent-wiring-checkconfigParametersinParams$hub.refresh()on_initbody.jsonjq .jsonconfigurationTypeId: 2referenceName_hubconfigParametersinParams$hub.vars.<id>vars$flows.<Package>.<fn>$shell.<Package>.open<referenceName>Dialog(...)$hub.vars.<name>| Mistake | Fix |
|---|---|
Tab | Dead wiring — the value is silently dropped. Either drop the binding, or extend the grid's |
Piping | Silently destroys config content. Always |
Writing | The var is undeclared — write fails silently or runtime error. Declare every var. |
Calling an action directly from hub code ( | UI-tier rule: invoke functions only; wrap actions in a function. See |
Assigning to a filter or toolbar button's | No-op for dynamic tooltips — must bind to a declared |
| SQL column limit — push will fail validation. Tighten. |
| Import / lookup breaks. Snake_case, |
Tab | Cross-component reference rule — |
Two toolbar buttons (or two tabs) sharing the same | Silent overwrite — flow code can only address one of them. Make IDs unique within the hub. |
post-edit-verificationcomponent-validator