Domain Check 标志

Domain Check

组织热门
ai4s-research
domain-check

仅当用户要求检查、验证、审查或审计分析代码的科学正确性,或您作为审查智能体正在运行检查时使用。不得在常规分析工作中未经用户要求就运行。涵盖物理学、地球科学/地理科学、生物学、化学、社会科学和生物过程/发酵。运行确定性的领域正确性检查,捕捉能够运行但科学上错误的代码(单位/量纲不匹配、未使用 CRS 却对经纬度计算欧氏距离、0 基/1 基坐标和链方向错误、不可能的 SMILES 价态、未校正的多重比较、对类别编码求平均、未加约束的动力学参数拟合、用原始 DO 而非驱动力计算 kLa、对原始 CFU 计数求算术平均、未检查假设就进行 ANOVA/Tukey 检验、用一阶模型拟合曲率 DOE 设计、跨工艺规模拟合机器学习模型却未作校正)。提供结构化检查结果;绝不声称代码正确。

Add to TypingMind

概览

发布者ai4s-research
代码仓库open-science
技能名称domain-check
星标数
1.7K
复刻数
201
附带文件
1
链接
  • Markdown 格式的指令

    模型按需加载 SKILL.md 文件,因此只有在请求确实与该技能匹配时才会消耗 Token。

  • 兼容任何大语言模型

    AI 技能采用纯 Markdown,而非特定提供商的代码,因此可搭配 GPT、Claude、Gemini、Grok 或本地模型使用。

  • 1 个附带文件

    模型执行任务时可读取的脚本、模板和参考资料。这些文件为只读文件,绝不会被执行。

  • 开源

    由 ai4s-research 发布于 GitHub。请在安装前查看技能的源文件。

安装

在 TypingMind 中安装 Domain Check AI 技能,即可搭配任意大语言模型使用;也可以将其放入其他支持读取 SKILL.md 的智能体中。

1

安装到 TypingMind

TypingMind 可直接从 GitHub 文件夹安装技能:读取 SKILL.md,打包资源文件,并将结果保存在本地。

  1. 打开应用,前往“插件 → 技能”。
  2. 选择“从 GitHub 安装”。
  3. 粘贴下方的技能文件夹 URL 并确认。
    https://github.com/ai4s-research/open-science/tree/master/runtime/skills/core/domain-check
  4. 请在每个需要使用该技能的聊天中启用它。
依次选择“插件 → 技能 → 添加技能 → 从 GitHub URL 导入”,然后粘贴文件夹 URL 并点击“继续”。
2

安装到其他智能体

任何支持 Agent Skills 格式的智能体都可以使用此技能,只需将文件夹复制到该智能体的技能目录中。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/ai4s-research/open-science.git /tmp/open-science
mkdir -p .claude/skills
cp -r /tmp/open-science/runtime/skills/core/domain-check .claude/skills/domain-check
复制后,请重启 Claude Code,以加载新技能。

在 TypingMind 中使用此技能

在任意 TypingMind 聊天中启用 Domain Check,后续即可交由模型处理。技能的名称和描述会放在系统提示词中,一旦请求匹配,模型就会自动加载完整指令,无需您手动调用,且在实际使用前不会消耗 Token。

一旦请求与技能匹配,模型就会自动加载 Domain Check。

兼容任何 AI 模型

AI 技能是纯 Markdown 指令,而非特定提供商的代码,因此 Domain Check 不局限于最初适配的模型。只需在 TypingMind 中安装一次,即可搭配 GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 或您自行运行的本地模型使用,全程使用您自己的 API 密钥。

  • 仅在需要时加载

    系统提示词中仅包含技能名称和描述。首次遇到匹配的请求时才会加载完整指令,因此技能未使用时,这些指令不会消耗 Token。

  • 在聊天中切换模型

    技能是指令而非代码,因此切换模型不会导致技能失效,新模型会读取同一个 SKILL.md。

技能指令

这是模型会加载的 SKILL.md 内容。请在安装前阅读,因为技能就是模型将遵循的指令。

Domain-correctness gate

Across every field the top complaint is code that executes cleanly but is scientifically wrong. This gate intercepts that field's classic error classes deterministically — by analysing the code you actually wrote, not by recalling rules. It verifies specific error classes; it never proves correctness.

It is fast, offline and stdlib-only — but it is an on-request gate, not a background one.

When to run

  • When the user asks to check, validate, review or audit an analysis for correctness.
  • When you are the reviewer agent, running the checks that agent's prompt lists (the app's auto-review turn, which the user switches on in Settings).

Do NOT run it on your own initiative while writing or executing analysis code. A clean run still emits a review block, so an unprompted pass puts a card with no findings in the user's conversation — noise they did not ask for.

How to run

The gate ships beside this SKILL.md. Run it on the code files in play (or with no arguments to scan the workspace):

bash
python "$XDG_CONFIG_HOME/opencode/skills/domain-check/domain_check.py" <file.py|notebook.ipynb|analysis.R ...>

It prints exactly one ```review fenced JSON block on stdout.

What it catches (one rule set per discipline)

  • physics · units — adding/subtracting/comparing quantities of different dimensions (e.g. t_seconds + d_meters); trig on a degree-valued angle.
  • earth · crs — Euclidean/Pythagorean distance on latitude/longitude (sqrt((lat1-lat2)**2 + (lon1-lon2)**2)); a geopandas geometric op with no CRS ever set.
  • biology · coords / strand — off-by-one on BED intervals (0-based half-open, so length is end - start, never +1); a sequence sliced from a stranded feature file (GFF/GTF/BED) with no reverse-complement for the - strand.
  • chem · valence — a SMILES string literal (assigned to a smiles/smi variable, or passed to MolFromSmiles/MolFromSmarts) that cannot be a real molecule. If RDKit is installed it is used as the authoritative judge — Chem.MolFromSmiles sanitizes the parse, so it catches far more than a five-bond carbon (bad ring closures, impossible aromaticity, over-valent N/O/S) and, being authoritative, clears molecules a heuristic would wrongly flag. Without RDKit it falls back to a stdlib bond-counter (carbon

    4, over-bonded halogen; bails on bracket atoms for precision).

  • social · multiple-comparisons — a significance test (ttest_ind, pearsonr, f_oneway, chi2_contingency, …) run inside a loop or ≥3 times with no multipletests/FDR/Bonferroni correction anywhere — the inflated family-wise false-positive rate that silent p-hacking produces.
  • social · categorical — a numeric reduction (.mean()/.median()/.std() …) taken directly on a nominal category code (gender, race, region, condition, …), treating an unordered label as an interval quantity. A groupby('gender') key is correct usage and is not flagged.
  • bioprocess · unconstrained-kinetics — curve_fit fitting a local model function whose parameters are classic non-negative kinetic constants (Monod/Haldane mu_max/Ks/Ki, Pirt/yield Yxs/Yps, Luedeking-Piret alpha/beta, …) with no bounds=, letting a noisy or sparse fit converge to a physically impossible negative value. Names that belong to any curve at all (alpha, beta, kd, ka) count only beside an unambiguous one or in a file that otherwise reads as a fermentation, so a plain power law, whose exponent is routinely negative, is left alone.
  • bioprocess · kla-driving-force — in a file that computes kLa, taking log() of the raw dissolved-oxygen reading instead of the (C* - C) driving force the dynamic gassing-out method requires (dC/dt = kLa(C*-C), so the regression is on ln(C* - C), not ln(C)).
  • bioprocess · cfu-log-scale — a numeric reduction (.mean()/.std()/…) taken directly on a raw CFU (colony-forming-unit) plate count. Microbial counts are approximately log-normal; the convention is to average log10(CFU), not the raw count. A variable already named as the log quantity (log_cfu) or a .mean() taken after np.log10(...) is not flagged.
  • bioprocess · anova-assumptions — f_oneway/anova_lm/ pairwise_tukeyhsd/tukey_hsd run in a file with no normality (shapiro/normaltest/anderson) or variance-homogeneity (levene/bartlett/fligner) check anywhere in it — the two assumptions the test's stated false-positive rate depends on. Scoped to files that read as a fermentation (biomass, bioreactor, CFU, fed-batch, …): the statistics generalize, but a finding tagged bioprocess on a three-arm survey does not.
  • bioprocess · rsm-first-order-fit — a Box-Behnken/central-composite design (bbdesign/ccdesign/box_behnken/central_composite in the file) fit through a statsmodels formula with no quadratic (I(x**2)) or interaction (x1:x2) term — the design was built to estimate curvature, so a first-order model wastes it and cannot locate an interior optimum.
  • bioprocess · cross-scale-fit — a real model fit (.fit(...), guarded to a file that imports scikit-learn, XGBoost, statsmodels, PyTorch, TensorFlow, or Keras — a plain scipy.curve_fit never counts) in a file that mentions both a small-scale (flask, bench-scale) and a large-scale (bioreactor, fermenter, fed-batch, pilot-scale) process vocabulary, e.g. trained on flask data and applied to a bioreactor. Advisory: a warn, not a defect. Silent once a calibration / scaling-factor / cross-validation term is in the file, and silent on batch_size and friends — bare batch matched the training knobs of the very libraries this rule requires.

Rules favour precision: an unrecognized unit, arithmetic with no discipline signal, a SMILES using bracket atoms (which carry their own valence/charge), a single significance test, or a categorical used only as a groupby key is left silent rather than flagged.

Reporting findings

Copy the ```review block the tool prints as the last thing in your message — the app renders it as dismissible reviewer cards. Do not paraphrase the findings into prose and drop the block; the structured block is the contract. If the gate found nothing, say so plainly and keep the block (its note states that no findings is not a guarantee of correctness).

Never tell the user the code is "correct" or "error-free" — the gate checks known error classes only.

Adding a discipline

Add a check_<field>(ctx) function in domain_check.py and append it to VALIDATORS. No other change is needed — the review contract and the app's rendering are discipline-agnostic (each finding carries its own tag).

附带文件

技能加载后,模型会按需读取这些文件。它们仅作为可读文件提供,绝不会被执行。

常见问题

Domain Check AI 技能有什么作用?

仅当用户要求检查、验证、审查或审计分析代码的科学正确性,或您作为审查智能体正在运行检查时使用。不得在常规分析工作中未经用户要求就运行。涵盖物理学、地球科学/地理科学、生物学、化学、社会科学和生物过程/发酵。运行确定性的领域正确性检查,捕捉能够运行但科学上错误的代码(单位/量纲不匹配、未使用 CRS 却对经纬度计算欧氏距离、0 基/1 基坐标和链方向错误、不可能的 SMILES 价态、未校正的多重比较、对类别编码求平均、未加约束的动力学参数拟合、用原始 DO 而非驱动力计算 kLa、对原始 CFU 计数求算术平均、未检查假设就进行 ANOVA/Tukey 检验、用一阶模型拟合曲率 DOE 设计、跨工艺规模拟合机器学习模型却未作校正)。提供结构化检查结果;绝不声称代码正确。

为什么在 TypingMind 中使用 Domain Check?

因为您只需安装一次,就能搭配任何模型使用。Domain Check 采用纯 Markdown 格式,而非特定提供商专用的代码,因此同一技能可用于 GPT-5、Claude、Gemini、Grok 或本地模型。您甚至可以在聊天中途切换模型,而不会影响技能的正常使用。TypingMind 使用您自己的 API 密钥,因此您直接向提供商付费,而不是按席位订阅;您的技能和聊天记录也都保留在您自己的存储空间中。

如何在 TypingMind 中安装 Domain Check?

在 TypingMind 中打开“插件 → 技能 → 从 GitHub 安装”,然后粘贴 https://github.com/ai4s-research/open-science/tree/master/runtime/skills/core/domain-check。TypingMind 会读取其中的 SKILL.md,打包相关文件,并将其安装为技能,供您在各个聊天中按需启用。

哪些 AI 模型可以使用 Domain Check?

您在 TypingMind 中连接的任何模型都可以。AI 技能采用纯 Markdown 指令,而非特定提供商专用的代码,因此 GPT、Claude、Gemini、Grok 和本地模型都能在请求匹配时加载此技能。

Domain Check 可以搭配多少个 AI 模型使用?

数量不限。只要模型支持技能,您就可以将它与 Domain Check 搭配使用。GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 等模型都可以通过您自己的 API 密钥接入 TypingMind。

Domain Check AI 技能免费吗?

ai4s-research 已在 GitHub 上发布了该技能。请查看代码仓库了解许可条款。您只需向自己的 AI 提供商支付所用 Token 的费用。

什么是 AI 技能?

AI 技能是一组可复用的指令,用于教会 AI 模型完成某项特定任务。它遵循开放的 Agent Skills 格式:包含名称和描述的 SKILL.md 文件,以及模型可能需要的脚本、模板或参考文件。模型仅在您的请求与技能匹配时才会读取这些指令,因此已安装的技能在使用前不会产生任何费用。

AI 技能与插件或 MCP 服务器有何不同?

插件或 MCP 服务器为模型提供可调用的新工具,也就是在某处运行并返回结果的代码。AI 技能则为模型提供知识和流程:如何处理任务、遵循哪些步骤,以及怎样的输出才算优质。技能采用纯 Markdown 格式,因此不需要服务器、API 密钥或运行时环境,并且适用于任何模型。

查看全部

立即创建您自己的 AI 工作区

订阅我们的电子简报,获取新功能和后续赠奖活动的通知 👇