← 返回列表
全部 Skill›DevOps›migrate-internal-package

migrate-internal-package

作者 @TryGhost · 语言 en
Move a package from another TryGhost repository into Ghost as an internal-only workspace package while preserving its Git history. Use for package migrations from repositories such as TryGhost/SDK or TryGhost/framework, including the history import PR, exceptional merge-commit handoff, source-repository removal PR, optional npm deprecation, migration cleanup, and modernization handoff.
DevOpsGit 工作流通用执行命令读写文件待翻译
最近源活动
—
检测 SKILL.md 语言
en
星标 ★
55,864
分支 Fork
0
安装选项
提示
指令
使用 AI 助手安装
将下面的提示复制到你正在使用的 AI 助手中。
下载完整 Skill 目录(含全部配套文件)。 下载压缩包 ↓
SKILL.md 原文预览

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.

Any contributor can run this skill. Do not require repository administration

permission for the audit, import, PR preparation, CI, read-only preflight,

post-merge verification or follow-up work. Administration is required only at

the exceptional merge checkpoint, which is handed to one of the small set of

Ghost repository administrators.

The contributor workflow is documented in

docs/contributing/internal-package-migrations.md.

Keep that guide aligned when this skill changes its outputs or human

checkpoints.

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 run the history import's --confirm operation. That command is the

deliberate human administrator checkpoint because it temporarily changes a

Ghost repository setting and merges the exceptional PR.

  • 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.

Initialize a fresh Ghost worktree with pnpm bootstrap, not pnpm setup.

pnpm setup is a pnpm CLI command that configures pnpm's global home and may

edit shell startup files; it does not invoke Ghost's repository bootstrap.

Before continuing, confirm the command installed the workspace, initialized the

submodules and configured the repository-local blame ignore file as described

by Ghost's root bootstrap script.

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:

All packages moved by this workflow belong in Ghost's root packages/

workspace. Derive the destination as packages/<package-directory> from the

source package directory and report that exact path to the user before creating

the subtree. Never place an imported package under ghost/, even when Ghost

Core is its only consumer. If the derived path conflicts with an existing path

or the request appears to require another workspace, stop and resolve the

destination explicitly before manipulating history.

  1. Find every Ghost and source-repository reference to the package name and

directory.

  1. Inspect its npm metadata, README, documentation, release configuration and

known public consumers.

  1. Confirm Ghost is the real owner and can consume it via workspace:*.
  2. Identify any need for independent releases or supported external use.

Publication or download counts alone do not prove that a package must remain a

supported public API. If supported external consumers still need new releases,

stop: this internal-only workflow is the wrong publishing model.

For the public-consumer audit, check npm metadata, first-party repositories and

documentation, plus GitHub code search for package dependencies and runtime

imports. Classify results as first-party consumers, independent integrations,

Ghost forks, or deployed Ghost installation snapshots. Forks and installation

snapshots show historical presence only. Require a recent update, current

deployment, active dependency or another freshness signal before treating them

as evidence of continued installation needs; even then, they do not establish

an independently supported API. Record the evidence and confidence behind the

ownership decision; stop and ask if current support expectations remain

unclear.

Run registry-only npm view commands from a neutral temporary directory. A

repository's devEngines policy can reject the host Node version before npm

contacts the registry, which is unrelated to the package metadata audit. Record

that failure separately if using a neutral directory does not resolve it.

Produce these work products in order

  1. A green Ghost import PR with reachable source history.
  2. After it merges, a green sou
评论
TTryGhost
TryGhost
TryGhost/Ghost
查看 GitHub 仓库 查看作者的其他 Skill
来源信息
作者@TryGhost
所属大类DevOps / Git 工作流
国内可用性通用
最近源活动—
风险提示执行命令、读写文件
提示:风险标签为程序静态扫描结果,仅作提示,不代表安全认证。安装前请阅读 SKILL.md 及其引用的脚本、权限,自行判断是否可信。