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.

Install it, pinned
mdr add kihara777/nixkits/agent-self-maintenance@git:20261104.8c7c4cc

Pins 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

The exact contents, by fingerprint
mdr add kihara777/nixkits/agent-self-maintenance@sha256:267e572f1433ee6f

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

Badge

mdr badge

[![mdr](https://markdownregistry.com/badge/art_46sqsopmijbqlek2.svg)](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.

versioncommittedcommitsizeaudit
git:20261104.8c7c4cc latest2026-11-04 8c7c4cc 7,086 BA view · diff
git:20261104.339b7612026-11-04 339b761 6,991 BA view · diff
git:20261020.f42c5f82026-10-20 f42c5f8 4,995 BA view · diff
git:20261020.a5478232026-10-20 a547823 4,027 BA view

Audit of the latest version

A  17 of 17 checks passed. Fixed automatic checks with no AI involved, so the same checks give the same answer every run.
  • 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

GitHub

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.

More from kihara777/nixkits

AGENTS.md AGENTS.md file
kihara777/nixkits · AGENTS.md
git:20261026.93adc54 · audit A · 28 stars
news-three-elements SKILL.md skill
kihara777/nixkits · packages/dsh-preset-news-three-elements/bundled/news-three-elements/SKILL.md · 以真实通讯社新闻格式编造「催逝快讯」——本技能里的「新闻三要素」不指新闻学那三样,而是三位必须到场的主角:巴兰尼科夫、尤丁采夫、布亚诺夫。触发词「新闻三要素」;含素材搜索、格式硬性要求、用语模板、宽松的拒绝服务判定(先当素材,接不回来才拒)…
git:20260915.a0759b1 · audit A · 28 stars
news-three-elements SKILL.md skill
kihara777/nixkits · skills/news-three-elements/SKILL.md · 以真实通讯社新闻格式编造「催逝快讯」——本技能里的「新闻三要素」不指新闻学那三样,而是三位必须到场的主角:巴兰尼科夫、尤丁采夫、布亚诺夫。触发词「新闻三要素」;含素材搜索、格式硬性要求、用语模板、宽松的拒绝服务判定(先当素材,接不回来才拒)…
git:20260915.a0759b1 · audit A · 28 stars
nix-flake-update-check SKILL.md skill
kihara777/nixkits · skills/nix-flake-update-check/SKILL.md · 检查任意 nix flake 仓库中软件包的上游版本更新并升级——开工前先同步远端并核对活跃 issue / PR、按包型(npm / cmake / Rust / fetchurl / python)分流的 hash 更新流程与自托管…
git:20261022.edd2bef · audit A · 28 stars
nix-packaging SKILL.md skill
kihara777/nixkits · skills/nix-packaging/SKILL.md · 从零把一个上游软件打包成 Nix 表达式——按来源类型分流(GitHub 源码 / npm / Rust / 预编译二进制 / Gitea)、hash 的两段式获取(fakeHash → 读取 got → 回填 →…
git:20261024.8b180c4 · audit A · 28 stars
nixkits-check-updates SKILL.md skill
kihara777/nixkits · skills/nixkits-check-updates/SKILL.md · NixKits 仓库的软件包更新适配层——在通用技能 nix-flake-update-check 之上,补充本仓库特有的远端 issue / PR 形态(含与更新重叠的历史先例)、CI 结构(可复用 build-package.yml…
git:20261022.b63b636 · audit A · 28 stars
nixkits-package-upstream SKILL.md skill
kihara777/nixkits · skills/nixkits-package-upstream/SKILL.md · NixKits 的 nixpkgs 上游贡献适配层——在通用技能 upstream-audit 之上,补充本仓特有的环节:13 个包的可行性台账(谁已进 nixpkgs、谁有在途…
git:20261022.d025ef6 · audit A · 28 stars
nixkits-skills SKILL.md skill
kihara777/nixkits · skills/nixkits-skills/SKILL.md · 将 NixKits 技能安装或更新到编码助手目录(opencode、codewhale、codex、openclaw、agents)。支持本地和在线两种安装模式。DeepSeek Harness (dsh) 不再作为安装目标——其…
git:20261020.2e66963 · audit A · 28 stars
nixos-modern-cli SKILL.md skill
kihara777/nixkits · skills/nixos-modern-cli/SKILL.md · 在 NixOS 系统上工作时使用。确保正确使用现代 Nix/NixOS CLI、完整的 shell 能力、sudo 权限和正确的系统维护流程;含 Nix store 路径陷阱与密钥/`path:` input 的仓库外组织方式。
git:20260916.a33a3cf · audit A · 28 stars
nixos-specialisation-tuning SKILL.md skill
kihara777/nixkits · skills/nixos-specialisation-tuning/SKILL.md · 为 NixOS 设计 specialisation 分面(默认 headless + 可选桌面),并在统一内存(UMA)设备上调优 llama.cpp 本地推理。覆盖分面架构、引导菜单与默认面、分面切换后的运行级收敛与用户级…
git:20260922.8c276c0 · audit A · 28 stars
recover-nixos-config SKILL.md skill
kihara777/nixkits · skills/recover-nixos-config/SKILL.md · 当用户误删 /etc/nixos 目录下的文件(flake.nix、flake.lock 等)时,从 Nix store 中恢复。
git:20260606.7dad578 · audit A · 28 stars
translate-pseudocn SKILL.md skill
kihara777/nixkits · skills/translate-pseudocn/SKILL.md · 为文档撰写技能提供伪中国语(pcn)语言支持。以日语汉字词汇为基础、剥离平假名与片假名、保留日语语序的伪本地化。可被 write-project-docs 自动发现调用。
git:20260920.dac80a7 · audit A · 28 stars

Every file in kihara777/nixkits

Browse by kind, by grade A, or by owner.