Evolving The Data Model
TriliumNext/Trilium
A skill your agent uses when adding a DB migration or a new column/field to a Becca entity in Trilium ("add a migration", "new column on notes/attributes", "ALTER TABLE", "add a field to…
Creates and updates OrchardCore data migrations (DataMigration classes with CreateAsync/UpdateFromX).
$ npx skills add OrchardCMS/OrchardCore --skill orchardcore-data-migration -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install OrchardCMS/OrchardCore orchardcore-data-migration --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/OrchardCMS/OrchardCore.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/orchardcore-data-migration .claude/skills/orchardcore-data-migration && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "orchardcore-data-migration" agent skill from https://github.com/OrchardCMS/OrchardCore/tree/main/.agents/skills/orchardcore-data-migration into .claude/skills/orchardcore-data-migration/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "orchardcore-data-migration", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/OrchardCMS/OrchardCore/tree/main/.agents/skills/orchardcore-data-migrationType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add OrchardCMS/OrchardCore --skill orchardcore-data-migration -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install OrchardCMS/OrchardCore orchardcore-data-migration --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/OrchardCMS/OrchardCore.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.agents/skills/orchardcore-data-migration .agents/skills/orchardcore-data-migration && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "orchardcore-data-migration" agent skill from https://github.com/OrchardCMS/OrchardCore/tree/main/.agents/skills/orchardcore-data-migration into .agents/skills/orchardcore-data-migration/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "orchardcore-data-migration", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add OrchardCMS/OrchardCore --skill orchardcore-data-migration -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install OrchardCMS/OrchardCore orchardcore-data-migration --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/OrchardCMS/OrchardCore.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.agents/skills/orchardcore-data-migration .cursor/skills/orchardcore-data-migration && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "orchardcore-data-migration" agent skill from https://github.com/OrchardCMS/OrchardCore/tree/main/.agents/skills/orchardcore-data-migration into .cursor/skills/orchardcore-data-migration/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "orchardcore-data-migration", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/OrchardCMS/OrchardCore.git --path .agents/skills/orchardcore-data-migration--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add OrchardCMS/OrchardCore --skill orchardcore-data-migration -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install OrchardCMS/OrchardCore orchardcore-data-migration --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/OrchardCMS/OrchardCore.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.agents/skills/orchardcore-data-migration .gemini/skills/orchardcore-data-migration && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "orchardcore-data-migration" agent skill from https://github.com/OrchardCMS/OrchardCore/tree/main/.agents/skills/orchardcore-data-migration into .gemini/skills/orchardcore-data-migration/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "orchardcore-data-migration", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install OrchardCMS/OrchardCore orchardcore-data-migrationInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add OrchardCMS/OrchardCore --skill orchardcore-data-migration -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/OrchardCMS/OrchardCore.git skills-src && mkdir -p .github/skills && cp -r skills-src/.agents/skills/orchardcore-data-migration .github/skills/orchardcore-data-migration && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "orchardcore-data-migration" agent skill from https://github.com/OrchardCMS/OrchardCore/tree/main/.agents/skills/orchardcore-data-migration into .github/skills/orchardcore-data-migration/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "orchardcore-data-migration", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add OrchardCMS/OrchardCore --skill orchardcore-data-migration -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install OrchardCMS/OrchardCore orchardcore-data-migration --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/OrchardCMS/OrchardCore.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.agents/skills/orchardcore-data-migration .opencode/skills/orchardcore-data-migration && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "orchardcore-data-migration" agent skill from https://github.com/OrchardCMS/OrchardCore/tree/main/.agents/skills/orchardcore-data-migration into .opencode/skills/orchardcore-data-migration/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "orchardcore-data-migration", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
orchardcore-data-migrationCreates and updates OrchardCore data migrations (DataMigration classes with CreateAsync/UpdateFromX).
Orchardcore Data Migration is an agent skill from OrchardCMS/OrchardCore. Creates and updates OrchardCore data migrations (DataMigration classes with CreateAsync/UpdateFromX). Use when the user needs to alter content type definitions, create or change SQL index tables, patch existing content items, run a recipe migration, or version a module's schema.
Its SKILL.md is about 1.7k tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files, including reference files (for example `references/patterns.md` and `references/schema-builder.md`).
It sits in Databases, covering SQL. It works with SQL. The repository describes itself as: Orchard Core is an open-source modular and multi-tenant application framework built with ASP.NET Core, and a content management system (CMS) built on top of that framework. The licence is BSD-3-Clause.
5 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit 545c6a0. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md (its code samples are csharp).
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Orchardcore Data Migration loads about 1.7k tokens when it runs, and up to ~3.8k if it reads all its reference files. Until then it costs about 77 tokens; SKILL.md has 590 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from OrchardCMS/OrchardCore at commit 545c6a0, republished under its BSD-3-Clause licence (© OrchardCMS). 590 words, ~1,676 tokens.
.claude/skills/orchardcore-data-migration/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.This skill guides you through writing OrchardCore data migrations following project conventions.
A data migration is a class that inherits DataMigration. OrchardCore discovers its methods by reflection and runs them sequentially, per tenant, on application start. The chain starts at CreateAsync() and continues through UpdateFrom1Async(), UpdateFrom2Async(), … Each method returns the schema version number the next method must match.
IContentDefinitionManager).SchemaBuilder).ISession.SaveAsync).IRecipeMigrator).The migration runner stores the last returned number per migration class per tenant. It then calls the method whose name matches: returned 4 → runs UpdateFrom4Async(). The method's return value is the new stored version.
| Rule | Why |
|---|---|
CreateAsync runs only on a fresh install. | Existing tenants already passed it. |
CreateAsync returns the current latest version, skipping all UpdateFromX. | New sites get the final schema directly. |
UpdateFromXAsync runs only when stored version == X. | Sequential upgrade path. |
| Never renumber an already-shipped method. | Other tenants store the old number; renumbering breaks their upgrade. |
Each UpdateFromX returns X+1 (usually). | Skipping is allowed when a later step subsumes an earlier one (return a higher number to jump). |
Place Migrations.cs in the module root (or a Migrations/ subfolder for multiple classes, e.g. Migrations/PermissionMigrations.cs).
using OrchardCore.ContentManagement.Metadata;
using OrchardCore.Data.Migration;
namespace YourModule;
public sealed class Migrations : DataMigration
{
private readonly IContentDefinitionManager _contentDefinitionManager;
public Migrations(IContentDefinitionManager contentDefinitionManager)
{
_contentDefinitionManager = contentDefinitionManager;
}
public async Task<int> CreateAsync()
{
// ... define schema ...
// Return the latest version so new installs skip every UpdateFromX.
return 1;
}
}SchemaBuilder is injected by the base class — do not add it as a constructor parameter.
In the module Startup.cs:
services.AddDataMigration<Migrations>();Register each migration class separately if the module has more than one.
CreateAsyncReturn the highest version your module currently ships. Example (content part):
public async Task<int> CreateAsync()
{
await _contentDefinitionManager.AlterPartDefinitionAsync("TitlePart", builder => builder
.Attachable()
.WithDescription("Provides a Title for your content item."));
// Shortcut other migration steps on new content definition schemas.
return 2;
}UpdateFromX for each shipped changeWhen you change the schema in a release, append a new UpdateFromXAsync — never edit a prior one. Bump the number CreateAsync returns to match.
// This code can be removed in a later version.
public async Task<int> UpdateFrom1Async()
{
await SchemaBuilder.AlterIndexTableAsync<LinkFieldIndex>(table => table
.AddColumn<string>("BigUrl", column => column.Nullable().Unlimited()));
return 2;
}CreateAsync executes, schema lands at the latest version.UpdateFromX runs in order.try/catch (see references/schema-builder.md).| Method | Forms | Runs when |
|---|---|---|
| Create | int Create() · Task<int> CreateAsync() | fresh install |
| Update | int UpdateFromX() · Task<int> UpdateFromXAsync() | stored version == X |
| Uninstall | void Uninstall() · Task UninstallAsync() | feature uninstalled |
Static or instance, sync or async — all supported. Async (...Async) is the convention for new code.
| Goal | API |
|---|---|
| Define/alter content type | _contentDefinitionManager.AlterTypeDefinitionAsync(...) |
| Define/alter part | _contentDefinitionManager.AlterPartDefinitionAsync(...) |
| Remove part / type | RemovePart(...), DeletePartDefinitionAsync(...) |
| Create SQL index table | SchemaBuilder.CreateMapIndexTableAsync<TIndex>(...) |
| Add/drop column or index | SchemaBuilder.AlterIndexTableAsync<TIndex>(...) |
| Run a recipe | _recipeMigrator.ExecuteAsync("init.recipe.json", this) |
| Patch content items | ISession.Query<ContentItem, ContentItemIndex>(...) + SaveAsync |
| Method | Effect |
|---|---|
.Creatable() | Appears in the New menu |
.Listable() | Shows in content list |
.Draftable() | Supports drafts |
.Versionable() | Keeps version history |
.Securable() | Per-type permissions |
.WithPart("PartName") | Attaches a part |
.WithLength(n)) or .Unlimited() — unlengthed columns fail on some providers.CreateAsync should return the latest version, not 1, once UpdateFromX methods exist.DocumentId and call FlushAsync() periodically (see references/patterns.md).UpdateFromX methods with // This code can be removed in a later version. but keep them until you drop support for that upgrade path.references/patterns.md — content definition changes, content-item data patching, recipe migrationsreferences/schema-builder.md — index tables, columns, indexes, provider quirkssrc/docs/reference/modules/Migrations/README.md (repo) — official referenceAGENTS.md (repo root) — build commands© OrchardCMS, BSD-3-Clause. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 2 other files (references) in .agents/skills/orchardcore-data-migration of OrchardCMS/OrchardCore.
Open the folder on GitHubat commit 545c6a0
Orchardcore Data Migration next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Orchardcore Data Migration this skillOrchardCMS/OrchardCore | 8.2k | — | ~1.7k | Automated safety check: Pass | BSD-3-Clause | |
| Evolving The Data ModelTriliumNext/Trilium | 38k | — | ~2.1k | Automated safety check: Pass | AGPL-3.0 | |
| SQL Optimization Patternsynulihao/AgentSkillOS | 617 | 11 repos | ~3.3k | Automated safety check: Pass | None | |
| SQL PortabilityHL7/sql-on-fhir | 151 | — | ~512 | Automated safety check: Pass | Custom licence | |
| StmoSAP/project-foxhound | 180 | 2 repos | ~1.8k | Automated safety check: Pass | GPL-3.0 | |
| DB Migrationskurealnum/dotfiles | 290 | — | ~820 | Automated safety check: Pass | None |
TriliumNext/Trilium
A skill your agent uses when adding a DB migration or a new column/field to a Becca entity in Trilium ("add a migration", "new column on notes/attributes", "ALTER TABLE", "add a field to…
ynulihao/AgentSkillOS
Master SQL query optimization, indexing strategies, and EXPLAIN analysis to dramatically improve database performance and eliminate slow queries.
HL7/sql-on-fhir
Analyse whether a SQL query is portable across database implementations using sqlglot transpilation.
SAP/project-foxhound
Manage Redash queries and dashboards on Mozilla's STMO (sql.telemetry.mozilla.org) using stmo-cli.
kurealnum/dotfiles
A skill your agent uses when generating or regenerating Drizzle migration files, changing database schema tables or columns, resolving migration sequence conflicts after rebase, reviewing migration…
ChatbotXIO/ChatbotX
Work with the ChatbotX contact filter system — the shared filter model behind the contacts list, conversations, and broadcast audiences.
OrchardCMS/OrchardCore
Creates and updates OrchardCore admin edit views using the ocat- CSS class conventions.
OrchardCMS/OrchardCore
Builds, watches, and manages frontend assets in OrchardCore.
OrchardCMS/OrchardCore
Controls how OrchardCore renders content — placement.json rules, display drivers, shapes, zones, alternates, and editor groupings (tabs/cards/columns).
OrchardCMS/OrchardCore
Authors OrchardCore documentation — MkDocs Material pages, module README docs, nav entries, admonitions, tabbed content, and redirects.
OrchardCMS/OrchardCore
Localizes OrchardCore apps — UI strings (IStringLocalizer/IViewLocalizer S, T, H), PO files and pluralization, content translation (LocalizationPart, culture picker), and supported-culture…
OrchardCMS/OrchardCore
Creates new OrchardCore modules with proper structure, manifest, startup, and patterns.
Works with
Categories
Creates and updates OrchardCore data migrations (DataMigration classes with CreateAsync/UpdateFromX). Orchardcore Data Migration is an agent skill from OrchardCMS/OrchardCore. Creates and updates OrchardCore data migrations (DataMigration classes with CreateAsync/UpdateFromX).
Orchardcore Data Migration fits situations like: the user needs to alter content type definitions; change SQL index tables; patch existing content items; run a recipe migration.
Run `npx skills add OrchardCMS/OrchardCore --skill orchardcore-data-migration -a claude-code`. Or copy the skill folder (.agents/skills/orchardcore-data-migration in OrchardCMS/OrchardCore) into .claude/skills/orchardcore-data-migration in your project. Claude Code loads it when a task matches its description.
Run `npx skills add OrchardCMS/OrchardCore --skill orchardcore-data-migration -a codex`. Or copy the skill folder (.agents/skills/orchardcore-data-migration in OrchardCMS/OrchardCore) into .agents/skills/orchardcore-data-migration in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add OrchardCMS/OrchardCore --skill orchardcore-data-migration -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/orchardcore-data-migration, .gemini/skills/orchardcore-data-migration, .github/skills/orchardcore-data-migration and .opencode/skills/orchardcore-data-migration in your project.
SKILL.md names no scripts, command-line tools or credentials: Orchardcore Data Migration is instructions for the agent only.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Orchardcore Data Migration is published under the BSD-3-Clause licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.7k tokens (SKILL.md is roughly 6.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 2.1k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Orchardcore Data Migration: Evolving The Data Model (TriliumNext/Trilium, 38k stars), SQL Optimization Patterns (ynulihao/AgentSkillOS, 617 stars), SQL Portability (HL7/sql-on-fhir, 151 stars) and Stmo (SAP/project-foxhound, 180 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
OrchardCMS (a GitHub organization) maintains it in OrchardCMS/OrchardCore, which has 8,195 GitHub stars. The repository holds 16 skills in this directory. The repository was last updated on October 9, 2026.
Source: OrchardCMS/OrchardCore on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.