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 yipng05-max/-skills --skill counterfactual-reasoninggit clone --depth 1 https://github.com/yipng05-max/-skillsWrote 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/yipng05-max/-skills/counterfactual-reasoning)<a href="https://agentmods.dev/skills/yipng05-max/-skills/counterfactual-reasoning"><img src="https://agentmods.dev/badge/skills/yipng05-max/-skills/counterfactual-reasoning/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/yipng05-max/-skills/counterfactual-reasoning"><img src="https://agentmods.dev/badge/skills/yipng05-max/-skills/counterfactual-reasoning.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.00167 | $0.02416 |
| Opus 5 | $0.00084 | $0.01208 |
| Sonnet 5 | $0.00033 | $0.00483 |
| Haiku 4.5 | $0.00017 | $0.00242 |
Grade A, and why
counterfactual-reasoning 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 11d 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 — 233 lines — stays where its author put it; the contents beside it link to each section on GitHub.
反事实思维工具(Counterfactual Reasoning)
本 skill 基于 King、Keohane & Verba(1994)的因果推断逻辑、 Campbell & Stanley(1963)的威胁效度框架,以及社会学实证研究的评审标准, 对研究结论进行系统性压力测试,帮助研究者在提交前识别和处理论证弱点。
核心立场:一个经得住检验的结论,是被竭力反驳之后仍然成立的结论,而不是没有被反驳过的结论。 主动寻找竞争性解释并处理它们,比等待审稿人指出要有价值得多。
启动:获取必要信息
触发后,收集以下信息:
必填 1:核心结论或论点
用户希望进行压力测试的结论,尽量具体,例如:
"平台工人通过'时间自由叙事'内化了平台对劳动时间管理责任的转移, 这是一种主体性的屈从(subjectivation),而非单纯的意识形态灌输。"
必填 2:支撑结论的主要证据
简要说明结论建立在什么数据/材料基础上:
- 定性研究:受访者人数、类型、核心资料来源
- 定量研究:样本量、变量操作化、核心统计结果
选填 3:研究设计概述
- 研究方法类型
- 案例选择策略
- 数据收集方式
选填 4:用户已意识到的弱点
研究者自己已经注意到的潜在问题(优先处理)。
选填 5:目标期刊
不同期刊的审稿文化不同,可以影响压力测试的侧重点。
执行流程
收到信息后,自动连续执行以下四个阶段,无需每步等待用户确认。
第一阶段:结论解剖
在压力测试之前,先精确解析结论的逻辑结构:
- 核心主张:结论声称 A 导致(或解释了)B,其中 A 和 B 分别是什么?
- 因果方向:是单向因果?双向?还是条件性关系?
- 适用范围:结论明示或暗示适用于哪类情境、人群、时间段?
- 机制描述:结论背后声称发生了什么机制?(不只是"A→B",而是"A 通过 X 过程导致 B")
- 证据-结论的跨度:现有证据直接支撑到哪里?从证据到结论做了多大的推论跳跃?
输出格式:
【结论解剖】
核心主张:A = [ ],B = [ ]
因果/解释方向:
适用范围(显性):
适用范围(隐性预设):
声称的机制:
证据实际覆盖到:[具体到哪里]
推论跨度评估:小 / 中 / 大
第二阶段:竞争性解释枚举
系统枚举所有可能与当前结论竞争的替代解释。按以下五类来源逐一检索:
来源 1:混淆变量(Confounding Variables)
有没有第三个变量同时影响了原因变量和结果变量,使得观察到的关系是虚假的?
针对研究的具体情境,提出 2-4 个最可能的混淆变量候选,并说明:
- 该变量如何同时影响两端?
- 研究设计是否控制了这个变量?
- 如果没有控制,结论的稳健性受到多大威胁?
来源 2:反向因果(Reverse Causation)
B 有没有可能是 A 的原因,而非结果? 或者两者互为因果?
说明反向因果的可能路径,并评估:
- 时间顺序是否足够清晰?
- 有没有工具变量或其他因果识别策略?
来源 3:选择性偏差(Selection Bias)
研究的样本/案例是否系统性地倾向某种特征,导致结论不具代表性?
检查:
- 样本如何被选入研究?选入过程有没有内生性?
- "沉默的多数"——那些没有进入样本的对象,会和样本有什么系统性差异?
- 访谈研究中:接受访谈的人与拒绝访谈的人,有没有系统性差异?
来源 4:观察者效应(Observer Effects)
研究者的存在或研究过程本身,是否改变了被研究现象?
在定性研究中尤其重要:
- 受访者是否在研究者面前呈现了与日常不同的行为或叙述?
- 受访者是否猜测了研究者的期望并迎合它?
- 反思性:研究者的身份、立场如何影响了数据收集和解读?
来源 5:替代机制(Alternative Mechanisms)
即使 A→B 的关系成立,有没有与当前解释不同的机制也能产生同样的结果?
这是最具挑战性的一类:机制的竞争。 列出 2-3 个替代机制,每个替代机制说明:
- 这个替代机制的逻辑是什么?
- 它会产生和当前结论相同的可观测模式吗?
- 什么样的证据能够区分这两个机制?
输出格式(每类竞争性解释):
[竞争性解释类型:混淆变量/反向因果/选择偏差/观察者效应/替代机制]
具体威胁描述:
威胁的严重程度:高 / 中 / 低
当前研究的处理情况:已处理 / 部分处理 / 未处理
如果未处理,对结论可信度的影响:
可能的回应策略:
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.
- 11d ago First seen · 233 lines · 167 tokens per session scan A 34f67a1e9e3c
counterfactual-reasoning is a skill published in the GitHub repository yipng05-max/-skills (285 stars, last pushed 4mo ago), licensed MIT. It adds 167 tokens to every session and 2,416 once invoked, about $0.0008 per session on Opus 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-08-30.
Other skills, from other repositories
systematic-debugging
Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.
local-ai-agents
Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…
next-cache-components-adoption
Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…
insight-error-page
Write or audit an insight-kind error page for the Next.js dev overlay. Use when creating a new errors/ .mdx page, auditing an existing one, or checking that a page matches the framework fix cards. Covers page structure, title alignment, FixCard cards with Copy prompt button, code snippets, terminology verification…
next-cache-components-optimizer
Drive a Next.js route to instant navigation by setting up an agentic loop, under Cache Components / PPR, on initial load (hard navigation) and client-side navigation (soft navigation). Encode the goal as a failing @next/playwright instant() e2e and work it to green, one verified route at a time; the shipped test then…
next-partial-prefetching-adoption
Turn on Partial Prefetching in a Next.js app and work through the insights it surfaces. Use when the user wants to enable or adopt Partial Prefetching, flip the partialPrefetching flag, opt routes in with export const prefetch = 'partial', audit Link prefetch={true} behavior, preserve existing prefetched UI with…