migrate-agent-root

migrate-agent-root is a skill for Codex from DongLiStudio/personal-agent-foundation. It costs 85 tokens per session (1,071 once invoked), scanned A, original, Apache-2.0.

A procedure for safely moving an Agent root directory, including its shared settings and registered projects. It preserves Git history and rewrites affected internal paths and links.

In plain words
What is it for?
Use it to plan and execute an Agent-root migration, review excluded cache or build folders, rebuild links, validate the new location, and check project alignment afterward.
Why use it?
It reduces the risk of broken paths, lost project files, damaged links, or accidental deletion during a workspace move.

Skill for Codex

Written for Codex: agents/openai.yaml present. Also seen: installed under .agents/ (shared by several agents).

Good fit Use it to plan and execute an Agent-root migration, review excluded cache or build folders, rebuild links, validate the new location, and check project alignment afterward.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/donglistudio/personal-agent-foundation/migrate-agent-root
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 DongLiStudio/personal-agent-foundation --skill migrate-agent-root
Clone the repo
git clone --depth 1 https://github.com/DongLiStudio/personal-agent-foundation

Made for: Codex.

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 migrate-agent-root

README.md
[![agentmods](https://agentmods.dev/badge/skills/donglistudio/personal-agent-foundation/migrate-agent-root.svg)](https://agentmods.dev/skills/donglistudio/personal-agent-foundation/migrate-agent-root)
Your own site
<a href="https://agentmods.dev/skills/donglistudio/personal-agent-foundation/migrate-agent-root"><img src="https://agentmods.dev/badge/skills/donglistudio/personal-agent-foundation/migrate-agent-root.svg" alt="Measured on agentmods" height="20"></a>
Per session 85 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,071 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.
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.00085 $0.01071
Opus 5 $0.00043 $0.00535
Sonnet 5 $0.00017 $0.00214
Haiku 4.5 $0.00009 $0.00107

Measured 8d ago against content hash 9bc9aa2f57a8, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

migrate-agent-root 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 8d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/migrate_agent_root.py, scripts/test_migrate_agent_root.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

template/GLOBAL/.agents/skills/migrate-agent-root/SKILL.md · 67 lines

How it starts

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

Agent 根目录迁移

使用这个 Skill 编排完整 Agent 根目录迁移。迁移脚本只负责预检、计划、staging 复制、GLOBAL 内受管文本精确路径重写、PROJECTS.md 路径更新、链接/reparse 本体重建、验证、安装副本比对和消费项目对齐门禁结果;项目语义修复交给 align-agent-projects-with-global

固定边界

  • 默认 plan/--dry-run;执行前必须有用户明确确认。
  • 目标目录存在或非空时拒绝覆盖/合并。
  • 不跟随 Junction、symlink 或 reparse point;只记录并重建链接本体,不复制或删除外部目标,尤其不操作 Obsidian Vault。外部目标保持不变,源根内部目标重写到新根;权限不足或平台不支持时阻断并清理 staging/destination。
  • 保留嵌套 Git、分支、对象、历史和未提交内容;不得用 reset、checkout、reclone 代替迁移。
  • 默认排除可确定再生的依赖、缓存和构建输出(node_modules、Python/pytest/mypy 缓存、distsrc-tauri/target*);不得把任意 Git ignored 文件视为可再生内容。每个排除目录及其原因、文件数和字节数必须写入 manifest,禁止静默跳过。
  • 首次迁移不删除旧根;旧目录清理必须在新根验证且用户另行授权后作为独立步骤处理。
  • 任一步骤失败即停止切换,保留旧根并输出修复说明。

工作流

  1. 读取当前项目入口文件,以及 GLOBAL/README.mdGLOBAL_CONTEXT.mdPROJECTS.mdSKILL_DEPENDENCIES.md
  2. 先运行计划:
python scripts/migrate_agent_root.py plan --source OLD_ROOT --destination NEW_ROOT --report REPORT_DIR
  1. 审查 migration-manifest.json 和 Markdown 报告;确认目标为空、链接边界、待重写文本、Git 目录、可再生目录排除统计和风险提示。
  2. 用户确认后执行:
python scripts/migrate_agent_root.py execute --source OLD_ROOT --destination NEW_ROOT --report REPORT_DIR
  1. align-agent-projects-with-global 对迁移后的 GLOBAL 做门禁审计。脚本调用使用 audit 子命令,稳定输入包含:
    • old_root
    • new_root
    • global_change_summary
    • 可选 scope
    • report
  2. 把对齐报告交回迁移验证:
python scripts/migrate_agent_root.py verify --source OLD_ROOT --destination NEW_ROOT --report REPORT_DIR --align-report ALIGN_REPORT --require-align-pass

只有所有项目状态为 alignedno_change_needed 时,才宣布迁移完成并请用户从新根启动 Agent 确认切换。

脚本职责

scripts/migrate_agent_root.py 支持 planexecuteverify

  • --source:旧 Agent 根目录。
  • --destination:新 Agent 根目录。
  • --report:报告目录,写入 migration-manifest.jsonmigration-report.md
  • --dry-run:强制不写入,plan 默认等价 dry-run。
  • --align-report:读取 align-agent-projects-with-global 输出。
  • --require-align-pass:门禁失败时返回非零。

脚本只对白名单文本类型做精确旧根替换,支持 Windows 反斜杠、正斜杠和 JSON 转义反斜杠形式;除 manifest 明列的可再生目录外,二进制、Git 对象、数据库、未知格式和用途不明确的 ignored 文件均复制但不改写,并接受哈希一致、旧根残留、链接目标、编码/LF、敏感信息和门禁检查。

Read the full file on GitHub · 67 lines

Files

What ships with it

4 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. 8d ago First seen · 67 lines · 85 tokens per session scan A 9bc9aa2f57a8

Subscribe to this mod's changes

migrate-agent-root is a skill published in the GitHub repository DongLiStudio/personal-agent-foundation (11 stars, last pushed 21d ago), licensed Apache-2.0. It adds 85 tokens to every session and 1,071 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.

Related

Other skills, from other repositories

harness

Use when governing a workspace's control plane, code or not — the 01-TOOLS/ tooling layer, the 02-DOCS/ chaos→knowledge wiki, the root Knowledge map. Audits it, migrates legacy XX- folders, scaffolds provider tooling, sweeps the inbox, writes root CLAUDE.md/AGENTS.md. NOT the bootstrap front door (that is init, which…

ericrisco/rsc-harness · 94 tokens

swarmauri-add-standards-standalone

Add a first-class standalone Swarmauri package under pkgs/standards. Use when Codex needs package scaffolding, workspace membership, pyproject metadata, Swarmauri or Tigrbl branding, entry points, first-class citizenship registry rows, exports, tests, and validation.

swarmauri/swarmauri-sdk · 69 tokens

recipe-create-meet-space

Create a Google Meet meeting space and share the join link.

googleworkspace/cli · 18 tokens

atmos-config

Atmos root configuration: atmos.yaml discovery, precedence, deep merging, basepath, imports, minimal bootstrap, and routing to narrower Atmos skills.

cloudposse/atmos · 31 tokens

workthreads

SpecStory Workthreads - a weekly work-thread rollup across a team's repos from SpecStory coding histories (any agent - Claude Code, Codex, Cursor, Gemini, and more). It groups the window's sessions into threads of work per project and labels each new / open / recently closed, so a lead sees what shipped, what is still…

specstoryai/getspecstory · 126 tokens

story-readiness

Validate that a story file is implementation-ready. Checks for embedded GDD requirements, ADR references, engine notes, clear acceptance criteria, and no open design questions. Produces READY / NEEDS WORK / BLOCKED verdict with specific gaps. Use when user says 'is this story ready', 'can I start on this story', 'is…

Donchitos/Claude-Code-Game-Studios · 77 tokens