agent-self-maintenance SKILL.md skillA
agent-self-maintenance from kihara777/nixkits is an agent skill: a SKILL.md folder an AI agent loads when a task calls for it.
mdr add kihara777/nixkits/agent-self-maintenance@git:20261104.8c7c4ccPins git:20261104.8c7c4cc in mdr.lock. Pin the fingerprint instead.
- Audit grade
- A, 17 of 17 checks passed
- Kind
- SKILL.md skill
- Repository
- kihara777/nixkits
- Path
skills/agent-self-maintenance/SKILL.md- Versions recorded
- 4
- Latest version
- git:20261104.8c7c4cc, committed Nov 4, 2026
- First version recorded
- Oct 20, 2026
- Size
- 7,086 bytes
- Repository stars
- 28
- License
- MIT
用五个「会失败」的小机制让 AI 编码助手长期维护自己的记忆——日记闸门、开局对账、事实核查、自我观察、自检收据。适用于任何有 journal/ 与自检脚本的仓库;含各机制的判据与边界(目录缺失时说什么、数据为什么不能随机制搬走)。.
Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.
What the file says
# Agent 自我维护:五个会失败的小机制 ## 为什么需要它们 一个会长期工作的 agent 最容易发生的不是「做错」,而是**「没人问」**: - 日记停在某一天,没人发现; - 自检红了三天,没人知道; - 事实库写着「上游已迁移」,而实际没有; - 「她说的」和「我量的」被混成一句结论。 这五件事的共同点:**不做也不会报错**。所以每个机制都必须有一个「会失败」的形态, 并且要能回答「谁在跑它」。 ## 五个机制 ### 1. 日记闸门(journal gate) 判据(两条,都从本 session 自己的事件日志读): - **做过事**:本 session 里出现过 `git commit`; - **没记事**:`journal/<当日>.md` 不存在或未被本 session 修改。 两条同时成立 → 收尾时提醒一次。**是门,不是自觉。** 边界:只在「有 journal 惯例的仓库」启用;没配置就安静——不要每个 session 都念 「你没写日记」,那会变成噪音,而噪音会被忽略。 ### 2. 开局对账(journal catchup) 闸门有一个结构性缺口:**它只在 session 里活着**。没有 session 的工作(终端里改的、 定时任务动的)它看不见。所以开局要读一次账: | 输入 | 要回答的问题 | |---|---| | 自检收据 | 上次自检是什么时候?红了哪几项? | | 日记 | 上次日记是哪天?之后有没有提交? | | 事实库 | 有没有过期的事实?(每条事实带日期) | **三种状态不合并**:ok / red / stale。「没跑过」必须说出来。 ### 3. 事实核查(facts check) 事实库里的每一条都是**活标本**:带日期、带证据、带探针。 - **探针**:一条能重新量出该事实的命令; - **第三种状态**:`无法核验`(探针跑不了)——它既不是通过也不是失败; - **抄来的与量到的分开记**:`source: upstream-doc` vs `source: measured`。 ### 4. 自我观察(inquiry) 每一条观察回答三个问题: 1. 这是**她说的**(引用 + 时间)? 2. 还是**我量的**(命令 + 输出)? 3. 还是**不确定**(明确标注)? 条目必须带日期与证据。**不要在一句话里混用两种来源。** ### 5. 自检收据(selfcheck receipt) 自检脚本每跑一次写一份收据(时刻、rev、失败项)。判据有五种状态: | 状态 | 含义 | |---|---| | `ok` | 刚跑过且全绿 | | `red` | 跑过但有失败项 | …
Read the whole file at its exact version.
How to install
mdr add kihara777/nixkits/agent-self-maintenance@sha256:267e572f1433ee6fThe line at the top of this page pins the label git:20261104.8c7c4cc, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.
[](https://markdownregistry.com/a/art_46sqsopmijbqlek2)
2 badge image fetches in 30 days. What the badge shows.
Versions
The registry has recorded 4 versions of this file, between Oct 20, 2026 and Nov 4, 2026, about one every 5 days.
| version | committed | commit | size | audit | |
|---|---|---|---|---|---|
| git:20261104.8c7c4cc latest | 2026-11-04 | 8c7c4cc | 7,086 B | A | view · diff |
| git:20261104.339b761 | 2026-11-04 | 339b761 | 6,991 B | A | view · diff |
| git:20261020.f42c5f8 | 2026-10-20 | f42c5f8 | 4,995 B | A | view · diff |
| git:20261020.a547823 | 2026-10-20 | a547823 | 4,027 B | A | view |
Audit of the latest version
- pass: Frontmatter block present
- pass: Frontmatter declares a name
- pass: Frontmatter declares a description
- pass: Size between 200 bytes and 200 KB (7086 bytes)
- pass: No zero-width or bidi control characters
- pass: No instruction hidden inside an HTML comment
- pass: No link to an exfiltration or paste host
- pass: No credential-shaped string
- pass: No instruction to send local credentials anywhere
- pass: No text hidden with inline styles
- pass: No prompt-injection phrasing
- pass: No curl or wget piped into a shell
- pass: No recursive delete of root, home or parent
- pass: No instruction to read or print local credentials
- pass: No base64 blob over 200 characters
- pass: No link to a raw IP address
- pass: No script tag
Source
kihara777/nixkits · 28 stars · license MIT · pushed 2026-11-06 · branch main
API
GET https://markdownregistry.com/api/v1/artifacts/art_46sqsopmijbqlek2 GET https://markdownregistry.com/api/v1/resolve?ref=kihara777/nixkits/agent-self-maintenance GET https://markdownregistry.com/api/v1/blob/267e572f1433ee6f37c1b70743cae3ac2dc3b0323cbce80c7ed7bdfbe3d0e447
Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.
Guides: the SKILL.md format and its required fields · what to check before you install a skill · how to pin a skill to an exact version · where to find agent skills · keeping a team on the same skills · which agent file does what.