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 GGbond-bo/MemOmics-Agent --skill analysis-output-validity-gatesgit clone --depth 1 https://github.com/GGbond-bo/MemOmics-AgentWrote 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/ggbond-bo/memomics-agent/analysis-output-validity-gates)<a href="https://agentmods.dev/skills/ggbond-bo/memomics-agent/analysis-output-validity-gates"><img src="https://agentmods.dev/badge/skills/ggbond-bo/memomics-agent/analysis-output-validity-gates/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/ggbond-bo/memomics-agent/analysis-output-validity-gates"><img src="https://agentmods.dev/badge/skills/ggbond-bo/memomics-agent/analysis-output-validity-gates.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.00311 | $0.13107 |
| Opus 5.5 | $0.00124 | $0.05243 |
| Sonnet 5.5 | $0.00062 | $0.02621 |
| Haiku 4.5 | $0.00031 | $0.01311 |
Grade A, and why
analysis-output-validity-gates 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 20d 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 — 478 lines — stays where its author put it; the contents beside it link to each section on GitHub.
分析产出有效性门(Analysis Output Validity Gates)
核心原则
退出码 0 ≠ 结果有效;文件非空 ≠ 内容有意义;日志有 ✓ ≠ 分析成立。
生信工具(尤其 pySCENIC / 分布式 / 多步骤管线)会在参数或数据口径错位时静默降级:
照样打印 ✓ completed、照样写盘、行数形状都正常,但数值已经是垃圾。
唯一可靠的防线是「可量化的不变量断言」——每条断言都必须能自己算出一个数字(命中率、非零占比、
交集数、维度匹配),断言失败就报错、拒绝产出、拒绝汇报"分析完成"。
禁止:产出异常时先说"分析完成",等用户质疑才发现无效。 必须:先自证(算出数字)→ 通过才汇报。
一、产出有效性硬校验清单(通用四问)
对任何交给下游/写进结论的结果表,依次回答:
| # | 问题 | 怎么答(要算出数字,不是眼看) | 不合格的信号 |
|---|---|---|---|
| 1 | 标识符对得上吗? 结果 ID 命名体系和输入是同一套吗(HGNC vs ENSEMBL、带不带版本号、大小写) | len(set(结果ID) & set(输入ID)) / len(结果ID) |
命中率 < 0.9 → 口径错位 |
| 2 | 数值分布合理吗? 是不是全 0 / 全 NA / 全同一个值 | (arr > 0).mean()、np.nanmean、pd.Series.nunique() |
非零占比 < 0.5、唯一值 = 1 |
| 3 | 形状/维度对得上吗? 行列、ID 顺序、分组水平数 | shape、index.is_unique、value_counts() 与预期水平数比对 |
维度对不上、ID 重复 |
| 4 | 生物学/统计方向说得通吗? 效应量符号、量级、组间关系 | 与知识库/文献已知方向比对;关键 marker 是否出现在该出现的位置 | 方向相反、量级离谱 |
把四问写成脚本(每步分析都做,不是最后统一做),断言失败直接 raise,不要 try/except 吞掉。
二、静默失败的「症状特征」速查(一眼认出)
| 症状 | 典型根因 | 深入 |
|---|---|---|
结果表里出现单字符条目([、(、'、单个字母) |
一个 str 被当成「列表/集合」逐字符迭代 | references/prune2df-targetgenes-stringification.md |
| 整张活性/打分矩阵全 0,summary 也全 0(不是"算得低") | 输入基因集与表达矩阵零交集(上游 ID/类型错位) | 同上 |
| 行数正常但每条都是同一个值/权重 1.0 | 解析失败走了 fallback 默认值 | 同上 |
工具刷屏打印 Less than N% of the genes ... are present |
不是无害 warning,是 ID 错位告警,命中率接近 0 | 同上 |
中间表列名对不上(KeyError),且发生在最贵的步骤之后 |
自写代码猜了上游 DataFrame 的列结构(MultiIndex / 列名被截断) | 同上「列结构先看清再写」 |
MemoryError: Unable to allocate 1.93 MiB + FutureCancelledError: finalize-... cancelled for reason: unknown |
不是代码 bug:worker 被 OOM 杀掉 → scattered 数据丢失 | references/distributed-worker-oom-vs-code-bug.md |
| 产出数值齐全、分布像样,但显著率高达 50–99.7%,或比对照方法多几十到几万倍 | 不是方法改进:SE 被压小 → 假精度 → 假阳性膨胀(细胞级把细胞当独立 n) | references/statistical-inflation-diagnostics.md |
模型公式里写了随机效应 (1|donor),但加与不加 SE 几乎不变(如 0.050 vs 0.052) |
随机效应没进 SE → 方差结构未被吸收,等同没做校正 | 同上(第三节) |
What ships with it
12 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.
- references/batch-deg-triage.md 10 KB
- references/distributed-worker-oom-vs-code-bug.md 4.8 KB
- references/effect-size-threshold-justification.md 8.0 KB
- references/numeric-display-and-derivation-audit.md 5.4 KB
- references/prune2df-targetgenes-stringification.md 5.1 KB
- references/statistical-inflation-diagnostics.md 7.8 KB
- references/strand-aware-read-assignment-audit.md 9.8 KB
- scripts/coef_threshold_audit.py 12 KB runs code
- scripts/probe_excel_numeric_display.py 2.1 KB runs code
- scripts/triage_batch_deg.py 11 KB runs code
- scripts/verify_output_validity.py 7.6 KB runs code
- skill.json 1.4 KB
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.
- 20d ago Changed · +83 lines · +47 tokens per session 0d542a4f0319
- 1mo ago First seen · 395 lines · 264 tokens per session scan A 5ab25a0f93a2
analysis-output-validity-gates is a skill published in the GitHub repository GGbond-bo/MemOmics-Agent (33 stars, last pushed 14d ago), licensed MIT. It adds 311 tokens to every session and 13,107 once invoked, about $0.0012 per session on Opus 5.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-10-14.
analysis-output-validity-gates compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| analysis-output-validity-gatesGGbond-bo/MemOmics-Agent | Skill | 33 | 14d ago | MIT | A | 311 | Claude Code |
| nonlinear-solversbeita6969/ScienceClaw | Skill | 1.0k | 7d ago | MIT | A | 63 | Claude Code |
| linear-solversbeita6969/ScienceClaw | Skill | 1.0k | 7d ago | MIT | A | 55 | Claude Code |
| numerical-stabilitybeita6969/ScienceClaw | Skill | 1.0k | 7d ago | MIT | A | 61 | Claude Code |
| bio-genome-assembly-assembly-polishingFridrichMethod/awesome-skills | Skill | 17 | yesterday | none | A | 190 | Claude Code, Codex |
| onekgpdK-Dense-AI/scientific-agent-skills | Skill | 59k | 7d ago | MIT | A | 143 | Claude Code |
| biopythonK-Dense-AI/scientific-agent-skills | Skill | 59k | 7d ago | MIT | A | 65 | Claude Code |