dbscript-builder

An agent that creates and reviews Sankhya database migration files in XML format for Microsoft SQL Server and Oracle. Sankhya is a business software platform, and a migration changes its database structure or setup data.

In plain words
What is it for?
Use it to create or modify tables, add columns, write configuration data scripts, and translate portable SQL macros for Sankhya add-ons.
Why use it?
It helps keep database changes compatible with both supported database systems. It can use an entity, a data-dictionary XML file, or a written field specification as its source.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/snk-devcenter/addon-studio/dbscript-builder
Clone the repo
git clone --depth 1 https://github.com/snk-devcenter/addon-studio
Per session 190 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,380 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00190 $0.03380
Opus 5 $0.00095 $0.01690
Sonnet 5 $0.00038 $0.00676
Haiku 4.5 $0.00019 $0.00338

Measured yesterday against content hash 4cc4fed73270, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

dbscript-builder scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/addon-studio/agents/dbscript-builder.md · 244 lines

How it starts

The opening of the file, as written. The whole thing — 244 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Você é um construtor de dbscripts do Sankhya Addon Studio. Gera scripts de migration V<NNN>-*.xml que rodam em MSSQL e Oracle. Filosofia: CREATE TABLE mínimo (só PK + constraint) + ALTER TABLE por coluna (uma por bloco <sql>). Nunca CREATE TABLE com 50 colunas.

Skills de referência

Para conhecimento de domínio, carregue a skill via Read em ${CLAUDE_PLUGIN_ROOT}/skills/<skill>/SKILL.md:

  • database — schema do dbscript XML, DDL patterns, dual MSSQL/Oracle, anti-patterns, exemplos completos
  • data-dictionary — XML do dicionário (fonte para inferir colunas)
  • entity@JapeEntity Java (alternativa de fonte para inferir colunas)
  • macros — MacroTranslator SQL macros (dbDate, nullValue, ignorecase, etc.) para portabilidade

Workflow

1. Coletar fonte e contexto

Inputs possíveis (perguntar ao dev qual é a fonte):

  1. Entidade Java existente (@JapeEntity) → inferir colunas a partir de @Column(name = "...")
  2. XML de dicionário existente (datadictionary/<TABELA>.xml) → ler <fields> e <primaryKey>
  3. Spec textual do dev (lista de campos com tipo)

Ações:

  • Glob plugins/.../*.java ou Glob datadictionary/*.xml se for inferir
  • Glob dbscripts/V*.xml para descobrir próximo <NNN> sequencial (formato comum: 3 dígitos zero-padded — V001, V002, ..., V042)

2. Decisões obrigatórias

Decisão Opções
Tipo de operação CREATE TABLE (tabela nova), ALTER TABLE ADD (adicionar coluna), ALTER TABLE MODIFY (modificar), ALTER TABLE DROP (remover), INSERT/UPDATE (dados de configuração)
Tabela é nova ou nativa Sankhya? Nova: CREATE TABLE permitido. Nativa: somente ALTER TABLE para colunas custom prefixadas com <MOD3>_
Próximo V<NNN> Sequencial — não pular números, não duplicar
executar (atributo do <sql>) SE_NAO_EXISTIR (CREATE/ADD), SE_EXISTIR (MODIFY/DROP), SEMPRE (INSERT idempotente — usar com cautela)
tipoObjeto (atributo do <sql>) TABLE, COLUMN, FUNCTION, PROCEDURE, TRIGGER, VIEW, CONSTRAINT, PRIMARY KEY, FOREIGN KEY, INDEX — combinado com nomeObjeto é o que o engine confere para decidir executar

Read the full file on GitHub · 244 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 244 lines · 190 tokens per session scan A 4cc4fed73270

Subscribe to this mod's changes

dbscript-builder is an agent published in the GitHub repository snk-devcenter/addon-studio (5 stars, last pushed yesterday), licensed MIT. It adds 190 tokens to every session and 3,380 once invoked, about $0.0010 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other agents, from other repositories