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.
npx skills add DongLiStudio/personal-agent-foundation --skill migrate-agent-rootgit clone --depth 1 https://github.com/DongLiStudio/personal-agent-foundationWrote 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.
[](https://agentmods.dev/skills/donglistudio/personal-agent-foundation/migrate-agent-root)<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>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.
| Model | Per session | Once 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 |
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.
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.
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 缓存、dist、src-tauri/target*);不得把任意 Git ignored 文件视为可再生内容。每个排除目录及其原因、文件数和字节数必须写入 manifest,禁止静默跳过。 - 首次迁移不删除旧根;旧目录清理必须在新根验证且用户另行授权后作为独立步骤处理。
- 任一步骤失败即停止切换,保留旧根并输出修复说明。
工作流
- 读取当前项目入口文件,以及
GLOBAL/README.md、GLOBAL_CONTEXT.md、PROJECTS.md、SKILL_DEPENDENCIES.md。 - 先运行计划:
python scripts/migrate_agent_root.py plan --source OLD_ROOT --destination NEW_ROOT --report REPORT_DIR
- 审查
migration-manifest.json和 Markdown 报告;确认目标为空、链接边界、待重写文本、Git 目录、可再生目录排除统计和风险提示。 - 用户确认后执行:
python scripts/migrate_agent_root.py execute --source OLD_ROOT --destination NEW_ROOT --report REPORT_DIR
- 用
align-agent-projects-with-global对迁移后的 GLOBAL 做门禁审计。脚本调用使用audit子命令,稳定输入包含:old_rootnew_rootglobal_change_summary- 可选
scope report
- 把对齐报告交回迁移验证:
python scripts/migrate_agent_root.py verify --source OLD_ROOT --destination NEW_ROOT --report REPORT_DIR --align-report ALIGN_REPORT --require-align-pass
只有所有项目状态为 aligned 或 no_change_needed 时,才宣布迁移完成并请用户从新根启动 Agent 确认切换。
脚本职责
scripts/migrate_agent_root.py 支持 plan、execute、verify:
--source:旧 Agent 根目录。--destination:新 Agent 根目录。--report:报告目录,写入migration-manifest.json和migration-report.md。--dry-run:强制不写入,plan默认等价 dry-run。--align-report:读取align-agent-projects-with-global输出。--require-align-pass:门禁失败时返回非零。
脚本只对白名单文本类型做精确旧根替换,支持 Windows 反斜杠、正斜杠和 JSON 转义反斜杠形式;除 manifest 明列的可再生目录外,二进制、Git 对象、数据库、未知格式和用途不明确的 ignored 文件均复制但不改写,并接受哈希一致、旧根残留、链接目标、编码/LF、敏感信息和门禁检查。
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.
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.
- 8d ago First seen · 67 lines · 85 tokens per session scan A 9bc9aa2f57a8
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.
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…
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.
recipe-create-meet-space
Create a Google Meet meeting space and share the join link.
atmos-config
Atmos root configuration: atmos.yaml discovery, precedence, deep merging, basepath, imports, minimal bootstrap, and routing to narrower Atmos skills.
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…
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…