Skip to content
Skill

Callback

Lets agents write, review and refactor Sankhya document callbacks with @Callback hooks

Callback is an open-source agent skill for developer tools. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

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

Similar skills

About Callback

This skill guides an agent through creating, reviewing and refactoring @Callback classes in the Sankhya Addon Studio 2.0 SDK. Such classes implement ICustomCallBack and run at fixed points of the commercial document lifecycle: header insertion or change, confirmation from the Central de Vendas or the Portal de Vendas, and batch billing in the portal. Because each class carries a single when/event pair, the skill stresses matching the event to the screen that triggers it.

The guidance covers the expected data keys and types for each event, the difference between BEFORE and AFTER timing, and how exceptions abort a confirmation. It also explains that AFTER callbacks run even when the operation failed, so they should check the error entry first, and that external calls should be asynchronous. It points to other skills for business rules on outgoing sales notes, JAPE CRUD listeners and grid action buttons.

Written in Portuguese for Java 8, Gradle and Wildfly/EJB projects with Guice injection. The skill ships as a single SKILL.md with no scripts.

When your agent uses it

Cria, revisa e refatora callbacks de documento Sankhya com `@Callback` (`ICustomCallBack` + `CallbackWhen` + `CallbackEvent`) — hooks que a plataforma dispara na inclusão/alteração do cabeçalho da nota, na confirmação pela Central de Vendas, na confirmação pelo Portal de Vendas e no faturamento em lote do portal. Use ao criar, alterar, revisar, auditar ou padronizar lógica que roda antes ou depois de confirmar documento comercial (pedido, nota de venda e também **nota de entrada/compra**), ao gerar ou emitir documento auxiliar antes da confirmação, ao abortar a confirmação com exceção, ao reagir ao resultado da confirmação inclusive quando ela falhou, ao interceptar inclusão/alteração de cabeçalho vinda dos portais ou de integração, ao interceptar o faturamento em lote no portal, ao trabalhar com classes `*Callback.java`, ou ao tocar em código com `@Callback`/`ICustomCallBack`. É também a skill de quem precisa descobrir **qual** `CallbackEvent` corresponde à tela: Central e Portal disparam eventos diferentes,

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 (19 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/callback:

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

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

Claude Code docs on skills

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

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

Codex docs on skills

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

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

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

Gemini CLI docs on skills

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

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

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

The SKILL.md format

What it does

Event selection by screen
Maps Central de Vendas, Portal de Vendas, portal billing and header insertion to the correct CallbackEvent.
BEFORE and AFTER timing
Explains when to validate or abort versus when to react to the result of an operation.
Data keys per event
Lists the exact keys and types passed in the data map for each event, including a casing pitfall.
Transaction and exception rules
Covers how thrown exceptions are wrapped, why checked exceptions are not allowed, and transaction propagation risks.
Anti-pattern checklist
Lists common mistakes such as duplicate annotations, synchronous API calls and misused messages, with fixes.

Good for

  • Validate a purchase invoice before it is confirmed in the Central de Vendas
  • Run a check when a sales order is confirmed from the Portal de Vendas
  • Send a confirmed document to an external system without blocking the confirmation
  • Intercept header changes coming from portal or integration imports
  • Review an existing callback class for wrong event or key names

Callback FAQ

Does Callback apply to purchase invoices?

Yes. The skill states that @Callback applies to all commercial documents, including Notas de Entrada, unlike @BusinessRule which covers outgoing sales notes and movements.

Which event should I use for the Central and the Portal?

Central de Vendas confirmations use PROCESS_CONFIRMATION and Portal de Vendas confirmations use CONFIRMATION. Each needs its own class because @Callback is not repeatable.

Do AFTER callbacks run if the operation failed?

Yes. The skill says AFTER runs even on error, so the callback should read the error entry and return early when it is set.

Does the skill need XML or manual registration?

No. The skill says the annotation alone is enough and no XML or parameter editing is needed; injected services still need Guice wiring.

How do I install Callback in Claude Code?

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

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

What are the best alternatives to Callback?

The closest alternatives to Callback are Listener, Sankhya utils, Test, Job and Sankhya js.

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. Builds and reviews Sankhya REST endpoints with @Controller, DTOs and transactions

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

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

    • Open source
    • 7 GitHub stars
    • Developer tools
  6. Creates and audits dual MSSQL/Oracle database migration scripts for Sankhya addons

    • Open source
    • 7 GitHub stars
    • Databases