npx skills add ...
npx skills add datex/skills --skill branch-code-reviewer
Use when reviewing the code/configuration changes on a Datex Studio feature branch. Traces dependencies, reads unified diffs across all changed configs, and produces a structured review with bugs / quality / security / performance / simplification / alignment findings plus a verdict. Trigger for: "review branch X", "code review this branch", "review the changes on <branch>", "audit branch before merge", "quality check this branch". For drafting a commit message on the same branch, use `commit-message-generator`.
npx skills add datex/skills --skill branch-code-reviewer
AI-assisted code review of Datex Studio branches using the dxs CLI. Reads
the branch's changes, traces dependencies of affected configs, reads unified
diffs, and produces a structured review summary with explicit severity tags
and a verdict.
impact-analysis skill — invoked in Step 4 (Dimension F) whenever a
changed config is a delete. It runs dxs source explore reverse-trace and
categorizes callers, which is the authoritative way to decide whether a
delete is safe. Do not emulate this manually with forward-traces —
forward-trace cannot answer "is anything still referencing the deleted
name?" (see the limitation note in Step 2).Run these two commands in parallel — they are independent:
The first gives a quick inventory of changed configs. The second gives the
intent (bug / feature), the assignee, sprint context, and (via --comments)
any in-thread discussion that might influence how a reviewer should read the
change.
Trace shows a config's forward dependencies — what it references (datasources, flows, grids, dialogs, backend flows) and which library each one comes from.
When to trace:
crud_create_flow from Utilities) or dialogs
from other modules. These are the seams where breakage is most likely.While tracing changed configs, watch for references to configs that this
same branch deletes. A changed config whose trace still lists a
just-deleted datasource or flow is a sign of incomplete cleanup — flag it,
even though delete-safety itself is handled by impact-analysis in Step 4.
Limitation: trace shows forward deps only, never reverse. To check whether a deleted config is safe to remove, trace the configs that might reference it and look for the deleted name in their dependency lists.
Full unified diffs for every changed configuration. This is the primary input for Step 4.
For each changed config, evaluate against all six dimensions. Not every dimension applies to every config — skip dimensions where there is nothing to say, but consider each one before skipping.
$utils, $flows)$select/$expand with $select)
would doWork item alignment — does the change actually address the stated bug/feature?
Fix altitude — is this a root-cause fix, or a workaround at the wrong
layer? A UI-level remap (e.g. rewriting a bad TypeId in a binding) may
mask a data-layer bug that will resurface everywhere else the entity is
read. If you can't tell which was intended, raise it in Questions for
Developer rather than guessing a severity.
Scope creep — are there unrelated changes bundled in?
Regression risk — could this break existing behavior?
Deleted-config safety — is the deleted config truly unused elsewhere?
For any config whose modification is delete in the changes inventory,
invoke the impact-analysis skill with that reference name and the
branch ID. It runs reverse-trace and returns the list of remaining callers.
Fold the result into the review:
[OK] Safe to delete.[INFO] with the
updated caller list for reference.[ISSUE] — the
delete will break those callers at runtime.Do not try to emulate this with forward-traces. Forward-trace cannot answer "what still references this deleted name?" (see Step 2's limitation note).
Evaluate whether the diffs gave you enough context to make clear determinations. If not, read larger contiguous chunks of the affected configs so you can understand the surrounding logic:
This is especially important when a one-liner change looks like a fix but may introduce side effects that are only visible in the surrounding code. A diff without context can hide the fact that the "fix" breaks something else.
Use the exact structure in Output Format below. The severity tags are the primary signal for what a reviewer should act on.
| Tag | Meaning |
|---|---|
[ISSUE] | Must fix before merge |
[WARNING] | Should fix; potential problem |
[INFO] | Observation, no action required |
[OK] | Reviewed, no concerns |
[OK] is worth including for dimensions that matter (security, alignment) so
the reader knows the reviewer actually checked — an unmentioned dimension
reads as "skipped", which is a different message.
explore trace saves an hour of
misreading a diff out of context.[ISSUE] means "must fix" — reserve it for real
blockers. Overusing it trains reviewers to ignore the tag.[INFO]; don't let
them dilute the findings section.[ISSUE] costs credibility; a sharp question gets an answer.| Mistake | Fix |
|---|---|
| Reading diffs without first tracing the affected configs | Step 2 first — context before content |
Marking everything [ISSUE] | Reserve [ISSUE] for real blockers; use [WARNING] / [INFO] for the rest |
| Skipping the Work Item Alignment check | Alignment is the most important dimension — do not skip it |
| Deleting a config without checking reverse references | Invoke impact-analysis on the deleted reference name; don't emulate with forward-trace |
| Relying on the diff alone when the change is subtle | Step 5: pull the full config with dxs source explore config to see surrounding logic |
| Enumerating whitespace/formatting noise as findings | Mark once as [INFO] (or suppress) — don't pad the report |
| Assigning a severity to something that hinges on unknowable intent | Move it to Questions for Developer instead of guessing |
dxs source changes --branch <ID>
dxs source workitems --branch <ID> --description --commentsdxs source explore trace <config_name> --branch <ID>dxs source changes --branch <ID> --with-diffsdxs source explore config <config_name> --branch <ID># Review — Branch <ID>
## Branch Overview
- **Branch:** <ID> (<status>)
- **Work Item:** <type> <NNNNNN> — <title>
- **Assigned to:** <Author>
- **Sprint:** <sprint name>
## Changes Table
| Config | Type | Action | Summary |
|---|---|---|---|
| `<name>` | <type> | <add/update/delete> | <one-line summary> |
| … | … | … | … |
## Detailed Findings
### Bugs
**`[ISSUE]` <headline>** (`<config>`)
<explanation, with inline code where helpful>
**`[WARNING]` <headline>** (`<config>`)
<explanation>
### Code Quality
…
### Security Concerns
…
### Performance
…
### Simplification Opportunities
…
### Work Item Alignment
…
### Scope
…
## Questions for Developer
1. <question>
2. <question>
## Verdict
**<Approve | Request Changes | Needs Discussion>** — <one-line rationale>.## Detailed Findings
### Bugs
**`[ISSUE]` Duplicate error check in save flow (`custom_field_editor`)**
The new create path checks `result.reason` twice:
if (result.reason) { /* show error */ } else { /* save option */ }
if (result.reason) { /* show error AGAIN */ } else { ... }
If `result.reason` is truthy, the error dialog shows twice. Looks like a
refactor artifact — the option-saving logic was inserted in the middle,
duplicating the error branch.
**`[WARNING]` `save_result` is unused (`custom_field_editor`)**
`const save_result = await $flows.Utilities.crud_create_flow({...});` — the
result is captured but never checked. If the create fails silently, the UDF
is created but its initial option value is lost with no error shown.
### Security Concerns
**`[OK]`** No new injection vectors. The datasource filter uses a template
literal with `$datasource.inParams.custom_field_id`, which is a typed number
param — low risk.
## Questions for Developer
1. The TypeId 5→1 remap is applied at the binding level — is this a display
fix, or does the API return the wrong TypeId and the data layer needs the
fix instead?
2. `save_result` from creating the initial option value is never checked —
is silent failure acceptable here?
## Verdict
**Request Changes** — the duplicate error handling will show two dialogs on
failure. The unchecked `save_result` is a secondary concern worth addressing.