# Entity

> Entity is an open-source agent skill for developer tools. Creates, reviews and refactors Sankhya @JapeEntity Java entities with Lombok and JPA. It is available on Claude Code.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code
- **Website:** https://github.com/snk-devcenter/addon-studio/tree/main/plugins/addon-studio/skills/entity
- **Repository:** https://github.com/snk-devcenter/addon-studio
- **GitHub stars:** 7
- **License:** MIT
- **Skill name:** entity
- **Collection:** https://github.com/snk-devcenter/addon-studio
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-04

## About

This skill guides an AI coding agent through building and auditing Java entity classes for the Sankhya Addon Studio 2.0 platform. It covers the minimal mapping rules: @JapeEntity with entity and table names, @Id and @Column annotations that carry only a name, composite keys through @Embeddable, and relationship annotations such as @OneToMany, @OneToOne and @ManyToOne. It also explains naming conventions based on a project prefix and a three-letter module code, and how to choose Java types from the data dictionary.

The skill distinguishes between addon-owned tables and native Sankhya tables, setting the isNativeTable and isNativeInstance flags where needed, and lists which columns may appear in a native entity. It includes guidance on enum value objects, domain classes without persistence, and a checklist of common mistakes. Its reference files cover primary keys, relationships, a step-by-step walkthrough and full examples.

The skill expects a Java 8 and Gradle project using the Addon Studio layout, with a matching XML data dictionary in datadictionary/. It points to companion skills for dictionary XML, database scripts and merge-on-root extensions, which must be updated together when a published entity changes.

## When your agent uses it

> Cria, revisa e refatora entidades Java `@JapeEntity` Sankhya — Lombok (`@Data`/`@NoArgsConstructor`/`@AllArgsConstructor`), PK simples/composta com `@Embeddable`, `@Column`, `@Id`, `@JoinColumn`, `@OneToMany`/`@OneToOne`/`@ManyToOne`, `@Relationship`, naming `<PRX><MOD3><CTX>`, mapeamento de tipos (`Integer`/`BigDecimal`/`String`/`Boolean`/`Date`/`Timestamp`). Use ao criar, alterar, revisar, auditar ou padronizar entidades, ao modelar a classe de dados de uma spec/tabela, quando o dev diz que precisa "guardar isso no banco" e o entregável é a classe Java, ao ajustar campo pontualmente (renomear, trocar tipo), ou ao tocar em código com `@JapeEntity`. NÃO usar para erro de charset/acento em arquivo de entidade — isso é `encoding`. NÃO usar para campo novo em entidade nativa (Parceiro, Produto, Nota...) — isso é `merge-on-root`. Renomear ou adicionar coluna em entidade já publicada arrasta `dbscripts/` (ALTER, skill `database`) e `datadictionary/` (skill `data-dictionary`) — avise o dev e trate os três.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/snk-devcenter/addon-studio/tree/HEAD/plugins/addon-studio/skills/entity)
- [License: MIT](https://github.com/snk-devcenter/addon-studio/tree/HEAD/plugins/addon-studio/skills/entity)

## Features

- **Entity class mapping:** Sets up @JapeEntity classes with Lombok annotations and minimal @Column name-only mappings.
- **Composite primary keys:** Builds embeddable key classes for tables that use multi-column primary keys.
- **Relationship annotations:** Explains when to use one-to-many, one-to-one and many-to-one links with join columns.
- **Native table flags:** Handles isNativeTable and isNativeInstance for mapping existing Sankhya tables and instances.
- **Dictionary type mapping:** Chooses Java field types from data dictionary data types such as text, decimal, date and CLOB.
- **Enum value objects:** Creates enums whose stored value type follows the dictionary field definition.
- **Naming conventions:** Applies project prefix and module code rules to entity and table names.

## Good for

- Create a Java entity for a new table in my Addon Studio project
- Review an existing JapeEntity class for forbidden annotations
- Map a composite primary key with an embeddable class
- Rename a column or change a field type in an entity
- Add an enum for a list field from the data dictionary
- Map an entity that reads an existing Sankhya native table

## Install

### Claude Code

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

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

Or copy only this skill to `~/.claude/skills/entity`:

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

For one project only, put the folder in `.claude/skills/entity` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/entity` to use it in every repository:

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

For one repository only, put the folder in `.agents/skills/entity` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/entity` to use it in every project:

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

For one project only, put the folder in `.cursor/skills/entity` inside it instead.

### Gemini CLI

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

```sh
gemini skills install https://github.com/snk-devcenter/addon-studio.git --path plugins/addon-studio/skills/entity
```

Or copy the folder to `~/.gemini/skills/entity` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/entity`:

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

For one project only, put the folder in `.github/skills/entity` inside it instead.

### Other agents

Get the folder:

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

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

## FAQ

### What does the skill need to be installed?

It is a Claude Code plugin in the snk-devcenter marketplace, and it targets Sankhya Addon Studio 2.0 with Java 8, Gradle and ISO-8859-1 encoding.

### Does Entity change the database or the data dictionary too?

The skill itself does not change them, but its instructions say that renaming or adding a column to a published entity also affects the dbscripts and datadictionary files, which should be handled together with the related skills.

### When should Entity not be used?

The skill's description says not to use it for charset or accent errors in entity files, which belong to the encoding skill, or for new fields on native entities such as Partner or Product, which belong to merge-on-root.

### Which annotations are forbidden on entities?

The skill lists @Expression, @GeneratedValue, @Option and @Property as not allowed in the entity class, since that metadata belongs in the XML dictionary.

### How do I install Entity in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/entity to use it in all your projects, or to .claude/skills/entity 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 Entity 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 Entity?

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 Entity?

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

## Where this comes from

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

## Alternatives

- [Data dictionary](https://ai-powered.com/skills/data-dictionary): Data dictionary is an open-source agent skill for developer tools.
- [Merge on root](https://ai-powered.com/skills/merge-on-root): Merge on root is an open-source agent skill for developer tools.
- [Repository](https://ai-powered.com/skills/repository): Repository is an open-source agent skill for developer tools.
- [Test](https://ai-powered.com/skills/test-snk-devcenter): Test is an open-source agent skill for developer tools.
- [Type adapter](https://ai-powered.com/skills/type-adapter): Type adapter is an open-source agent skill for developer tools.
- [Mapstruct](https://ai-powered.com/skills/mapstruct): Mapstruct is an open-source agent skill for developer tools.
- [Listener](https://ai-powered.com/skills/listener): Listener is an open-source agent skill for developer tools.
- [Before load listener](https://ai-powered.com/skills/before-load-listener): Before load listener is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/entity
