Token导航 LogoToken导航

Agent Skill · 运维

agent-causal(动因因果)

agent-causal 用于辅助测试设计、自动化测试和回归验证,适合在 OpenClaw 中需要补充测试、分析失败日志或验证功能改动时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

agent-causal 是运维类 Agent Skill,可用宿主为 OpenClaw,通过ClawHub获取,权限为需要联网;许可证为 MIT-0,第三方扫描已通过,按安装量在运维类的 954 个 Skill 里排第 953。

总安装 954周安装 41GitHub Stars 公开资料未说明下载 335核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
MIT-0
版本
0.2.0

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:agent-causal(动因因果)
来源仓库:https://github.com/zhumorris/agent-causal
安装命令:
openclaw skills install agent-causal
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install agent-causal

这个 Skill 是做什么的

运维类 Skill 处理部署、监控、日志和云资源,多数需要较高的执行权限。

为 AI Agent 提供因果分析与决策审计支持。支持 A/B 测试与双重差分法结果解读。输出结构化 JSON 便于后续处理与追溯。使用前需定义清晰的实验变量与控制组。agent-causal 属于运维类 Skill,可作为该场景下的辅助能力补充。建议结合领域知识判断因果推断有效性。

适用宿主包括 OpenClaw,接入前应确认版本、权限和运行环境要求。

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 OpenClaw;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 openclaw skills install agent-causal;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

agent-causal 怎么安装?

在终端执行 openclaw skills install agent-causal。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

agent-causal 支持哪些 AI 工具?

公开资料标注支持 OpenClaw。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

agent-causal 需要什么权限?

权限级别是需要联网。该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

agent-causal 是免费的吗?

来源标注的许可证是 MIT-0。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

agent-causal 用的人多吗?

公开数据是累计安装 954 次,近一周安装 41 次,下载 335 次。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

agent-causal 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 专注 OpenClaw 一种宿主,触发方式和使用习惯不用来回切换。
  • 许可证明确为 MIT-0,商用和分发边界好判断。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 OpenClaw,想直接扩展它能力的人。
  • 需要处理运维类任务、又不想每次都手写提示词的人。
  • 需要许可证清楚、并且有第三方扫描结果的团队项目。

不太适合

  • 需要厂商级技术支持和 SLA 的生产系统。

运维类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
docker-essentials

Docker 基础 · OpenClaw

1,005,15130接触敏感数据MIT-0通过
playwright-scraper-skill

Playwright scraper 技能 · OpenClaw

923,55754接触敏感数据MIT-0有提醒
moltguard

moltguard 搜索 · OpenClaw

825,096110接触敏感数据MIT-0通过
finance-news

财经新闻 · OpenClaw

275,51210需要联网MIT-0有提醒
security-monitor

安全监视器 · OpenClaw

224,1695需要联网MIT-0有提醒
agent-causal

动因因果 · 本页

954—需要联网MIT-0通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

name
agent-causal
description
>
metadata
openclaw
category
data-science
version
0.7.6
license
Apache-2.0
tools
[exec]
requires
bins
[python3, git, pip]
python_packages
[click, scipy, numpy, pydantic]
source
https://github.com/ZhuMorris/agent-causal-decision-tool

Agent Causal Decision Tool

What this skill does

Agent Causal Decision Tool turns experiment or rollout data into a clear, defensible decision: ship, keep running, or roll back. It takes simple A/B or rollout summaries and returns structured JSON with:

  • A recommended decision and next action.
  • Key statistics (rates, lift, probabilities, DiD estimate).
  • Diagnostics, warnings, and an audit trail for humans to review later.

You bring the data (from logs, BI, CSV); the tool handles the statistics, decision logic, and audit record.

Why it exists

Most teams still judge experiments in spreadsheets or dashboards, arguing over noisy lifts and sample size. Agents can make this worse if they react to any small change.

This skill wraps standard methods behind a consistent, agent‑friendly interface:

  • Frequentist A/B testing for classic control vs variant.
  • Bayesian A/B testing when you want answers like "there is a 93% chance B is better than A."
  • Difference‑in‑Differences (DiD) for staged or regional rollouts where you cannot fully randomize.
  • Planning and power checks to see if a test is realistic before you start.
  • Decision audit and history so humans can see what the agent did, why, and how strong the evidence was..
  • Sequential / early stopping — opt‑in flag to stop A/B tests early when evidence is clearly strong, with conservative thresholds and full audit trail..
  • Cohort / segment breakdown — when an aggregate A/B result is inconclusive, break it down by user segment to find hidden signals. Uses Benjamini‑Hochberg correction for 4+ segments..

It is not a full experimentation platform; it's a small, reliable decision block that agents can call inside workflows.

When to use it

Use this skill whenever you or your agents have experiment or rollout results and need a decision you can defend:

  • You ran an A/B test and want to know whether to ship, keep running, or reject the variant.
  • You ran an A/B test and it was inconclusive — you want to know if a specific user segment is driving (or diluting) the effect.
  • You did a staged / regional rollout and want a DiD estimate of impact vs a similar control group.
  • You prefer a Bayesian summary ("95% chance B is better; expected lift 3–5%") to drive thresholds in automated workflows.
  • You need an audit trail with period, traffic, assumptions, thresholds, and warnings for product/data/risk review.
  • You want to plan an experiment (sample size, MDE, duration) or compare current results to previous experiments.

Quickstart

# Install
pip install git+https://github.com/ZhuMorris/agent-causal-decision-tool.git -q

# Run your first A/B decision
cd ~/clawd/agent-causal-decision-tool
PYTHONPATH=. python3 -m src.cli ab --control 100/5000 --variant 130/5000

Setup

Install the tool on the host where the agent will execute it.

Option 1: Install from Git (recommended)

pip install git+https://github.com/ZhuMorris/agent-causal-decision-tool.git -q

Option 2: Clone the repo manually

# Clone the repository (if not already present)
git clone https://github.com/ZhuMorris/agent-causal-decision-tool.git ~/clawd/agent-causal-decision-tool 2>/dev/null || true

# Install dependencies
pip install click scipy numpy pydantic -q

# Navigate to the tool directory
cd ~/clawd/agent-causal-decision-tool

Core commands

1. Experiment planning (plan)

Estimate required sample size, duration, and feasibility before running an experiment.

cd ~/clawd/agent-causal-decision-tool
PYTHONPATH=. python3 -m src.cli plan --baseline 0.02 --mde 5 --traffic 5000

Key parameters:

  • --baseline (required): baseline conversion rate (e.g. 0.02 for 2%).
  • --mde (required): minimum detectable effect as % lift (e.g. 5 for +5%).
  • --traffic (required): daily traffic per arm.
  • --confidence (default 0.95), --power (default 0.8).
  • --format: json (default) or text.

Planning output (JSON):

{
  "mode": "planning",
  "recommendation": {
    "decision": "feasible | slow | not_recommended",
    "confidence": "high | medium | low",
    "summary": "..."
  },
  "planning": {
    "required_sample_per_arm": 182934,
    "total_required": 365868,
    "estimated_days": 36.6,
    "feasibility": "slow",
    "allocation_used": { "control": 0.5, "variant": 0.5 }
  },
  "warnings": [...]
}

Feasibility thresholds:

  • feasible: ≤ 14 days
  • slow: 15–60 days
  • not_recommended: > 60 days

2. A/B test (frequentist, ab)

Classic frequentist A/B decision with rates, lift, and p‑value.

cd ~/clawd/agent-causal-decision-tool
PYTHONPATH=. python3 -m src.cli ab --control 100/5000 --variant 130/5000

Key parameters:

  • --control: conversions/total for control (e.g. 100/5000).
  • --variant: conversions/total for variant (e.g. 130/5000).
  • --name: optional variant name (default: variant_1).
  • --format: json (default) or text.

Typical JSON output (simplified):

{
  "version": "1.0",
  "mode": "ab_test",
  "recommendation": {
    "decision": "ship",
    "confidence": "medium",
    "summary": "Variant performs 30.00% better (p=0.0454). Ship it."
  },
  "statistics": {
    "control_rate": 0.02,
    "variant_rate": 0.026,
    "relative_lift_pct": 30.0,
    "p_value": 0.045361
  },
  "traffic_stats": {
    "control_size": 5000,
    "variant_size": 5000,
    "total_size": 10000
  },
  "warnings": [],
  "next_steps": ["Deploy variant", "Monitor over time for regression"],
  "next_analysis_suggestion": {
    "command": "cohort-breakdown",
    "reason": "Aggregate result is inconclusive. A segment-level breakdown may reveal hidden signal.",
    "trigger": "decision=escalate"
  },
  "audit": {
    "decision_path": [
      { "step": "Input validation", "passed": true },
      { "step": "Traffic check", "passed": true },
      { "step": "Conversion rate calculation", "passed": true },
      { "step": "Statistical significance test", "passed": true },
      { "step": "Effect size check", "passed": true },
      { "step": "Decision", "passed": true }
    ]
  }
}

3. A/B test (Bayesian, bayes)

Bayesian A/B with probability of winning and lift distribution.

cd ~/clawd/agent-causal-decision-tool
PYTHONPATH=. python3 -m src.cli bayes --control 100/5000 --variant 130/5000

Uses a Beta‑Binomial model with a Jeffreys prior:

  • Prior: Beta(0.5, 0.5).
  • Posterior: Beta(α + successes, β + failures).
  • Monte Carlo sampling (default 20k samples) to estimate P(variant wins).
  • Example thresholds: P(variant wins) ≥ 0.95 → ship, ≤ 0.05 → reject.

Key parameters:

  • --control, --variant: same format as ab.
  • --name: variant name.
  • --format: json or text.
  • --samples: number of Monte Carlo samples (default 20000).

Typical JSON output (simplified):

{
  "mode": "bayesian_ab",
  "recommendation": {
    "decision": "ship",
    "confidence": "medium",
    "summary": "Variant wins with P(better)=0.976. Median lift=30.10%."
  },
  "statistics": {
    "p_variant_wins": 0.9758,
    "lift_median_pct": 30.10,
    "lift_95ci_pct": [0.20, 69.15],
    "posterior_control": { "alpha": 100.5, "beta": 4900.5, "mean": 0.0201 },
    "posterior_variant": { "alpha": 130.5, "beta": 4870.5, "mean": 0.0261 }
  }
}

When to use which:

  • Bayesian: small data, need probabilities and lift intervals, may stop early.
  • Frequentist: large data, traditional p‑values, compatibility with existing practice.

4. Difference‑in‑Differences (DiD, did)

For staged or regional rollouts where you cannot fully randomize.

cd ~/clawd/agent-causal-decision-tool
PYTHONPATH=. python3 -m src.cli did \
  --pre-control 1000 --post-control 1100 \
  --pre-treated 900 --post-treated 1150

Key parameters:

  • --pre-control, --post-control: control metric before/after.
  • --pre-treated, --post-treated: treated metric before/after.

Typical JSON output (simplified):

{
  "mode": "did",
  "recommendation": {
    "decision": "escalate",
    "confidence": "low",
    "summary": "Effect looks positive but caution level is high — escalate for human review."
  },
  "effect": {
    "treatment_change": 0.25,
    "control_change": 0.10,
    "did_estimate": 0.15,
    "relative_did_pct": 16.67
  },
  "statistics": {
    "pre_control": 1000,
    "post_control": 1100,
    "pre_treated": 900,
    "post_treated": 1150
  },
  "diagnostics": {
    "parallel_trends_evidence": "weak",
    "fragility_flags": ["single_pre_period", "small_sample"],
    "recommended_caution_level": "high"
  },
  "warnings": [
    { "code": "did_result_should_be_reviewed_by_human", "severity": "warning" },
    { "code": "AGGREGATE_DATA", "severity": "info" }
  ],
  "next_steps": ["Escalate to human for review", "Do not treat as randomized experiment"]
}

5. Cohort / segment breakdown (cohort-breakdown)

When an aggregate A/B or DiD result is inconclusive, break it down by user segment to find hidden signals. The output flags when a segment-level result contradicts the aggregate decision.

cd ~/clawd/agent-causal-decision-tool
PYTHONPATH=. python3 -m src.cli cohort-breakdown --file segments.json

JSON input:

{
  "experiment_id": "checkout-v3",
  "metric": "conversion_rate",
  "prior_result_id": "dec_20260501_001",
  "prior_decision": "wait",
  "segments": [
    {
      "segment_name": "new_users",
      "segment_definition_note": "Users registered within last 30 days",
      "control_conversions": 21,
      "control_total": 1000,
      "variant_conversions": 67,
      "variant_total": 1000
    },
    {
      "segment_name": "returning_users",
      "segment_definition_note": "Users registered more than 30 days ago",
      "control_conversions": 220,
      "control_total": 4000,
      "variant_conversions": 228,
      "variant_total": 4000
    }
  ]
}

CSV input (alternative):

segment_name,segment_definition_note,arm,conversions,total
new_users,Users registered within last 30 days,control,21,1000
new_users,Users registered within last 30 days,variant,67,1000
returning_users,Users registered more than 30 days ago,control,220,4000
returning_users,Users registered more than 30 days ago,variant,228,4000

Typical JSON output:

{
  "method": "experiment_cohort_breakdown",
  "prior_result_id": "dec_20260501_001",
  "prior_decision": "wait",
  "cohort_decision_override": true,
  "cohort_override_reason": "Strong positive signal in 'new_users' contradicts aggregate 'wait'",
  "interaction_flag": false,
  "segments": [
    {
      "segment_name": "new_users",
      "control_rate": 0.021,
      "variant_rate": 0.067,
      "relative_lift_pct": 219.0,
      "p_value_raw": 0.000001,
      "p_value_adjusted": 0.000001,
      "decision": "strongly_positive",
      "priority_rank": 1
    },
    {
      "segment_name": "returning_users",
      "control_rate": 0.055,
      "variant_rate": 0.057,
      "relative_lift_pct": 3.6,
      "p_value_raw": 0.697,
      "p_value_adjusted": 0.697,
      "decision": "neutral",
      "priority_rank": 2
    }
  ],
  "priority_ranking": [
    { "rank": 1, "segment": "new_users", "rationale": "Strong positive effect, statistically significant after BH correction" },
    { "rank": 2, "segment": "returning_users", "rationale": "No meaningful effect detected. Deprioritize." }
  ],
  "summary": "new_users drives the effect. 1 segment(s) positive.",
  "recommended_next_action": "targeted_rollout",
  "warnings": [],
  "audit": {
    "test_type": "two_proportion_z_test",
    "multiple_comparison_method": "benjamini_hochberg",
    "total_segments_compared": 2
  }
}

Statistical method:

  • Per-segment: two-proportion z-test (same as ab)
  • 2–3 segments: no multiple-comparison correction
  • 4+ segments: Benjamini-Hochberg (BH) FDR control by default
  • 5+ segments: Bonferroni available as optional override (tool warns when used)

cohort_decision_override: Fires when a strongly_positive segment contradicts an aggregate wait/escalate decision, or when a strongly_negative segment contradicts ship. Agents should treat this as a signal to recommend targeted rollout rather than accepting the aggregate result.

interaction_flag: Fires when one segment is strongly_positive and another is strongly_negative — a possible interaction effect worth flagging.


6. Decision audit (audit)

Reconstruct and explain a previous decision.

# Save result to a file
PYTHONPATH=. python3 -m src.cli ab --control 100/5000 --variant 130/5000 > /tmp/result.json

# Human-readable audit
PYTHONPATH=. python3 -m src.cli audit /tmp/result.json --format text

# Audit with maturity assessment
PYTHONPATH=. python3 -m src.cli audit /tmp/result.json --maturity

Maturity assessment:

  • Scores an experiment 0–100 across multiple checks (warnings, coverage, documentation, traffic).
  • Labels: mature (≥ 90), adequate (≥ 70), immature (≥ 50), inadequate (< 50).

6. Experiment history and comparison (history, compare, save)

Persist experiment outputs to a local SQLite database and compare them.

# Run and save
PYTHONPATH=. python3 -m src.cli ab --control 100/5000 --variant 130/5000 --save
PYTHONPATH=. python3 -m src.cli did --pre-control 1000 --post-control 1100 --pre-treated 900 --post-treated 1150 --save
PYTHONPATH=. python3 -m src.cli plan --baseline 0.02 --mde 5 --traffic 5000 --save

# List recent experiments
PYTHONPATH=. python3 -m src.cli history
PYTHONPATH=. python3 -m src.cli history --mode ab_test --limit 10

# Compare experiments by ID
PYTHONPATH=. python3 -m src.cli compare 1 2 3

# Save an existing JSON result into history
PYTHONPATH=. python3 -m src.cli save /tmp/result.json --name "checkout-v3-test"

SQLite DB is stored at ~/.agent-causal/history.db. All raw JSON is preserved for later audit and comparison.


Decision reference

How to interpret the decision field in recommendations:

DecisionMeaningTypical trigger
shipDeploy variantStrong positive effect, tests/guardrails OK
keep_running / waitContinue experimentSome signal but not strong enough yet
rejectDo not deployStrong negative effect or clear regression
escalate / escalate_to_humanNeeds human reviewInconclusive, fragile setup, or critical warnings
targeted_rolloutShip to specific segment onlyStrong signal in one segment, aggregate inconclusive
full_rolloutShip to all usersAll segments positive
abandon_segmentDo not ship to specific segmentStrong negative in one segment despite aggregate ship
confirm_rejectionConfirm abandonmentAll segments negative

Warnings and agent actions

When a warning appears, here is the suggested agent response:

WarningMeaningSuggested agent action
LOW_TRAFFICSample below ~1000 per groupDo not ship — wait for more data
SMALL_EFFECTLift below practical thresholdEscalate to human before deciding
AGGREGATE_DATADiD on aggregate data onlyAdd caution flag, do not treat as RCT
TRENDS_DIVERGEParallel trends may not holdEscalate to human, DiD may not be valid
did_result_should_be_reviewed_by_humanHigh caution level set by diagnosticsAlways escalate when this warning is present

Python API (optional)

You can also call the underlying library directly from Python:

from src.ab_test import calculate_ab
from src.bayes import calculate_bayes_ab
from src.did import calculate_did
from src.cohort import cohort_breakdown

# Frequentist A/B
result = calculate_ab({
  "control_conversions": 100,
  "control_total": 5000,
  "variant_conversions": 130,
  "variant_total": 5000
})
if result.recommendation.decision == "ship":
  pass  # Deploy

# Bayesian A/B
result = calculate_bayes_ab({
  "control_conversions": 100,
  "control_total": 5000,
  "variant_conversions": 130,
  "variant_total": 5000
})
if result["recommendation"]["decision"] == "ship":
  pass  # Deploy

# DiD
result = calculate_did({
  "pre_control": 1000, "post_control": 1100,
  "pre_treated": 900, "post_treated": 1150
})

# Cohort breakdown
result = cohort_breakdown({
  "experiment_id": "checkout-v3",
  "metric": "conversion_rate",
  "prior_result_id": "dec_20260501_001",
  "prior_decision": "wait",
  "segments": [
    {
      "segment_name": "new_users",
      "segment_definition_note": "Users registered within last 30 days",
      "control_conversions": 21,
      "control_total": 1000,
      "variant_conversions": 67,
      "variant_total": 1000
    }
  ]
})
if result["cohort_decision_override"]:
  pass  # Targeted rollout recommended

Location and dependencies

  • GitHub: https://github.com/ZhuMorris/agent-causal-decision-tool
  • Local path (if cloned): ~/clawd/agent-causal-decision-tool/

Dependencies:

  • Python 3.9+
  • click ≥ 8.1.0
  • scipy ≥ 1.11.0
  • numpy ≥ 1.24.0
  • pydantic ≥ 2.0.0

平台分布

OpenClaw

89.92%
按下载量换算301

安全审计

VirusTotal

通过

ClawScan

通过

Static analysis

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills