Skip to content
Skill

Repository

Guides building and reviewing Sankhya @Repository data-access interfaces for Addon Studio

Repository 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 Repository

This skill covers the data-access layer of Sankhya Addon Studio 2.0 addons. It walks the agent through declaring a repository interface that extends JapeRepository, choosing between inherited CRUD methods, @Criteria finders, @NativeQuery queries and @Modifying writes, and handling pagination and composite keys.

The guidance includes concrete rules for common pitfalls: null-checking findByPK results, declaring checked exceptions on calling methods, using @Parameter with explicit names, keeping S/N flags as literals in clauses, and externalizing multi-database queries into SQL or XML files. It also points to related skills for entities, macros and tests.

The skill expects a Java 8 project built with Gradle and the Sankhya JAPE SDK, with files encoded in ISO-8859-1. The instructions are written in Portuguese and reference Oracle and MSSQL syntax differences.

When your agent uses it

Cria, revisa e refatora interfaces `@Repository` Sankhya estendendo `JapeRepository<ID, Entity>` com `@Criteria`, `@NativeQuery`, `@Modifying`, `@Parameter(name = "...")`, paginação, `findByPK` (retorno nullable, `throws Exception`). Use ao criar, alterar, revisar, auditar ou padronizar a camada de acesso a dados, ao implementar consulta/listagem/filtro/paginação/busca — a query mora aqui, inclusive quando o pedido é só "listar/filtrar/paginar X" sem citar rota nem app: comece por aqui, não por `controller` nem pelo sub-agent `controller-designer`, mesmo que um endpoint venha depois; se o pedido cita endpoint, rota, REST ou app mobile, o dono é `controller`, que chama este repository, ao escrever query custom, ao paginar (registros por página) ou filtrar por faixa de data/período, ao trabalhar com arquivos `*Repository.java`, ou ao tocar em código com `@Repository`/`JapeRepository`.

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 (27 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/repository:

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

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

Claude Code docs on skills

Copy the skill folder to ~/.agents/skills/repository 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/repository &&
cp -R "$tmp/plugins/addon-studio/skills/repository" ~/.agents/skills/repository &&
rm -rf "$tmp"

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

Codex docs on skills

Copy the skill folder to ~/.cursor/skills/repository 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/repository &&
cp -R "$tmp/plugins/addon-studio/skills/repository" ~/.cursor/skills/repository &&
rm -rf "$tmp"

For one project only, put the folder in .cursor/skills/repository 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/repository

Or copy the folder to ~/.gemini/skills/repository yourself.

Gemini CLI docs on skills

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

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

For one project only, put the folder in .github/skills/repository 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/repository into your agent's skills folder as repository. Agents that support SKILL.md read one folder per skill.

The SKILL.md format

What it does

Repository interface setup
Shows how to declare a JapeRepository interface with the correct ID and entity type parameters.
Criteria-based finders
Explains @Criteria clause syntax, the required this. prefix and when to name parameters explicitly.
Native queries and results
Covers @NativeQuery with DTO result interfaces, simple return types and external SQL or XML files.
Write operations
Describes @Modifying methods, their allowed return types and the transactional wrapping they need.
Pagination limits
Explains PageRequest and Sort usage with @Criteria and the cursor-style paging without total counts.
Common pitfalls checklist
Lists frequent errors such as wrong imports, Optional misuse and Boolean parameters on S/N columns.

Good for

  • Create a repository with filtered lookups for a Sankhya table
  • Review an existing @Repository for misuse of findByPK or missing throws Exception
  • Add paginated listing by date range to a data-access layer
  • Write a native SQL query with a DTO result for a report
  • Convert a multi-database query into an XML file with Oracle and MSSQL variants

Repository FAQ

Does the skill support Spring Data style query method names?

No. It states that query methods by name are not supported and recommends @Criteria or @NativeQuery instead.

Can pagination be used with native queries?

No. Pagination is supported only with @Criteria, and Page exposes no total count, so a separate COUNT query is needed for totals.

What does findByPK return when no record exists?

It returns the entity type, which may be null, rather than an Optional, so the skill recommends a manual null check.

Which Java and build environment does Repository target?

The compatibility note lists Sankhya Addon Studio 2.0 with Wildfly/EJB and JAPE SDK, Java 8, Gradle and ISO-8859-1 encoding.

How do I install Repository in Claude Code?

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

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

The closest alternatives to Repository are Entity, Test, Before load listener, Sankhya utils and Data dictionary.

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