# Controller

> Controller is an open-source agent skill for developer tools. Builds and reviews Sankhya REST endpoints with @Controller, DTOs and transactions. 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/controller
- **Repository:** https://github.com/snk-devcenter/addon-studio
- **GitHub stars:** 7
- **License:** MIT
- **Skill name:** controller
- **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 the creation, refactoring and review of REST controllers in the Sankhya Addon Studio 2.0 environment. It covers the @Controller annotation and its serviceName and transactionType attributes, method-level @Transactional usage including the JAPE session needed for reads, and the flow from request DTOs through a MapStruct mapper to JPA-style entities and back to response DTOs.

The guidance also explains the HTTP protocol the endpoints follow: the service.sbr URL pattern, mgeSession authentication via MobileLogin, the JSON request body keyed by parameter name, and the shape of success and error responses. It includes validation annotations for input DTOs, rules for leaving business logic to services and exceptions to a global handler, and a checklist for new controllers.

Work is expected in Java 8 with Gradle, Lombok and javax validation, targeting the Sankhya Wildfly/EJB and JAPE SDK. The skill references companion skills for dependency injection, MapStruct, controller advice, repositories and testing.

## When your agent uses it

> Cria, revisa e refatora endpoints REST Sankhya com `@Controller` — `serviceName`, SP, `@Transactional`, DTOs, `@Valid`, mapeamento HTTP (GET/POST/PUT/DELETE), códigos de status. Use ao criar, alterar, revisar, auditar ou padronizar controllers REST, ao expor cadastro/feature via REST, ao integrar com app mobile/frontend, ao implementar listagem/lançamento/detalhamento/atualização/exclusão expostos por endpoint (pedido que só diz "listar/filtrar/paginar X" sem citar rota, REST ou app é a query, skill `repository`), ao receber spec de endpoint/API, ao declarar validação de entrada no DTO (`@Valid`, `@NotNull`, `@NotBlank`, `@Size` moram aqui; a resposta de erro da violação é `controller-advice`; injetar o repository/service no controller é `dependency-injection`), ao descobrir como chamar o endpoint de fora (URL a partir do `serviceName`/SP, chamada por Postman ou curl), ao trabalhar com arquivos `*Controller.java`, ou ao tocar em código com `@Controller`/`@GetMapping`/`@PostMapping`/`@RequestMapping`. NÃO usar

## 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/controller)
- [License: MIT](https://github.com/snk-devcenter/addon-studio/tree/HEAD/plugins/addon-studio/skills/controller)

## Features

- **Controller annotation setup:** Explains serviceName suffix rules and the transactionType options for controller classes.
- **Transaction and session handling:** Covers method-level @Transactional, TxType values and the JAPE session needed for reads.
- **DTO validation rules:** Shows request and response DTO patterns with common javax validation annotations.
- **HTTP request and response format:** Documents the service.sbr URL, mgeSession login and JSON request and response shapes.
- **Controller review checklist:** Lists steps and anti-patterns to check when creating or auditing a controller.

## Good for

- Create a REST endpoint to save an order in a Sankhya add-on
- Review an existing controller for missing @Valid or @Transactional
- Expose a list and detail endpoint for a mobile app
- Work out the URL and JSON body to call an add-on endpoint with curl

## 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/controller`:

```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/controller &&
cp -R "$tmp/plugins/addon-studio/skills/controller" ~/.claude/skills/controller &&
rm -rf "$tmp"
```

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

### Codex

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

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

### Cursor

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

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

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

### VS Code

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

```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/controller &&
cp -R "$tmp/plugins/addon-studio/skills/controller" ~/.copilot/skills/controller &&
rm -rf "$tmp"
```

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

## FAQ

### What does Controller need to be used?

It targets the Sankhya Addon Studio 2.0 environment with Java 8, Gradle, Wildfly/EJB and the JAPE SDK, and uses Lombok and javax validation in its examples.

### When does the skill trigger?

It applies when creating, changing, reviewing or auditing @Controller classes, exposing features over REST, or handling *Controller.java files. Consuming a third-party REST API is handled by another skill.

### Does Controller run any scripts?

No scripts are included; the skill provides guidance and reference examples in its SKILL.md and a references folder.

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

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

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

The closest alternatives to Controller are Controller advice, Test, Entity, Mapstruct and Java springboot.

## Where this comes from

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

## Alternatives

- [Controller advice](https://ai-powered.com/skills/controller-advice): Controller advice 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.
- [Entity](https://ai-powered.com/skills/entity): Entity 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.
- [Java springboot](https://ai-powered.com/skills/java-springboot): Java springboot is an open-source agent skill for developer tools.
- [Sankhya js](https://ai-powered.com/skills/sankhya-js): Sankhya js 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.
- [Callback](https://ai-powered.com/skills/callback): Callback is an open-source agent skill for developer tools.

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