migrate-internal-package

A procedure for moving a package into Ghost, the open-source publishing platform, as an internal workspace package while preserving its Git history.

In plain words
What is it for?
It guides migrations from TryGhost repositories, including history imports, pull requests, source removal, isolated worktrees, and authorization checks for administrative actions.
Why use it?
It prevents the package's development history from being lost and avoids a gap in which neither repository owns the code.

Skill for Claude CodeCodex

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 skills/tryghost/ghost/migrate-internal-package
Any agent
npx skills add TryGhost/Ghost --skill migrate-internal-package
Clone the repo
git clone --depth 1 https://github.com/TryGhost/Ghost

Made for: Claude Code, Codex.

Per session 77 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,225 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.00077 $0.02225
Opus 5 $0.00039 $0.01112
Sonnet 5 $0.00015 $0.00445
Haiku 4.5 $0.00008 $0.00222

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

Security

Grade A, and why

migrate-internal-package 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.

.agents/skills/migrate-internal-package/SKILL.md · 245 lines

How it starts

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

Migrate an internal package into Ghost

Move a package from another TryGhost repository into Ghost without losing its history or creating a period where neither repository owns it. Keep migration mechanics separate from Ghost's lifetime package standards.

Authority boundaries

Explain every cross-repository or administrative action before it happens.

  • A request for instructions is not permission to perform the action.
  • If the user says "tell me how, I do it", provide the command and wait.
  • Require explicit authorization before changing repository settings, merging a PR, deprecating npm versions, or force-pushing.
  • Never ask for, display, or store credentials or OTPs.

Work in isolated checkouts

Never manipulate history in a checkout containing unrelated work. Fetch both repositories, confirm the source checkout is clean, and create a dedicated Ghost worktree from the freshly fetched origin/main.

Run history-changing commands individually or in a fail-fast shell. A failed git worktree add must not be followed by git subtree add in whichever checkout happens to be current. Before choosing a branch or path, list existing worktrees and matching local and remote branches. Use a migration-specific slug, for example codex/import-<package>-from-<source>, rather than a generic name.

If the destination branch or path already exists, stop and inspect its cleanliness, base, divergence, source split and attached worktree. Do not mutate, delete or silently reuse it. Present the evidence and ask the user whether to resume, preserve and supersede, or remove it when more than one choice is reasonable. A previous attempt can contain valid unmerged history even when its remote branch is gone.

Before importing, record and compare the destination HEAD and origin/main; they must match. Recheck the first parent immediately after the subtree commit.

Confirm this workflow applies

Before changing either repository, record the source repository, its default branch, the package path within it, the destination path in Ghost, and whether the package has been published to npm. Then:

Read the full file on GitHub · 245 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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 · 245 lines · 77 tokens per session scan A 3886cd778294

Subscribe to this mod's changes

migrate-internal-package is a skill published in the GitHub repository TryGhost/Ghost (55,095 stars, last pushed today), licensed MIT. It adds 77 tokens to every session and 2,225 once invoked, about $0.0004 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-30.