migraciones

migraciones is a skill for Claude Code from FacturaScripts/fs-claude-plugin. It costs 33 tokens per session (1,637 once invoked), scanned A, original, MIT.

A guide for creating FacturaScripts migrations, which are one-time changes to database data after a plugin is installed or updated.

In plain words
What is it for?
Use it to fill new fields, convert old values, clean broken references, normalize data, or correct records in a FacturaScripts plugin.
Why use it?
It helps prevent data changes from running repeatedly and clarifies that table structure changes belong in XML files instead.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the fs-dev plugin — 31 skills, 13 agents, 3 hooks shipped together

Good fit Use it to fill new fields, convert old values, clean broken references, normalize data, or correct records in a FacturaScripts plugin.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/facturascripts/fs-claude-plugin/migraciones
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.

Any agent
npx skills add FacturaScripts/fs-claude-plugin --skill migraciones
Clone the repo
git clone --depth 1 https://github.com/FacturaScripts/fs-claude-plugin

Made for: Claude Code.

Or install fs-dev, the plugin that ships this one along with the rest of its 31 skills, 13 agents, 3 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for migraciones

README.md
[![agentmods](https://agentmods.dev/badge/skills/facturascripts/fs-claude-plugin/migraciones/github.svg)](https://agentmods.dev/skills/facturascripts/fs-claude-plugin/migraciones)
Your own site
<a href="https://agentmods.dev/skills/facturascripts/fs-claude-plugin/migraciones"><img src="https://agentmods.dev/badge/skills/facturascripts/fs-claude-plugin/migraciones/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for migraciones

Your own site · 80×15
<a href="https://agentmods.dev/skills/facturascripts/fs-claude-plugin/migraciones"><img src="https://agentmods.dev/badge/skills/facturascripts/fs-claude-plugin/migraciones.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 33 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,637 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.1 $0.00033 $0.01637
Opus 5.5 $0.00013 $0.00655
Sonnet 5.5 $0.00007 $0.00327
Haiku 4.5 $0.00003 $0.00164

Measured 1mo ago against content hash 1e0793e0fdb7, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

migraciones 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 1mo ago.

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.

fs-dev/skills/migraciones/SKILL.md · 201 lines

How it starts

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

Skill: Migraciones en FacturaScripts

Las migraciones permiten ejecutar operaciones sobre datos de forma controlada y una única vez, tras activar o actualizar un plugin. Las ejecutadas se registran en MyFiles/migrations.json para no repetirlas.

Importante: las migraciones son para cambios en datos, nunca para cambios de estructura. La estructura la gestiona automáticamente DbUpdater a partir de los XML de Table/.

Documento de referencia: ../../references/docs/migraciones-de-tablas.md.

Cuándo usar migraciones

  • Rellenar nuevos campos con valores para registros existentes.
  • Migrar valores a un nuevo formato.
  • Normalizar datos de versiones anteriores.
  • Limpiar registros huérfanos o referencias rotas.
  • Corregir valores incorrectos o actualizar configuraciones de registros existentes.

Generar con fsmaker

fsmaker migration

Genera un archivo base en Migration/ listo para completar.

Paso 1: Crear la clase de migración

<?php
namespace FacturaScripts\Plugins\MiPlugin\Migration;

use FacturaScripts\Core\Template\MigrationClass;

/**
 * Rellena el campo 'prioridad' para clientes existentes al actualizar a v1.2.0.
 */
class RellenarPrioridadClientes extends MigrationClass
{
    /** Identificador descriptivo, con versión o fecha. */
    const MIGRATION_NAME = 'rellenar_prioridad_clientes_v1.2.0';

    public function run(): void
    {
        if (false === $this->db()->tableExists('clientes')) {
            return;
        }

        // exec() lanza RuntimeException si el SQL falla: la migración no se marca
        // como ejecutada y se reintentará en la próxima actualización
        $this->exec("UPDATE clientes SET prioridad = 'normal' WHERE prioridad IS NULL OR prioridad = ''");
    }
}

Paso 2: Registrar en Init.php

Las migraciones se lanzan desde update(), que se ejecuta al activar el plugin y al actualizarlo si está activo:

<?php
namespace FacturaScripts\Plugins\MiPlugin;

use FacturaScripts\Core\Migrations;
use FacturaScripts\Core\Template\InitClass;
use FacturaScripts\Core\Tools;

class Init extends InitClass
{
    public function init(): void
    {
    }

    public function update(): void
    {
        // Varias migraciones en orden cronológico: se detiene en la primera que falle
        $ok = Migrations::runPluginMigrations([
            new Migration\FixV1_0_0(),
            new Migration\FixV1_1_0(),
            new Migration\RellenarPrioridadClientes(),
        ]);

        if (false === $ok) {
            // el error ya está en el log y las pendientes se reintentarán en la próxima actualización
            Tools::log()->warning('Hay migraciones pendientes de MiPlugin.');
        }

        // Para una sola migración: Migrations::runPluginMigration(new Migration\RellenarPrioridadClientes());
    }

    public function uninstall(): void
    {
    }
}

Read the full file on GitHub · 201 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. 1mo ago Changed · +9 lines · -3 tokens per session 1e0793e0fdb7
  2. 3mo ago First seen · 192 lines · 36 tokens per session scan A f45e8b1ac2eb

Subscribe to this mod's changes

migraciones is a skill published in the GitHub repository FacturaScripts/fs-claude-plugin (11 stars, last pushed 8d ago), licensed MIT. It adds 33 tokens to every session and 1,637 once invoked, about $0.0001 per session on Opus 5.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

migraciones compared with skills from other repositories

migraciones next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
migracionesFacturaScripts/fs-claude-pluginSkill118d agoMITA33Claude Code
create-prprisma/ormSkill48ktodayApache-2.0A47Claude Code, Codex
schema-explorationlangchain-ai/deepagentsSkill32ktodayMITA57Claude Code, Codex
atlas-mssqlariga/atlasSkill8.9k5d agoApache-2.0A163Claude Code
ha-data-storesshiwenwen/hope-agentSkill1.9ktodayMITA115Claude Code, Codex
pentesting-mysqlxalgorix/xalgorixSkill1.5k2d agoApache-2.0A65Claude Code, Codex
nornicdb-cypher-queriesorneryd/NornicDBSkill937todayMITA79Claude Code, Codex