Skip to content
Skill

Merge on root

Adds custom fields to native Sankhya records through a 1:1 extension table

Merge on root is an open-source agent skill for developer tools. It is available on Claude Code.

Scripts
None
Platforms
Claude Code
GitHub stars
7
Last commit
License
MIT
Listing updated

Similar skills

About Merge on root

This skill shows how to extend a Sankhya entity such as a partner, product or invoice with new fields without altering the native table. The data lives in a separate extension table that shares the root's primary key and is linked by a one-to-one relation marked for merge on root, so the platform shows both as a single record on screen.

The guide walks through the pieces: a dbscript that creates the extension table with a physical foreign key back to the root, a data dictionary file for the extension with its own tab layout, a relation declaration in the root's dictionary entry that sets insert and update flags, and the matching Java entities. It also lists pitfalls such as cascade settings, why one-to-many data needs a separate tab, and why existing records without an extension row are normal.

The skill is written for the Sankhya Addon Studio 2.0 stack, using Java 8, Gradle and ISO-8859-1 encoding, and it is meant for projects that follow the addon studio file layout.

When your agent uses it

Estende uma entidade com campos novos sem criar coluna na tabela dela — tabela de extensão com a mesma PK, ligada por `@OneToOne` com `@ref-param[merge-on-root=true]`, que a plataforma funde na tela e no registro da entidade raiz. É o caminho oficial para guardar informação nova em entidade nativa do Sankhya (Parceiro, Produto, Nota, TOP...). Use quando o dev pedir campo novo, coluna nova ou "guardar mais um dado" num cadastro ou documento nativo — "preciso de um campo a mais na tela de Parceiros", "adicionar uma flag no produto", "gravar X junto da nota" —, ao estender tabela do próprio addon sem mexer nela, ou ao revisar `<nativeTable>` com `<fields>`, `ALTER TABLE` em tabela nativa (`TGF*`, `TSI*`, `TCS*`) ou instância nova sobre tabela nativa. Em tabela nativa que o projeto ainda não declara em `<nativeTable>`, a resposta nunca é `ALTER TABLE` nem `<field>` dentro de `<nativeTable>`: o campo vai para a tabela de extensão; tabela que o projeto já estende por `<nativeTable>` segue o padrão que já usa. A tab

From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.

What it can access

From a static check of its 1 file (15 KB) on GitHub on 4 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.

Check another skill before you install it.

Install

This skill ships in the addon-studio plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

/plugin marketplace add snk-devcenter/addon-studio
/plugin install addon-studio@snk-devcenter

Or copy only this skill to ~/.claude/skills/merge-on-root:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/snk-devcenter/addon-studio.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/merge-on-root &&
cp -R "$tmp/plugins/addon-studio/skills/merge-on-root" ~/.claude/skills/merge-on-root &&
rm -rf "$tmp"

For one project only, put the folder in .claude/skills/merge-on-root inside it instead.

Claude Code docs on skills

Copy the skill folder to ~/.agents/skills/merge-on-root to use it in every repository:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/snk-devcenter/addon-studio.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/merge-on-root &&
cp -R "$tmp/plugins/addon-studio/skills/merge-on-root" ~/.agents/skills/merge-on-root &&
rm -rf "$tmp"

For one repository only, put the folder in .agents/skills/merge-on-root inside it instead.

Codex docs on skills

Copy the skill folder to ~/.cursor/skills/merge-on-root to use it in every project:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/snk-devcenter/addon-studio.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/merge-on-root &&
cp -R "$tmp/plugins/addon-studio/skills/merge-on-root" ~/.cursor/skills/merge-on-root &&
rm -rf "$tmp"

For one project only, put the folder in .cursor/skills/merge-on-root inside it instead.

Cursor docs on skills

Run in a terminal (add --scope workspace to install it for the current workspace only):

gemini skills install https://github.com/snk-devcenter/addon-studio.git --path plugins/addon-studio/skills/merge-on-root

Or copy the folder to ~/.gemini/skills/merge-on-root yourself.

Gemini CLI docs on skills

For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/merge-on-root:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/snk-devcenter/addon-studio.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/merge-on-root &&
cp -R "$tmp/plugins/addon-studio/skills/merge-on-root" ~/.copilot/skills/merge-on-root &&
rm -rf "$tmp"

For one project only, put the folder in .github/skills/merge-on-root inside it instead.

VS Code docs on skills

Get the folder:

git clone --depth 1 https://github.com/snk-devcenter/addon-studio.git

Then copy addon-studio/plugins/addon-studio/skills/merge-on-root into your agent's skills folder as merge-on-root. Agents that support SKILL.md read one folder per skill.

The SKILL.md format

What it does

Extension table design
Creates a table with the same primary key as the root entity and a foreign key to it.
Root relation setup
Declares a one-to-one merge relation in the native table's data dictionary entry.
Data dictionary fields
Defines extension fields and their tab placement inside the root record screen.
Java entity mapping
Provides entity classes for the extension and, when needed, the root with cascade settings.
Anti-pattern checklist
Lists practices to avoid, such as altering native tables directly or using one-to-many for merges.

Good for

  • Add an integration flag to the partner registration screen
  • Store an extra date field alongside a native product record
  • Attach a custom value to an invoice without changing its table
  • Review an addon project for direct changes to native Sankhya tables

Merge on root FAQ

Does Merge on root modify native Sankhya tables?

No. It avoids ALTER TABLE on native tables and places new columns in a separate extension table linked to the root record.

When should I use a one-to-many relation instead?

Merge on root only merges one-to-one data. When a root record needs several values, the guide recommends a child table shown in a separate tab.

What happens to existing records without an extension row?

That is the normal state. The extension row is created when the root record is saved with insert enabled.

How do I install Merge on root in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/merge-on-root to use it in all your projects, or to .claude/skills/merge-on-root in one project. Or install the addon-studio plugin, which includes it: /plugin marketplace add snk-devcenter/addon-studio, then /plugin install addon-studio@snk-devcenter.

Does Merge on root run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

Which AI agents can use Merge on root?

Claude Code. It reads skills in the SKILL.md format; the install steps on this page show where to put the folder.

What are the best alternatives to Merge on root?

The closest alternatives to Merge on root are Entity, Data dictionary, Repository, Sankhya js and Test.

Where this comes from

  • Description: from the skill's own SKILL.md.

More from snk-devcenter/addon-studio

  1. Adds dynamic search filters to Sankhya entity finders before the query runs

    • Open source
    • 7 GitHub stars
    • Developer tools
  2. Guides writing Sankhya commercial business rules with @BusinessRule for sales documents

    • Open source
    • 7 GitHub stars
    • Enterprise it
  3. Lets agents write, review and refactor Sankhya document callbacks with @Callback hooks

    • Open source
    • 7 GitHub stars
    • Developer tools
  4. Builds and reviews Sankhya REST endpoints with @Controller, DTOs and transactions

    • Open source
    • 7 GitHub stars
    • Developer tools
  5. Sets up global Sankhya exception handlers with rollback, error DTOs and HTTP status

    • Open source
    • 7 GitHub stars
    • Developer tools
  6. Generates Sankhya CRUD screens from table XML in datadictionary/ with no JS or HTML

    • Open source
    • 7 GitHub stars
    • Developer tools