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 restore-agent-foundationgit 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/restore-agent-foundation)<a href="https://agentmods.dev/skills/donglistudio/personal-agent-foundation/restore-agent-foundation"><img src="https://agentmods.dev/badge/skills/donglistudio/personal-agent-foundation/restore-agent-foundation/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/donglistudio/personal-agent-foundation/restore-agent-foundation"><img src="https://agentmods.dev/badge/skills/donglistudio/personal-agent-foundation/restore-agent-foundation.svg" alt="Reviewed on agentmods" width="80" 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.00114 | $0.02377 |
| Opus 5 | $0.00057 | $0.01189 |
| Sonnet 5 | $0.00023 | $0.00475 |
| Haiku 4.5 | $0.00011 | $0.00238 |
Grade A, and why
restore-agent-foundation 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 10d 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 — 124 lines — stays where its author put it; the contents beside it link to each section on GitHub.
恢复 Personal Agent Foundation
把本 Skill 当作已存在 Agent 基座的唯一恢复入口。核心路径校准、链接重建、Skill 重装、状态验证、备份和回滚均使用本 Skill 自带的 scripts/foundation_recovery.py;不要把其他 Skill 能否运行作为恢复前提,也不要用临时 shell 替代确定性护栏。
开始前
完整读取 恢复契约。需要处理宿主 Skill 安装位置、图形授权或宿主切换时,再读取 宿主恢复。
优先从本 Skill 自身位置发现 Agent 根。若用户把整个基座复制到新电脑,但本 Skill 尚未安装到用户级目录,直接读取复制后基座中的:
<Agent 根>/GLOBAL/.agents/skills/restore-agent-foundation/SKILL.md
不得要求其他全局 Skill 先恢复。不得要求用户手工逐项执行安装、迁移、对齐或授权流程。
目标状态
无论当前是换机、换 Agent、换路径、权限丢失还是局部损坏,都把当前环境收敛到同一结果:
- 当前 Agent 根与
GLOBAL/FOUNDATION_STATE.json一致;旧根精确残留被清除,GLOBAL 治理文本无 BOM、CRLF 或基座占位符。项目代码、项目自身模板和业务资产不被格式化。 - GLOBAL 核心入口、项目索引、项目三入口和独立 Git 边界可读取。
GLOBAL/.agents/skills/是自维护 Skill 权威源;当前宿主的安装副本逐文件一致。- Junction/symlink 只重建链接本体,不复制、删除或递归遍历外部目标。
- GitHub、飞书、Obsidian、服务器连接和宿主能力均经过实时发现;缺权限时引导用户走官方授权或安全恢复,完成后独立回读。
- 用户项目、Git 历史、未提交内容、凭据和外部知识库内容不被覆盖。
- 最终
verify及交互式门禁全部通过;未完成项不得表述为成功。
连续恢复流程
1. 发现与只读审计
- 定位复制后的 Agent 根;若可从本 Skill 路径确定,不再询问。
- 发现当前宿主可识别的全局 Skill 安装目录。宿主有多个目录时逐一列出,并让用户确认受管目标;不要猜写系统目录。
- 执行
audit,输出当前根、历史根、核心文件、项目、链接、Skill 副本、运行时和交互授权门禁。 audit和plan都只读;报告不得包含 token、App Secret、私钥、Cookie 或链接目标中的文件内容。为供用户确认,报告可以记录链接本体路径及目标目录路径。
<python> scripts/foundation_recovery.py audit --root <agent-root> --skill-target <host-skill-dir> --report <temp-audit.json>
Python 必须为 3.11+。当前 Python 不满足时,展示当前系统的官方安装方案,取得用户确认后安装,再重新审计。
2. 形成单一恢复计划
根据审计结果补充必要参数:
- 旧根无法从
FOUNDATION_STATE.json确认时才询问--old-root。 - Obsidian 链接缺失或失效时,先确认真实 Vault,再传
--obsidian-target;不把 Vault 原始路径写入长期文档。 - Skill 安装目录无法由宿主确定时,请用户通过宿主设置或目录选择界面确认。
执行 plan 并展示:会修改的文件、路径替换数量、链接重建、Skill 安装/替换、Git 初始化、需要用户完成的授权和阻断项。
<python> scripts/foundation_recovery.py plan --root <agent-root> --skill-target <host-skill-dir> --report <temp-plan.json>
计划带有 plan_sha256。只有用户明确确认当前计划后才能进入修复;计划后文件或环境变化时重新生成,不沿用旧确认。
3. 程序化修复
<python> scripts/foundation_recovery.py repair --plan <temp-plan.json> --confirm-plan-sha256 <confirmed-sha256>
What ships with it
5 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.
- 10d ago First seen · 124 lines · 114 tokens per session scan A 6e856cf162bf
restore-agent-foundation is a skill published in the GitHub repository DongLiStudio/personal-agent-foundation (11 stars, last pushed 23d ago), licensed Apache-2.0. It adds 114 tokens to every session and 2,377 once invoked, about $0.0006 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
harbor-daytona
Use Harbor's Daytona sandbox platform for computer use — creating sandboxes, taking screenshots, sending mouse/keyboard input, and building agent loops. Use when the user wants to interact with a GUI, automate a desktop, do computer use, control a browser visually, or run Claude computer use against a Daytona sandbox.
boost-modules
Skill "boost-modules" from av/harbor, covering harbor boost custom modules, module structure, quick reference, output methods and stream text to client.
token-usage
Nested swiss-knife reference for token usage, cost, cache, and tool-call/API-call reports. Use for model cost reports, cache rates, budget/burn analysis, and tools-per-API-call trends across LingTai logs.
langgraph
LangGraph 1.x (LTS) Python workflow patterns for state management, delta channels, resilience (node timeouts, error handlers, graceful drain), routing, parallel execution, supervisor-worker, tool calling, checkpointing, human-in-loop, streaming (v2 format), subgraphs, and functional API. Use when building LangGraph…
security-arsenal
Security payloads, bypass tables, wordlists, gf pattern names, always-rejected bug list, and conditionally-valid-with-chain table. Use when you need specific payloads for XSS/SSRF/SQLi/XXE/NoSQLi/command injection/SSTI/IDOR/path-traversal/HTTP smuggling/WebSocket/MFA bypass, bypass techniques, or to check if a finding…
lc-curate-context
Decide which files a task actually needs, record that as a reusable llm-context rule, verify it against the codebase - including the files your selection references but leaves out - and pack it for your own context, a chat, or a sub-agent you dispatch. Load when choosing what code to put in front of a model, packing…