Skip to content
Skill

Sankhya utils

Gives the agent the Sankhya Java backend utility classes to use instead of hand-written

Sankhya utils 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 Sankhya utils

This skill points the agent to the com.sankhya.util helper classes that the Sankhya platform already provides on the classpath of an Addon Studio project. It covers string null-safety and Brazilian formatting, BigDecimal rounding and division, date arithmetic on Timestamp values, collection and map checks, JDBC resource closing, dynamic IN clauses, XML and JSON reading, named resource locks, session temporary files, and CPF, CNPJ, e-mail and PIS validators.

The skill includes a substitution table that maps common hand-written patterns to the matching utility, along with a list of pitfalls. Examples include divide using two significant digits by default, some helpers not being null-safe, and StringUtils.isEmpty calling toString on arbitrary objects. It also explains which classes do not apply, such as REST validation and DTO mapping, which belong to other Addon Studio skills.

The skill targets Java 8 with Gradle in the Sankhya Addon Studio 2.0 environment, with Wildfly and JAPE. No extra dependency is needed because the package comes with the platform. It is meant for backend Java code, not the HTML5 front-end utilities of sankhya-js.

When your agent uses it

Classes utilitárias do backend Java que a plataforma Sankhya já expõe no classpath do addon (`com.sankhya.util`) — `StringUtils`, `BigDecimalUtil`, `TimeUtils`, `XMLUtils`, `JsonUtils`, `JdbcUtils`, `SQLUtils`, `CollectionUtils`, `MapUtils`, `ExceptionNavigator`, `ResourceLock`, `SessionFile`, `UIDGenerator`, validadores de CPF/CNPJ/e-mail/PIS. Use quando o cálculo, a conversão ou a formatação acontece no Java do addon (backend, não na tela). Dentro de um projeto Addon Studio, "arredondar para N casas", "tratar quando vier null" ou "formatar como moeda" não é pergunta genérica de Java, mesmo sem nenhum termo Sankhya na mensagem: carregue antes de responder, porque a resposta de memória (`setScale`/`String.format`/`NumberFormat`/`SimpleDateFormat` à mão) duplica utilitário que a plataforma já expõe no classpath; sem citar tela/`.js`/HTML é aqui (inclusive quando o valor é "pra mostrar"/"pra exibir": sem arquivo de tela citado, quem arredonda e formata é o Java). Use também antes de escrever à mão null-check, c

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 2 files (54 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/sankhya-utils:

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

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

Claude Code docs on skills

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

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

Codex docs on skills

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

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

Or copy the folder to ~/.gemini/skills/sankhya-utils yourself.

Gemini CLI docs on skills

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

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

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

The SKILL.md format

What it does

String null-safety helpers
Checks for empty, null and trimmed strings, plus safe equality and Brazilian masks for CPF, CNPJ, CEP and phone.
BigDecimal rounding and division
Null-safe arithmetic, half-up rounding, percentages and currency formatting for monetary values.
Timestamp date arithmetic
Adds days and years, clears time, compares dates ignoring hours and builds period boundaries.
Safe resource closing
Closes ResultSet, Statement and Connection without nested try/catch blocks.
Dynamic IN clause builder
Builds IN and NOT IN clauses that split large value lists into batches.
Document and e-mail validators
Validates CPF, CNPJ, e-mail and PIS numbers through dedicated validator classes.
Named resource locks
Serializes access to a business resource locally or across the cluster.

Good for

  • Round a monetary value to two decimal places in a service class
  • Build a due date by adding a number of days to today
  • Validate a CPF or CNPJ before saving a record
  • Close database resources cleanly in a DAO
  • Build a dynamic IN clause from a list of codes
  • Read values from an XML integration payload without null checks

Sankhya utils FAQ

Do I need to add a dependency to build.gradle?

No. The com.sankhya.util package comes with the platform classpath, so only the import is needed.

Should I use this for REST endpoint validation?

No. The skill says REST payload validation should use @Valid with DTOs, handled by the controller skill.

Is Sankhya utils for the HTML5 front end?

No. Front-end utilities with the same names belong to the sankhya-js framework and are excluded.

How do I install Sankhya utils in Claude Code?

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

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 Sankhya utils?

The closest alternatives to Sankhya utils are Test, Jsp, Callback, Sankhya js 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