invariant-check SKILL.md skillA
invariant-check from suge8/friedbun is an agent skill: a SKILL.md folder an AI agent loads when a task calls for it.
mdr add suge8/friedbun/invariant-check@git:20261105.956d98aPins git:20261105.956d98a in mdr.lock. Pin the fingerprint instead.
- Audit grade
- A, 17 of 17 checks passed
- Kind
- SKILL.md skill
- Repository
- suge8/friedbun
- Path
skills/development/invariant-check/SKILL.md- Versions recorded
- 2
- Latest version
- git:20261105.956d98a, committed Nov 5, 2026
- First version recorded
- Nov 4, 2026
- Size
- 5,453 bytes
- Repository stars
- 13
- License
- MIT
不变量检查:改动碰到会持久化、要在失败或崩溃后恢复的状态机(发布与迁移、送达与确认、重试与标记文件、定时叫醒),或审查一轮轮在同一状态机上找出新的中断点时使用。.
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
# 不变量检查 审查逐个想中断点,每轮只能多找到一个;把“每一步 × 每种故障”穷举一遍,崩溃、断电、重跑造成的卡死和残留能一次找全。它只查写成不变量的性质,漏写一条,那一类缺陷就全漏,所以它补审查,不替代审查。在第一次送审前做,或者审查第二次在同一状态机上报新实例时,停止逐个修补,改做这个。 1. **写不变量**:只挑最贵的几条承诺,每条一句话写性质、一句话写违反时的危害,指到需求或项目文档的原文。三类性质都要过一遍: - 最终恢复:“几次正常的轮询或重跑之内,一定恢复成一套与当前库兼容的完整服务”; - 过程中不中断:“站点在线时,恢复或下一次发布都不得让它下线”; - 仍在使用的资源不被销毁:在途连接、排空中的 worker、未确认的消息。 需求里两条承诺看似冲突时(“排空尽力而为”与“排空后才停旧实例”),两条都写成不变量,让检查把冲突暴露出来,不先选一种解读。完成标准:每条承诺原文都对应到一条不变量或一句“不查”的理由。 2. **选做法**: - 外部依赖能在进程边界上换成替身时,对真实代码做穷举故障注入:被测代码全用真的,只替换外部命令、网络、数据库、时钟。没有模型与代码不同步的问题,首选这个。 - 编译慢、替身难做准(真实子进程、复杂异步时序)时,用 TLA+ 之类的模型检查器写小模型,每个动作指回代码里的位置,并记下覆盖的文件和最后核对过的提交。 完成标准:写下选的做法和理由;用模型检查时,每个动作都已指到代码位置。 3. **定场景、恢复事件与故障**: - 场景是会改变结果的初始状态与外部行为的组合。维度从需求和外部接口逐项列:要不要迁移、版本谁领先、旧版是否兼容、上一次运行留下的状态、有没有在途连接或未完成的工作,外部接口返回空、被替换、并发写入等。漏掉一维,那一维上的缺陷就抓不到。 - 列出真实系统里触发恢复的事件(定时器重跑同一任务、下一个新任务到来、重启),只用这些事件驱动恢复,不自己发明:由谁触发恢复会直接改变判定。 - 注入点是每个外部动作和每次文件改动(写、改名、截断、删除)。故障至少五种:某一步失败;进程被杀(不执行任何异常处理,例如 fork 后 `os._exit`);宿主崩溃;断电(没 fsync 的写入和改名回退或变空);依赖一段时间不可用。 - 替身的每条行为假设写下来并标置信度,反例依赖哪条假设也标上。替身遇到没建模的命令或参数时报检查自身的错误,不记成被测代码失败;换一个提交重跑时先看这类错误数。 - 完成标准:所有场景能在几分钟内跑完,输出违反数、检查自身错误数和每个反例的步骤序列;太慢就只对关键场景做逐步单故障,其余场景只跑无故障。 …
Read the whole file at its exact version.
How to install
mdr add suge8/friedbun/invariant-check@sha256:934315280c5339eaThe line at the top of this page pins the label git:20261105.956d98a, 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_hnoiiokrns2fahat)
3 badge image fetches in 30 days. What the badge shows.
Versions
The registry has recorded 2 versions of this file, between Nov 4, 2026 and Nov 5, 2026, more than one a day.
| version | committed | commit | size | audit | |
|---|---|---|---|---|---|
| git:20261105.956d98a latest | 2026-11-05 | 956d98a | 5,453 B | A | view · diff |
| git:20261104.bccf3e5 | 2026-11-04 | bccf3e5 | 4,930 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 (5453 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
suge8/friedbun · 13 stars · license MIT · pushed 2026-11-05 · branch main
API
GET https://markdownregistry.com/api/v1/artifacts/art_hnoiiokrns2fahat GET https://markdownregistry.com/api/v1/resolve?ref=suge8/friedbun/invariant-check GET https://markdownregistry.com/api/v1/blob/934315280c5339eaa65f63523cd3e6603a4c4482d948a5462c7ca6639bb9fc8a
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.