# Database

> Database is an open-source agent skill for databases. Creates and audits dual MSSQL/Oracle database migration scripts for Sankhya addons. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/snk-devcenter/addon-studio/tree/main/plugins/addon-studio/skills/database
- **Repository:** https://github.com/snk-devcenter/addon-studio
- **GitHub stars:** 7
- **License:** MIT
- **Skill name:** database
- **Collection:** https://github.com/snk-devcenter/addon-studio
- **Categories:** [databases](https://ai-powered.com/categories/databases)
- **Listing updated:** 2026-12-04

## About

This skill guides the agent through writing and reviewing versioned XML migration files in the dbscripts folder of a Sankhya Addon Studio 2.0 project. It covers file naming, the sql element with separate mssql and oracle blocks, and the executar, tipoObjeto and nomeObjeto attributes that control when each script runs.

It sets project conventions for table, constraint, column and index naming, maps logical field types between Oracle and SQL Server, and adds CHECK constraints for closed-domain list and checkbox fields. It also lists common mistakes to avoid, such as adding columns to native tables, declaring foreign keys in DDL, and putting semicolons at the end of SQL.

The skill is written in Portuguese and expects a Sankhya addon project with a datadictionary and the Addon Studio build setup. Detailed script patterns and examples are kept in separate reference files.

## When your agent uses it

> Cria, audita e padroniza dbscripts Sankhya (`dbscripts/V<NNN>-*.xml`) com migrations dual MSSQL/Oracle. Cobre convenções de nomenclatura, mapeamento de tipos (`NUMBER`/`NUMERIC`/`INT`/`FLOAT`/`DECIMAL`/`VARCHAR`/`VARCHAR2`/`CHAR`/`DATE`/`DATETIME`/`TIMESTAMP`), estrutura `<sql>`/`<mssql>`/`<oracle>` e atributos `executar`/`tipoObjeto`/`nomeObjeto`. Use ao adicionar, alterar, revisar, padronizar ou auditar arquivos em `dbscripts/`, ao adicionar coluna, tabela, índice ou constraint (`ALTER TABLE`, `CREATE INDEX`, `NOT NULL`, PK/FK), ao popular dados de configuração ou parametrização inicial do módulo (seed/carga de linhas), quando o dev pergunta o que falta para o banco do cliente pegar um campo novo na atualização do addon, ao mapear tipos entre Oracle e MSSQL (função SQL portável — `NVL`, `SYSDATE`, `TRUNC` — é `macros`), ou ao tocar em SQL com tags `<mssql>`/`<oracle>`. `NOT NULL` na coluna é aqui; exigir valor preenchido (string vazia, regra de preenchimento) é `listener`. NÃO usar para coluna nova em tabel

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

## Features

- **Versioned migration naming:** Explains the V<NNN>-<OPERACAO>_<TABELA>.xml convention and sequential numbering for migration files.
- **Dual database script blocks:** Shows how each sql entry carries matching MSSQL and Oracle statements with the required attributes.
- **Type mapping across databases:** Maps data dictionary field types to Oracle and SQL Server column types, including decimal handling.
- **CHECK constraints for fixed domains:** Defines how list and checkbox fields get named CHECK constraints added in separate scripts.
- **Common migration pitfalls:** Lists anti-patterns such as native table changes, missing tags, and comments containing double dashes.

## Good for

- Create a new custom table with a primary key and add its columns one by one
- Audit existing dbscripts for missing MSSQL or Oracle tags and naming problems
- Add a new column to a custom addon table with the right migration file
- Change the allowed values of a list field by dropping and recreating its CHECK constraint
- Write idempotent seed data for initial module configuration

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

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

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

### Codex

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

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

### Cursor

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

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

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

### VS Code

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

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

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

## FAQ

### Can the skill add columns directly to native Sankhya tables?

No. It says native tables such as TGFCAB must not receive DDL from the addon; new fields go into an extension table through the merge-on-root skill, with an exception for tables the project already declares as native with fields.

### Does the skill require both MSSQL and Oracle statements?

Yes. Each sql entry should contain both mssql and oracle tags, in that order, as a project convention for dual-database portability.

### How are foreign keys handled?

Relationships are defined in the datadictionary through search fields rather than FOREIGN KEY clauses in the SQL, except for the required foreign key in merge-on-root extension tables.

### What happens if one sql statement fails?

According to the skill, the failing statement is logged and ignored, and the remaining statements in the same file still run, so later steps must protect themselves.

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

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

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

The closest alternatives to Database are Ssma console, Database migrations, Database migrations, Db change management and Scaffolding oracle to postgres migration test project.

## Where this comes from

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

## Alternatives

- [Ssma console](https://ai-powered.com/skills/ssma-console): Ssma console is an open-source agent skill for databases.
- [Database migrations](https://ai-powered.com/skills/database-migrations): Database migrations is an open-source agent skill for databases.
- [Database migrations](https://ai-powered.com/skills/database-migrations-nabwinsaud): Database migrations is an open-source agent skill for databases.
- [Db change management](https://ai-powered.com/skills/db-change-management): Db change management is an open-source agent skill for databases.
- [Scaffolding oracle to postgres migration test project](https://ai-powered.com/skills/scaffolding-oracle-to-postgres-migration-test-project): Scaffolding oracle to postgres migration test project is an open-source agent skill for databases.
- [Postgres database migration](https://ai-powered.com/skills/postgres-database-migration): Postgres database migration is an open-source agent skill for databases.
- [Migrating oracle to postgres stored procedures](https://ai-powered.com/skills/migrating-oracle-to-postgres-stored-procedures): Migrating oracle to postgres stored procedures is an open-source agent skill for databases.
- [Reviewing oracle to postgres migration](https://ai-powered.com/skills/reviewing-oracle-to-postgres-migration): Reviewing oracle to postgres migration is an open-source agent skill for databases.

---
Source: https://ai-powered.com/skills/database-snk-devcenter
