集成

statsoft-cli

试用

跨平台统计软件 CLI 集成,面向 AI Agent;覆盖 34+ 款软件(R/Stata/SAS/SPSS/Python/贝叶斯/ML等),双语。核心价值:激活历史代码资产,用于 AI 工作流自动化。 / Cross-platform statistical software CLI integration for AI Agent; 34+ packages (R/Stata/SAS/SPSS/Python/Bayesian/ML, etc.), bilingual. Core value: activating historical code assets for AI workflow automation.

它能做什么

跨平台统计软件 CLI 集成,面向 AI Agent;覆盖 34+ 款软件(R/Stata/SAS/SPSS/Python/贝叶斯/ML等),双语。核心价值:激活历史代码资产,用于 AI 工作流自动化。 / Cross-platform statistical software CLI integration for AI Agent; 34+ packages (R/Stata/SAS/SPSS/Python/Bayesian/ML, etc.), bilingual. Core value: activating historical code assets for AI workflow automation.

技能文档

Language

Pick the README that matches your language for human-readable, language-specific guides:

This skill responds in the user's current input language (Chinese or English) and auto-detects / switches accordingly. The runtime scripts embed a locale check ($script:isZH in PowerShell, SCRIPT_LANG in Bash) so all user-facing prompts switch to Chinese on a zh-* UI culture and to English otherwise. Code comments and documentation are English-only.

The SKILL.md body, references/*.md, and ADDITIONAL_SOFTWARE.md are English-only and agent-facing; runtime command prompts switch to Chinese / English by locale. For end-to-end walkthroughs, examples, and troubleshooting in your language, open the README above.

Overview

Activates historical code assets locked in statistical software (syntax, scripts, projects) and wires them into AI workflows via automated detection, configuration, and execution.

Core Functions

Covers 34+ statistical / data-science packages, auto-routed by platform; non-Windows auto-hides incompatible software:

  • Cross-platform (Win / Mac / Linux, CLI): R, Stata, SAS, CmdStan, GenStat, Gretl, H2O.ai, JAGS, Julia, KNIME, Mathematica, Matlab, OpenBUGS, Orange, OxMetrics, PSPP, Rattle, SHAZAM, Stat/Transfer, Tanagra, TSP, Weka
  • Windows + limited cross-platform: Mplus
  • Windows-only CLI: SPSS Statistics, EViews, JMP, LIMDEP, Microfit, NCSS, NLOGIT, Origin, Q(MRKS), SPSS Modeler, Statistica
  • GUI-only detection + manual launch guide: AMOS, GraphPad Prism, JASP, jamovi, Minitab (never drive batch via CLI; mtb.exe /run opens the Minitab GUI, not headless)

Full platform matrix in references/platform-support.md; extended config in ADDITIONAL_SOFTWARE.md.

Router Paths

When gate 0 classifies a request as Simple (clear tool + action), route straight to the canonical per-tool entry script. These are the 6 primary entry points; the rest are auto-discovered from the platform matrix:

  • scripts/windows-only/SPSS/setup_spss.ps1 — SPSS Statistics (Windows)
  • scripts/windows-only/statsoft-r.ps1 — R CLI wrapper / data conversion (Windows)
  • scripts/cross-platform/R/setup_r.sh — R (cross-platform)
  • scripts/cross-platform/Stata/setup_stata.sh — Stata (cross-platform)
  • scripts/windows-only/statsoft-sas.ps1 — SAS (Windows)
  • scripts/cross-platform/SAS/setup_sas.sh — SAS (cross-platform)

Clarification Gate (gate 0) — friendly menu policy

Per ct-base §13 (the same pattern ct-advisor implements as its gate 0), this skill triages the user's first message before opening any menu and defaults to the friendliest path. The interactive menus (scan-confirmation, config-mode selection) are only shown when step-by-step confirmation genuinely helps — never forced onto a simple request.

Classify the first message into one of three paths:

  • Simple — specific, single-intent, answerable directly (e.g. "Connect SPSS 26", "Convert data.sav to data.dta", "Run my Stata do-file batch"). → Detect / act in one pass. Do NOT pop the scan or config menu. If the tool and target are clear, route straight to detection / configuration (detect-only by default) and report; optionally offer a deeper step ("want me to also scan for the rest?") rather than demanding a choice.
  • Complex — multi-decision or "set up everything / I'm not sure what's installed" (Example 4 in the README). → Present the routing menu (auto-scan vs specify-paths) and confirm step by step. Only open the full menu when step-by-step confirmation genuinely helps.
  • Vague — need unclear / user undecided (Example 5, "I want to use statistical software but don't know where to start"). → Enter grill-me clarify mode: ask 1–3 conclusion-changing questions per round (which tools are installed? what do you want to do — run old scripts / convert data / build new analysis? headless or GUI?), branch-by-branch, until the right tool is locked — never dump the 34-tool list or pick for the user.

Default to the friendliest path: when in doubt between simple and complex, give a short direct detection + an optional deeper-menu offer instead of forcing a menu. When the user's first message already names a clear target (a specific tool + action), skip the menu entirely and go straight to detection / configuration.

The clarification strings themselves follow the locale switch ($script:isZH / SCRIPT_LANG), so menus and probes render in Chinese on a zh-* system and English otherwise — consistent with ct-base §13.3 (this skill's script-embedded locale mechanism is the equivalent of i18n.py).

Execution Workflow

  1. Detect Platform — cross-platform source scripts/cross-platform/_platform-detect.sh (sets WB_OS / WB_ARCH; Windows handled inside .ps1 scripts, no source)
  2. Pre-scan Confirmation (only when gate 0 classifies the request as Complex) — before a full scan, prompt and wait:
    • Prompt (English by default; auto-switched to Chinese on a zh-* locale): "⚠️ Auto-scan may take a while (~30s on Windows). If you have ≤3 packages, specify paths to skip. Your choice?" Options: A) Auto-scan B) Specify paths
    • A → step 3; B → skip scan, go to step 4
  3. System Scan (only if A) — batch-detect installed software:
    • Windows: scripts/windows-only/scan/scan_all.ps1; Mac/Linux: scripts/cross-platform/scan/scan_all.sh
    • Output JSON: {"R":{"installed":true,"path":"...","version":"..."},...}
    • Batch scan (scan_all.*): without explicit consent it is skipped entirely (prints a notice, exits 0, no JSON). With consent (set STATSOFT_AUTO_WRITE to 1 or STATSOFT_CONFIRM to 1 plus an interactive y) it returns the full {path, version} JSON. STATSOFT_REVEAL does not affect the batch scan.
    • Per-software setup (setup_*.sh / setup_*.ps1): reports installed=true with path / version hidden by default; STATSOFT_REVEAL set to 1 reveals them in the setup output — this is the only thing REVEAL controls.
  4. Select Config Mode — batch / specified / single-software (calls individual setup_*.ps1 or setup_*.sh)
  5. Detect & Setup — route to the platform script; non-Windows auto-hides incompatible software
  6. Save Config — detect-only by default; writes config.json only with explicit authorization (set STATSOFT_AUTO_WRITE to 1 or STATSOFT_CONFIRM to 1 plus an interactive y)
  7. Output Summary — per references/completion-prompts.md template

Default-Deny Gates

All persistence and sensitive operations are off by default and require explicit authorization (fail-closed), consistent with the scripts:

GateEffectDefault
STATSOFT_AUTO_WRITE set to 1Persist config.json (non-interactive / agent context)off
STATSOFT_CONFIRM set to 1 + TTY yPersist after interactive confirmationoff
STATSOFT_REVEAL set to 1Reveal path / version in per-software setup output only (batch scan_all needs consent, not REVEAL)off
STATSOFT_VERIFY set to 1Allow launching third-party binaries for version / verificationoff
STATSOFT_CMDSTAN_RUN set to 1Allow compiling & running user Stan models (untrusted native code)off

All writes go through scripts/common/write_config.py: accepts only the canonical config.json under the skill root, and before writing takes a timestamped backup (config.json.bak.yyyymmdd_hhmmss) then atomic-replaces.

Core Permissions

  • Local file read-writeconfig.json, temp scripts
  • Process execution — statistical software binaries
  • Network access — CRAN / Anaconda repos

Trust & Safety

This skill performs high-risk operations; understand the risk levels before use:

RiskLevel
Execute local executables🔴 High
Download & install software🔴 High
Execute user scripts (e.g. .sps via SPSS Python)🔴 High
Modify config.json🟡 Medium
Network access🟡 Medium

Pre-flight: ✅ review all scripts; ✅ confirm config.json changes (auto-backup); ✅ confirm any downloads; ✅ inspect generated commands for sensitive projects.

Reference Files

  • ADDITIONAL_SOFTWARE.md — extended software config (31 packages)
  • references/command-examples.md — per-software CLI command examples
  • references/config-templates.mdconfig.json templates & field reference
  • references/version-specifics.md — version differences
  • references/completion-prompts.md — completion prompt templates
  • references/trust-and-safety.md — risk levels & pre-flight details
  • references/workflow.md — workflow gating details
  • references/platform-support.md — full platform support matrix
  • tests/ — automated test scripts

相关技能

读入/转存 50+ 统计软件格式,对统计二进制格式完整保留变量标签/值标签/特殊缺失值等元数据。副作用声明(完整):运行环境检查(scripts/check_env.py);可应要求 pip 安装缺失包;写入主输出文件的同时可能生成 sidecar 元数据(CSV/TSV 旁 <名>_metadata.json、Parquet/Arrow 内嵌)及覆盖 .hyper 时的 .bak/.bak.1 备份;处理 .rda/.rds/.RData/.mtw/.mpj/.rec 时可调用本地 R 解释器,但该回退默认禁用,需 allow_r_exec=True 显式开启。 / Read/convert 50+ statistical software formats, preserving variable/value labels and missing-value metadata for binary stats formats. FULL side effects: runs environment checks (scripts/check_env.py); may optionally pip-install missing packages on request; writes the main output file AND may emit sidecar metadata (e.g. <name>_metadata.json beside CSV/TSV, embedded in Parquet/Arrow schema) and .bak/.bak.1 backups when overwriting .hyper; can invoke the local R interpreter for .rda/.rds/.RData/.mtw/.mpj/.rec files via a fallback DISABLED by default and opted in only with allow_r_exec=True.

2 次安装

药企药物研发辅助临床试验数据统计。参考 Statistical Analysis skill 的 descriptive statistics 与 group comparison 部分,构建试验分析支持能力。

13 次安装

Statista (statista.com). Use this skill for ANY Statista request — searching and reading data. Whenever a task involves Statista, use this skill instead of c...

1 次安装

完整实证研究工作流管理技能。整合 codex-stata-for-economists 的工程化方法论与 Stata-MCP 执行工具。 使用场景:(1) Stata do-file 编写、调试、执行与优化 (2) 实证研究流水线搭建与项目管理 (3) 论文结果复现与审查(replication/robustness)(4) 计量经济学方法选择与实现 (5) 研究日志溯源校验(log verification)(6) 提交前质量审核与评分 当用户提到以下关键词时触发:stata, do文件, do-file, dofile, dta, 面板数据, panel, did, 双重差分, 倍分法,

上传数据文件,直接拿到图表、清洗后的数据集、统计报告和可视化看板,代码在后台自动执行。

114 次安装5 星标

JavaScript AI 应用 SDK 入门工具,支持模型调用、文件上传与基础代理配置。Use when 需要AI模型调用、智能对话、Agent编排、LLM应用时使用。不适用于需要100%确定性的关键决策。适用于独立开发者、企业团队和自动化工作流场景。支持中文交互,无需复杂配置即开即用。输出结果可直接使用,减少二次加工成本。

1 次安装