原始内容
name: statsoft-cli slug: statsoft-cli displayName: 统计软件接入助手 / Statsoft-CLI cn_name: 统计软件接入助手 version: "2.7.1" summary: "跨平台统计软件 CLI 集成,面向 AI Agent;覆盖 34+ 款软件(R/Stata/SAS/SPSS/Python/贝叶斯/ML等),双语。核心价值:激活历史代码资产,用于 AI 工作流自动化。" license: MIT description: "跨平台统计软件 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." triggers:
- "SPSS"
- "SPSS Statistics"
- "R"
- "R命令行"
- "Stata"
- "SAS"
- "统计软件"
- "连接统计软件"
- "statsoft-cli"
- "connect statistical software" metadata: { "openclaw": { "emoji": "🛠️", "icon": "assets/icon.svg" }, "authors": ["medstatstar", "phoe-zip"], "contributors": ["medstatstar", "phoe-zip"], "version": "2.7.1", "license": "MIT", "tags": ["Statistical Software", "CLI", "R", "SPSS", "Stata", "SAS", "Bayesian", "Machine Learning", "Econometrics", "SEM", "Data Mining"], "homepage": "https://github.com/medstatstar/statsoft-cli", "repository": "https://github.com/medstatstar/statsoft-cli" }
Language
Pick the README that matches your language for human-readable, language-specific guides:
- English guide → README.md
- 中文指南 → README_zh-CN.md
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 /runopens the Minitab GUI, not headless)
Full platform matrix in references/platform-support.md; extended config in ADDITIONAL_SOFTWARE.md.
Execution Workflow
- Detect Platform — cross-platform
source scripts/cross-platform/_platform-detect.sh(sets$PLATFORM/$OS/$ARCH); Windows handled inside.ps1scripts, no source - Pre-scan Confirmation — before any scan, MUST 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
- Prompt (English by default; auto-switched to Chinese on a
- 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":"..."},...} - By default only the
installedboolean is returned; path / version disclosed only withSTATSOFT_AUTO_WRITE=1orSTATSOFT_CONFIRM=1+interactive y (note:STATSOFT_REVEALcontrols per-software setup-time output only, not batch scan results)
- Windows:
- Select Config Mode — batch / specified / single-software (calls individual
setup_*.ps1orsetup_*.sh) - Detect & Setup — route to the platform script; non-Windows auto-hides incompatible software
- Save Config — detect-only by default; writes
config.jsononly with explicit authorization (STATSOFT_AUTO_WRITE=1orSTATSOFT_CONFIRM=1+ interactive y) - Output Summary — per
references/completion-prompts.mdtemplate
Default-Deny Gates
All persistence and sensitive operations are off by default and require explicit authorization (fail-closed), consistent with the scripts:
| Gate | Effect | Default |
|---|---|---|
STATSOFT_AUTO_WRITE=1 |
Persist config.json (non-interactive / agent context) |
off |
STATSOFT_CONFIRM=1 + TTY y |
Persist after interactive confirmation | off |
STATSOFT_REVEAL=1 |
Reveal path / version details during detection | off |
STATSOFT_VERIFY=1 |
Allow launching third-party binaries for version / verification | off |
STATSOFT_CMDSTAN_RUN=1 |
Allow 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-write —
config.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:
| Risk | Level |
|---|---|
| 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 examplesreferences/config-templates.md—config.jsontemplates & field referencereferences/version-specifics.md— version differencesreferences/completion-prompts.md— completion prompt templatesreferences/trust-and-safety.md— risk levels & pre-flight detailsreferences/workflow.md— workflow gating detailsreferences/platform-support.md— full platform support matrixtests/— automated test scripts