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.

Install it, pinned
mdr add suge8/friedbun/invariant-check@git:20261105.956d98a

Pins 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

The exact contents, by fingerprint
mdr add suge8/friedbun/invariant-check@sha256:934315280c5339ea

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

Badge

mdr badge

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

versioncommittedcommitsizeaudit
git:20261105.956d98a latest2026-11-05 956d98a 5,453 BA view · diff
git:20261104.bccf3e52026-11-04 bccf3e5 4,930 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 (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

GitHub

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.

More from suge8/friedbun

AGENTS.md@skills AGENTS.md file
suge8/friedbun · skills/AGENTS.md
git:20261105.956d98a · audit A · 13 stars
copywriting SKILL.md skill
suge8/friedbun · skills/creative/copywriting/SKILL.md · 撰写或优化以转化为目标的网站和产品文案:标题、Hero、CTA、价值主张、落地页、定价页、功能页和产品描述
git:20261008.80eac82 · audit A · 13 stars
gpt-image SKILL.md skill
suge8/friedbun · skills/creative/gpt-image/SKILL.md · 通过 gptimage 模型生成优美 AI 图片、海报、插图或 Logo,或按参考图改图
git:20261105.62beda9 · audit A · 13 stars
post SKILL.md skill
suge8/friedbun · skills/creative/post/SKILL.md · 把实测数据或经验写成社媒帖:核数、按平台语言写文案、出数据图、排期发布并回查
git:20261008.9ccea24 · audit A · 13 stars
promo SKILL.md skill
suge8/friedbun · skills/creative/promo/SKILL.md · 制作项目宣传物料:Hero/OG/社媒图、商店截图、README 配图和演示 GIF/视频。根据项目现状产出到 design/promo/;应用 UI 用 ui-craft。
git:20261105.62beda9 · audit A · 13 stars
video SKILL.md skill
suge8/friedbun · skills/creative/video/SKILL.md · 视频统一入口:把主题策划成运动优先的动画,用 Remotion 实现、配声音、检查并渲染成片,或通过 Grok/Seedance 直接生成带音轨 MP4
git:20261011.f56249e · audit A · 13 stars
cuepad SKILL.md skill
suge8/friedbun · skills/cuepad/SKILL.md · 交付能看的成果(截图、录屏、网页、PDF、文稿)给用户验收,或用户提到 CuePad、灵感、任务时用:把文件发到用户手机上的 CuePad,读写其中的灵感与任务。CuePad 是用户记灵感、管任务、指挥 Agent 的 App。
git:20261103.4bccc4d · audit A · 13 stars
architecture-audit SKILL.md skill
suge8/friedbun · skills/development/architecture-audit/SKILL.md · 架构体检:找出该合并加深的浅模块,用 eli5 图解呈现,再为选中的一项并行设计几种接口。
git:20261009.443953a · audit A · 13 stars
better-test SKILL.md skill
suge8/friedbun · skills/development/better-test/SKILL.md · 验证改动、写测试、审查或清理测试时使用:验证方法、什么测试值得留、端到端测试写法、DELETE/REWRITE/KEEP 判决。
git:20261009.443953a · audit A · 13 stars
eli5 SKILL.md skill
suge8/friedbun · skills/development/eli5/SKILL.md · 把话题讲到没读过代码的技术读者也能准确理解,默认 HTML 图解
git:20261008.a717a7c · audit A · 13 stars
fan-out SKILL.md skill
suge8/friedbun · skills/development/fan-out/SKILL.md · 调研、审计、设计探索拆给子代理并行的低中高三档;research、grilling、architecture-audit、better-test 按档引用,用户也可直接点档位。
git:20261008.3911d61 · audit A · 13 stars
pr SKILL.md skill
suge8/friedbun · skills/development/pr/SKILL.md · 写 PR 描述时使用。
git:20261008.3911d61 · audit A · 13 stars

Every file in suge8/friedbun

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