[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-minimax-r-analysis":3,"mdc--5pbwlx-key":37,"related-repo-minimax-r-analysis":1263,"related-org-minimax-r-analysis":1366},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":12,"stars":26,"repoUrl":27,"updatedAt":28,"license":29,"forks":30,"topics":31,"repo":32,"sourceUrl":35,"mdContent":36},"r-analysis","perform statistical analysis with R","当用户使用 R 做统计分析、流行病学建模、生物信息分析、ggplot 作图，说\"用 R 跑一下\"\"写个 R 脚本\"\"rmarkdown 出报告\"\"quarto 渲染\"\"R 环境怎么管\"时使用。本技能规定本地 R 分析的统一操作规程：renv 锁定依赖环境、脚本化非交互执行（Rscript 一条命令跑完）、sessionInfo() 必须记录进 provenance、rmarkdown\u002Fquarto 作为报告产物、产物落盘 output\u002F\u003Cskill>\u002F\u003Cslug>\u002Flatest\u002F 并与 record_run 集成。同义触发场景：R 分析、R 脚本、tidyverse、ggplot、RStudio、knitr、renv、R 统计。",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},"minimax","MiniMax","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Fminimax.jpg","MiniMax-AI",[13,17,20,23],{"name":14,"slug":15,"type":16},"Research","research","tag",{"name":18,"slug":19,"type":16},"R","r",{"name":21,"slug":22,"type":16},"Data Analysis","data-analysis",{"name":24,"slug":25,"type":16},"Statistics","statistics",5,"https:\u002F\u002Fgithub.com\u002FMiniMax-AI\u002FMiniMax-Code-Plugins","2026-08-21T03:59:36.956841",null,2,[],{"repoUrl":27,"stars":26,"forks":30,"topics":33,"description":34},[],"Community registry and contribution toolkit for MiniMax Code plugins.","https:\u002F\u002Fgithub.com\u002FMiniMax-AI\u002FMiniMax-Code-Plugins\u002Ftree\u002FHEAD\u002Fplugins\u002FHylouis233\u002Fopenscience\u002Fskills\u002Fr-analysis","---\nname: r-analysis\ndescription: >-\n  当用户使用 R 做统计分析、流行病学建模、生物信息分析、ggplot 作图，说\"用 R 跑一下\"\"写个 R 脚本\"\"rmarkdown 出报告\"\"quarto 渲染\"\"R 环境怎么管\"时使用。本技能规定本地 R 分析的统一操作规程：renv 锁定依赖环境、脚本化非交互执行（Rscript 一条命令跑完）、sessionInfo() 必须记录进 provenance、rmarkdown\u002Fquarto 作为报告产物、产物落盘 output\u002F\u003Cskill>\u002F\u003Cslug>\u002Flatest\u002F 并与 record_run 集成。同义触发场景：R 分析、R 脚本、tidyverse、ggplot、RStudio、knitr、renv、R 统计。\nargument-hint: '[分析任务描述]'\nmetadata:\n  domains: [compute]\n  last_reviewed: '2026-08-18'\n---\n\n# r-analysis：R 分析规程\n\n## 目的\n\nR 在统计与生物医学领域不可替代，但 R 工作流有两个经典的复现陷阱：包版本全局漂移（半年前能跑的脚本今天报错）和 RStudio 交互式执行（结果依赖\"先点了哪个单元格\"）。本技能把每一次 R 分析约束为可复现的最小闭环：\n\n1. 环境可重建：renv 锁文件固定全部包版本；\n2. 执行可重放：脚本化非交互，`Rscript` 一条命令从头跑到尾；\n3. 环境可审计：`sessionInfo()` 输出必进 provenance 记录；\n4. 产物可定位：报告走 rmarkdown\u002Fquarto 渲染，统一落盘 output 契约。\n\n本技能与 python-analysis 平行：同一套目录契约、同一套 provenance 集成，差异只在 R 生态的工具链。不涉及远程执行（远程见 remote-compute \u002F hpc-slurm）。\n\n## 前置检查\n\n1. 确认当前目录是工作区根目录（结构约定见 research-workspace）；本技能的产物 skill 名为 `r-analysis`。\n2. 确认原始数据已在 `data\u002F` 下且只读；R 里读数据一律用相对路径（`here::here(\"data\", ...)` 或直接相对路径），不写绝对路径。\n3. 检查项目根是否已有 `renv.lock`：有则用现有环境，不要另起炉灶；没有则按第 1 节初始化。\n4. RStudio 用户注意：本技能要求的交付形态是\"命令行可重放\"，RStudio 里逐行运行可以用于探索，但进入产物的分析必须落成脚本。\n\n## 1 · 环境：renv 锁定\n\n首次建立环境：\n\n```r\ninstall.packages(\"renv\")   # 仅此一个包装进全局库\nrenv::init()               # 生成 renv.lock、renv\u002F 与 .Rprofile\n```\n\n日常纪律：\n\n1. 新装包用 `renv::install(\"包名\")`，装完立即 `renv::snapshot()` 更新 `renv.lock`；\n2. 换机器或重建环境时 `renv::restore()`，严格按锁文件还原，不\"顺手升级\"；\n3. `renv.lock` 是产物的一部分，纳入版本管理与证据胶囊；`renv\u002F` 目录本身不进版本控制（renv 默认 .gitignore 已处理）；\n4. 升级包是有意决策：`renv::update()` 后重跑全部分析并登记新 provenance，不在论文冻结（evidence-capsule）之后升级。\n\n## 2 · 随机种子与脚本化执行\n\n1. 脚本开头固定种子：`set.seed(42)`；涉及并行或特定 RNG 时显式指定 `RNGkind` 并写进注释与 provenance note。\n2. 交付形态是非交互脚本：`Rscript scripts\u002Fanalyze-xxx.R` 一条命令跑完，无 `readline()`、无依赖编辑器状态。\n3. 脚本放 `scripts\u002F`，kebab-case 命名；参数集中在脚本顶部常量或 `commandArgs` 解析。\n4. 种子值、R 版本、关键包版本写进 record_run 的 `--note`。\n\n## 3 · sessionInfo() 必记录\n\nR 的环境指纹是 `sessionInfo()`，等价于 Python 侧的 env_hash，必须留痕：\n\n1. 每个分析脚本末尾输出会话信息到产物目录：\n\n   ```r\n   sink(file.path(out_dir, \"session-info.txt\"))\n   print(sessionInfo())\n   sink()\n   ```\n\n2. 登记 provenance 时把该文件一并作为产物路径，note 中摘要 R 版本与关键包版本：\n\n   ```bash\n   python \u003C插件包路径>\u002Fskills\u002Fprovenance-record\u002Fscripts\u002Frecord_run.py \\\n     --path output\u002Fr-analysis\u002F\u003Cslug>\u002Flatest\u002F \\\n     --tool \"Rscript scripts\u002Fanalyze-survival.R\" \\\n     --note \"生存分析，seed=42，R 4.4.1，survival 3.7-0，详见 session-info.txt\"\n   ```\n\n3. 远程 R 任务同样抓回 session-info.txt 再登记（见 provenance-record 的远程一节）。\n\n## 4 · 数据与产物\n\n1. 原始数据只读：从 `data\u002F` 读，永不写回；清洗产物另存（中间产物进 `output\u002Fr-analysis\u002F\u003Cslug>\u002F\u003Ctimestamp>\u002F`，复用数据集进 `derived\u002F`），纠错走增补（research-workspace 只读原则）。\n2. 落盘契约与其他分析 skill 一致：\n\n   ```text\n   output\u002Fr-analysis\u002F\u003Cslug>\u002F\u003Ctimestamp>\u002F   # 本次运行全部产物\n   output\u002Fr-analysis\u002F\u003Cslug>\u002Flatest\u002F        # 运行结束后的完整副本\n   ```\n\n3. 图表双格式 300 dpi（与 python-analysis 相同约定）：\n\n   ```r\n   ggsave(file.path(out_dir, \"km-curve.png\"), p, dpi = 300, width = 6, height = 4)\n   ggsave(file.path(out_dir, \"km-curve.pdf\"), p, width = 6, height = 4)\n   ```\n\n4. 统计结果（系数表、检验结果）同时落机器可读文件（CSV），报告数字须能指回该文件。\n\n## 5 · 报告：rmarkdown \u002F quarto\n\n1. 给人看的报告用 rmarkdown（.Rmd）或 quarto（.qmd）撰写，渲染产物（HTML\u002FPDF\u002FDOCX）放进同一次运行的时间戳目录。\n2. 报告中的数字尽量由代码内联生成（`` `r knitr::inline_expr(...)` `` \u002F quarto 的 `{r}` 行内表达式），减少手抄数字；必须手抄时，对照产物 CSV 逐个核对。\n3. 渲染命令同样脚本化（如 `Rscript -e \"quarto::quarto_render('reports\u002Fxxx.qmd')\"`），不用 RStudio 的 Knit 按钮作为唯一渲染途径。\n4. 报告交付前可复用 python-analysis 的 `stats_integrity_check.py` 做数字体检（百分比、p 值、样本量、CI 的确定性检查），error 清零方可交付。\n\n## 6 · 完整示例\n\n一次 analysis 阶段的 R 分析闭环（虚构示例，slug 为 `3f9a1c7e`）：\n\n```bash\n# 1. 环境（首次）：R 内执行 renv::init()，之后每次分析前 renv::restore()\n# 2. 跑分析脚本（非交互，一条命令）\nRscript scripts\u002Fanalyze-survival.R\n#    脚本内部：set.seed(42)；读 data\u002F2026-08-cohort\u002F；\n#    产物写 output\u002Fr-analysis\u002F3f9a1c7e\u002F20260819-153000\u002F（含 session-info.txt）\n\n# 3. 渲染报告（同样脚本化）\nRscript -e \"quarto::quarto_render('reports\u002Fsurvival-2026-08.qmd')\"\n\n# 4. 刷新 latest（先清空再放副本），然后登记 provenance\npython \u003C插件包路径>\u002Fskills\u002Fprovenance-record\u002Fscripts\u002Frecord_run.py \\\n  --path output\u002Fr-analysis\u002F3f9a1c7e\u002Flatest\u002F \\\n  --tool \"Rscript scripts\u002Fanalyze-survival.R\" \\\n  --session cli-2026-08-19-01 \\\n  --note \"KM + Cox 分析，seed=42，R 4.4.1，survival 3.7-0，详见 session-info.txt\"\n\n# 5. 报告数字体检\npython \u003C插件路径>\u002Fskills\u002Fpython-analysis\u002Fscripts\u002Fstats_integrity_check.py \\\n  --path reports\u002Fsurvival-2026-08.md --format json\n```\n\n每一步都可单独重跑：环境坏了重 `renv::restore()`，结果存疑重跑第 2 步（同种子应得同结果），报告改版只重跑第 3 步。这条链路上任何一环不可重放，都说明前面的规程有缺口，先补规程再继续。\n\n## 输出模板\n\n分析完成后的汇报：\n\n```markdown\n## R 分析完成（\u003C任务名>）\n\n- 环境：renv（renv.lock 已 snapshot），R \u003C版本>\n- 种子：set.seed(\u003CN>)（已登记）\n- 产物：output\u002Fr-analysis\u002F\u003Cslug>\u002Flatest\u002F（清单：…；含 session-info.txt）\n- 报告：\u003C渲染产物路径>\n- provenance：已登记（note：…）\n\n下一步：…\n```\n\n## 本技能不做什么\n\n- 不替用户选统计模型与检验方法：模型适用性是领域判断，必要时标注 `[模型知识—待核实]` 并请用户确认。\n- 不管理全局 R 安装：安装 R 本身、Rtools、系统库依赖向用户说明后由用户执行。\n- 不动原始数据：清洗纠错一律生成新文件（research-workspace 只读原则）。\n- 不覆盖 Python 生态：Python 分析走 python-analysis；混合项目两边产物分目录登记，互不混用 skill 名。\n- 不做远程提交：集群上的 R 作业按 hpc-slurm 规程封装，本技能只管本地规程。\n\n## 收尾与下一步\n\n- 交付前清单：latest\u002F 已刷新、session-info.txt 在产物内、provenance 已登记、数字体检 error 清零。\n- 结论支撑论文论断时进入 evidence-capsule 冻结（renv.lock + session-info.txt 一并打包）。\n- 报告按 reviewer-protocol 接受发布前审查；error 级意见清零后交付。\n- 任务运行时间长时改用 run-monitor 后台执行（`Rscript` 同样适用），会话不空等。\n",{"data":38,"body":44},{"name":4,"description":6,"argument-hint":39,"metadata":40},"[分析任务描述]",{"domains":41,"last_reviewed":43},[42],"compute","2026-08-18",{"type":45,"children":46},"root",[47,56,62,68,110,115,120,174,180,185,214,219,294,300,378,384,396,588,594,673,679,734,740,753,1053,1065,1070,1075,1180,1185,1222,1227,1257],{"type":48,"tag":49,"props":50,"children":52},"element","h1",{"id":51},"r-analysisr-分析规程",[53],{"type":54,"value":55},"text","r-analysis：R 分析规程",{"type":48,"tag":57,"props":58,"children":60},"h2",{"id":59},"目的",[61],{"type":54,"value":59},{"type":48,"tag":63,"props":64,"children":65},"p",{},[66],{"type":54,"value":67},"R 在统计与生物医学领域不可替代，但 R 工作流有两个经典的复现陷阱：包版本全局漂移（半年前能跑的脚本今天报错）和 RStudio 交互式执行（结果依赖\"先点了哪个单元格\"）。本技能把每一次 R 分析约束为可复现的最小闭环：",{"type":48,"tag":69,"props":70,"children":71},"ol",{},[72,78,92,105],{"type":48,"tag":73,"props":74,"children":75},"li",{},[76],{"type":54,"value":77},"环境可重建：renv 锁文件固定全部包版本；",{"type":48,"tag":73,"props":79,"children":80},{},[81,83,90],{"type":54,"value":82},"执行可重放：脚本化非交互，",{"type":48,"tag":84,"props":85,"children":87},"code",{"className":86},[],[88],{"type":54,"value":89},"Rscript",{"type":54,"value":91}," 一条命令从头跑到尾；",{"type":48,"tag":73,"props":93,"children":94},{},[95,97,103],{"type":54,"value":96},"环境可审计：",{"type":48,"tag":84,"props":98,"children":100},{"className":99},[],[101],{"type":54,"value":102},"sessionInfo()",{"type":54,"value":104}," 输出必进 provenance 记录；",{"type":48,"tag":73,"props":106,"children":107},{},[108],{"type":54,"value":109},"产物可定位：报告走 rmarkdown\u002Fquarto 渲染，统一落盘 output 契约。",{"type":48,"tag":63,"props":111,"children":112},{},[113],{"type":54,"value":114},"本技能与 python-analysis 平行：同一套目录契约、同一套 provenance 集成，差异只在 R 生态的工具链。不涉及远程执行（远程见 remote-compute \u002F hpc-slurm）。",{"type":48,"tag":57,"props":116,"children":118},{"id":117},"前置检查",[119],{"type":54,"value":117},{"type":48,"tag":69,"props":121,"children":122},{},[123,135,156,169],{"type":48,"tag":73,"props":124,"children":125},{},[126,128,133],{"type":54,"value":127},"确认当前目录是工作区根目录（结构约定见 research-workspace）；本技能的产物 skill 名为 ",{"type":48,"tag":84,"props":129,"children":131},{"className":130},[],[132],{"type":54,"value":4},{"type":54,"value":134},"。",{"type":48,"tag":73,"props":136,"children":137},{},[138,140,146,148,154],{"type":54,"value":139},"确认原始数据已在 ",{"type":48,"tag":84,"props":141,"children":143},{"className":142},[],[144],{"type":54,"value":145},"data\u002F",{"type":54,"value":147}," 下且只读；R 里读数据一律用相对路径（",{"type":48,"tag":84,"props":149,"children":151},{"className":150},[],[152],{"type":54,"value":153},"here::here(\"data\", ...)",{"type":54,"value":155}," 或直接相对路径），不写绝对路径。",{"type":48,"tag":73,"props":157,"children":158},{},[159,161,167],{"type":54,"value":160},"检查项目根是否已有 ",{"type":48,"tag":84,"props":162,"children":164},{"className":163},[],[165],{"type":54,"value":166},"renv.lock",{"type":54,"value":168},"：有则用现有环境，不要另起炉灶；没有则按第 1 节初始化。",{"type":48,"tag":73,"props":170,"children":171},{},[172],{"type":54,"value":173},"RStudio 用户注意：本技能要求的交付形态是\"命令行可重放\"，RStudio 里逐行运行可以用于探索，但进入产物的分析必须落成脚本。",{"type":48,"tag":57,"props":175,"children":177},{"id":176},"_1-环境renv-锁定",[178],{"type":54,"value":179},"1 · 环境：renv 锁定",{"type":48,"tag":63,"props":181,"children":182},{},[183],{"type":54,"value":184},"首次建立环境：",{"type":48,"tag":186,"props":187,"children":191},"pre",{"className":188,"code":189,"language":19,"meta":190,"style":190},"language-r shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","install.packages(\"renv\")   # 仅此一个包装进全局库\nrenv::init()               # 生成 renv.lock、renv\u002F 与 .Rprofile\n","",[192],{"type":48,"tag":84,"props":193,"children":194},{"__ignoreMap":190},[195,206],{"type":48,"tag":196,"props":197,"children":200},"span",{"class":198,"line":199},"line",1,[201],{"type":48,"tag":196,"props":202,"children":203},{},[204],{"type":54,"value":205},"install.packages(\"renv\")   # 仅此一个包装进全局库\n",{"type":48,"tag":196,"props":207,"children":208},{"class":198,"line":30},[209],{"type":48,"tag":196,"props":210,"children":211},{},[212],{"type":54,"value":213},"renv::init()               # 生成 renv.lock、renv\u002F 与 .Rprofile\n",{"type":48,"tag":63,"props":215,"children":216},{},[217],{"type":54,"value":218},"日常纪律：",{"type":48,"tag":69,"props":220,"children":221},{},[222,250,263,281],{"type":48,"tag":73,"props":223,"children":224},{},[225,227,233,235,241,243,248],{"type":54,"value":226},"新装包用 ",{"type":48,"tag":84,"props":228,"children":230},{"className":229},[],[231],{"type":54,"value":232},"renv::install(\"包名\")",{"type":54,"value":234},"，装完立即 ",{"type":48,"tag":84,"props":236,"children":238},{"className":237},[],[239],{"type":54,"value":240},"renv::snapshot()",{"type":54,"value":242}," 更新 ",{"type":48,"tag":84,"props":244,"children":246},{"className":245},[],[247],{"type":54,"value":166},{"type":54,"value":249},"；",{"type":48,"tag":73,"props":251,"children":252},{},[253,255,261],{"type":54,"value":254},"换机器或重建环境时 ",{"type":48,"tag":84,"props":256,"children":258},{"className":257},[],[259],{"type":54,"value":260},"renv::restore()",{"type":54,"value":262},"，严格按锁文件还原，不\"顺手升级\"；",{"type":48,"tag":73,"props":264,"children":265},{},[266,271,273,279],{"type":48,"tag":84,"props":267,"children":269},{"className":268},[],[270],{"type":54,"value":166},{"type":54,"value":272}," 是产物的一部分，纳入版本管理与证据胶囊；",{"type":48,"tag":84,"props":274,"children":276},{"className":275},[],[277],{"type":54,"value":278},"renv\u002F",{"type":54,"value":280}," 目录本身不进版本控制（renv 默认 .gitignore 已处理）；",{"type":48,"tag":73,"props":282,"children":283},{},[284,286,292],{"type":54,"value":285},"升级包是有意决策：",{"type":48,"tag":84,"props":287,"children":289},{"className":288},[],[290],{"type":54,"value":291},"renv::update()",{"type":54,"value":293}," 后重跑全部分析并登记新 provenance，不在论文冻结（evidence-capsule）之后升级。",{"type":48,"tag":57,"props":295,"children":297},{"id":296},"_2-随机种子与脚本化执行",[298],{"type":54,"value":299},"2 · 随机种子与脚本化执行",{"type":48,"tag":69,"props":301,"children":302},{},[303,324,345,366],{"type":48,"tag":73,"props":304,"children":305},{},[306,308,314,316,322],{"type":54,"value":307},"脚本开头固定种子：",{"type":48,"tag":84,"props":309,"children":311},{"className":310},[],[312],{"type":54,"value":313},"set.seed(42)",{"type":54,"value":315},"；涉及并行或特定 RNG 时显式指定 ",{"type":48,"tag":84,"props":317,"children":319},{"className":318},[],[320],{"type":54,"value":321},"RNGkind",{"type":54,"value":323}," 并写进注释与 provenance note。",{"type":48,"tag":73,"props":325,"children":326},{},[327,329,335,337,343],{"type":54,"value":328},"交付形态是非交互脚本：",{"type":48,"tag":84,"props":330,"children":332},{"className":331},[],[333],{"type":54,"value":334},"Rscript scripts\u002Fanalyze-xxx.R",{"type":54,"value":336}," 一条命令跑完，无 ",{"type":48,"tag":84,"props":338,"children":340},{"className":339},[],[341],{"type":54,"value":342},"readline()",{"type":54,"value":344},"、无依赖编辑器状态。",{"type":48,"tag":73,"props":346,"children":347},{},[348,350,356,358,364],{"type":54,"value":349},"脚本放 ",{"type":48,"tag":84,"props":351,"children":353},{"className":352},[],[354],{"type":54,"value":355},"scripts\u002F",{"type":54,"value":357},"，kebab-case 命名；参数集中在脚本顶部常量或 ",{"type":48,"tag":84,"props":359,"children":361},{"className":360},[],[362],{"type":54,"value":363},"commandArgs",{"type":54,"value":365}," 解析。",{"type":48,"tag":73,"props":367,"children":368},{},[369,371,377],{"type":54,"value":370},"种子值、R 版本、关键包版本写进 record_run 的 ",{"type":48,"tag":84,"props":372,"children":374},{"className":373},[],[375],{"type":54,"value":376},"--note",{"type":54,"value":134},{"type":48,"tag":57,"props":379,"children":381},{"id":380},"_3-sessioninfo-必记录",[382],{"type":54,"value":383},"3 · sessionInfo() 必记录",{"type":48,"tag":63,"props":385,"children":386},{},[387,389,394],{"type":54,"value":388},"R 的环境指纹是 ",{"type":48,"tag":84,"props":390,"children":392},{"className":391},[],[393],{"type":54,"value":102},{"type":54,"value":395},"，等价于 Python 侧的 env_hash，必须留痕：",{"type":48,"tag":69,"props":397,"children":398},{},[399,436,583],{"type":48,"tag":73,"props":400,"children":401},{},[402,404],{"type":54,"value":403},"每个分析脚本末尾输出会话信息到产物目录：",{"type":48,"tag":186,"props":405,"children":407},{"className":188,"code":406,"language":19,"meta":190,"style":190},"sink(file.path(out_dir, \"session-info.txt\"))\nprint(sessionInfo())\nsink()\n",[408],{"type":48,"tag":84,"props":409,"children":410},{"__ignoreMap":190},[411,419,427],{"type":48,"tag":196,"props":412,"children":413},{"class":198,"line":199},[414],{"type":48,"tag":196,"props":415,"children":416},{},[417],{"type":54,"value":418},"sink(file.path(out_dir, \"session-info.txt\"))\n",{"type":48,"tag":196,"props":420,"children":421},{"class":198,"line":30},[422],{"type":48,"tag":196,"props":423,"children":424},{},[425],{"type":54,"value":426},"print(sessionInfo())\n",{"type":48,"tag":196,"props":428,"children":430},{"class":198,"line":429},3,[431],{"type":48,"tag":196,"props":432,"children":433},{},[434],{"type":54,"value":435},"sink()\n",{"type":48,"tag":73,"props":437,"children":438},{},[439,441],{"type":54,"value":440},"登记 provenance 时把该文件一并作为产物路径，note 中摘要 R 版本与关键包版本：",{"type":48,"tag":186,"props":442,"children":446},{"className":443,"code":444,"language":445,"meta":190,"style":190},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","python \u003C插件包路径>\u002Fskills\u002Fprovenance-record\u002Fscripts\u002Frecord_run.py \\\n  --path output\u002Fr-analysis\u002F\u003Cslug>\u002Flatest\u002F \\\n  --tool \"Rscript scripts\u002Fanalyze-survival.R\" \\\n  --note \"生存分析，seed=42，R 4.4.1，survival 3.7-0，详见 session-info.txt\"\n","bash",[447],{"type":48,"tag":84,"props":448,"children":449},{"__ignoreMap":190},[450,492,533,560],{"type":48,"tag":196,"props":451,"children":452},{"class":198,"line":199},[453,459,465,471,477,482,487],{"type":48,"tag":196,"props":454,"children":456},{"style":455},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[457],{"type":54,"value":458},"python",{"type":48,"tag":196,"props":460,"children":462},{"style":461},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[463],{"type":54,"value":464}," \u003C",{"type":48,"tag":196,"props":466,"children":468},{"style":467},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[469],{"type":54,"value":470},"插件包路",{"type":48,"tag":196,"props":472,"children":474},{"style":473},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[475],{"type":54,"value":476},"径",{"type":48,"tag":196,"props":478,"children":479},{"style":461},[480],{"type":54,"value":481},">",{"type":48,"tag":196,"props":483,"children":484},{"style":467},[485],{"type":54,"value":486},"\u002Fskills\u002Fprovenance-record\u002Fscripts\u002Frecord_run.py",{"type":48,"tag":196,"props":488,"children":489},{"style":473},[490],{"type":54,"value":491}," \\\n",{"type":48,"tag":196,"props":493,"children":494},{"class":198,"line":30},[495,500,505,510,515,520,524,529],{"type":48,"tag":196,"props":496,"children":497},{"style":467},[498],{"type":54,"value":499},"  --path",{"type":48,"tag":196,"props":501,"children":502},{"style":467},[503],{"type":54,"value":504}," output\u002Fr-analysis\u002F",{"type":48,"tag":196,"props":506,"children":507},{"style":461},[508],{"type":54,"value":509},"\u003C",{"type":48,"tag":196,"props":511,"children":512},{"style":467},[513],{"type":54,"value":514},"slu",{"type":48,"tag":196,"props":516,"children":517},{"style":473},[518],{"type":54,"value":519},"g",{"type":48,"tag":196,"props":521,"children":522},{"style":461},[523],{"type":54,"value":481},{"type":48,"tag":196,"props":525,"children":526},{"style":467},[527],{"type":54,"value":528},"\u002Flatest\u002F",{"type":48,"tag":196,"props":530,"children":531},{"style":473},[532],{"type":54,"value":491},{"type":48,"tag":196,"props":534,"children":535},{"class":198,"line":429},[536,541,546,551,556],{"type":48,"tag":196,"props":537,"children":538},{"style":467},[539],{"type":54,"value":540},"  --tool",{"type":48,"tag":196,"props":542,"children":543},{"style":461},[544],{"type":54,"value":545}," \"",{"type":48,"tag":196,"props":547,"children":548},{"style":467},[549],{"type":54,"value":550},"Rscript scripts\u002Fanalyze-survival.R",{"type":48,"tag":196,"props":552,"children":553},{"style":461},[554],{"type":54,"value":555},"\"",{"type":48,"tag":196,"props":557,"children":558},{"style":473},[559],{"type":54,"value":491},{"type":48,"tag":196,"props":561,"children":563},{"class":198,"line":562},4,[564,569,573,578],{"type":48,"tag":196,"props":565,"children":566},{"style":467},[567],{"type":54,"value":568},"  --note",{"type":48,"tag":196,"props":570,"children":571},{"style":461},[572],{"type":54,"value":545},{"type":48,"tag":196,"props":574,"children":575},{"style":467},[576],{"type":54,"value":577},"生存分析，seed=42，R 4.4.1，survival 3.7-0，详见 session-info.txt",{"type":48,"tag":196,"props":579,"children":580},{"style":461},[581],{"type":54,"value":582},"\"\n",{"type":48,"tag":73,"props":584,"children":585},{},[586],{"type":54,"value":587},"远程 R 任务同样抓回 session-info.txt 再登记（见 provenance-record 的远程一节）。",{"type":48,"tag":57,"props":589,"children":591},{"id":590},"_4-数据与产物",[592],{"type":54,"value":593},"4 · 数据与产物",{"type":48,"tag":69,"props":595,"children":596},{},[597,625,640,668],{"type":48,"tag":73,"props":598,"children":599},{},[600,602,607,609,615,617,623],{"type":54,"value":601},"原始数据只读：从 ",{"type":48,"tag":84,"props":603,"children":605},{"className":604},[],[606],{"type":54,"value":145},{"type":54,"value":608}," 读，永不写回；清洗产物另存（中间产物进 ",{"type":48,"tag":84,"props":610,"children":612},{"className":611},[],[613],{"type":54,"value":614},"output\u002Fr-analysis\u002F\u003Cslug>\u002F\u003Ctimestamp>\u002F",{"type":54,"value":616},"，复用数据集进 ",{"type":48,"tag":84,"props":618,"children":620},{"className":619},[],[621],{"type":54,"value":622},"derived\u002F",{"type":54,"value":624},"），纠错走增补（research-workspace 只读原则）。",{"type":48,"tag":73,"props":626,"children":627},{},[628,630],{"type":54,"value":629},"落盘契约与其他分析 skill 一致：",{"type":48,"tag":186,"props":631,"children":635},{"className":632,"code":634,"language":54,"meta":190},[633],"language-text","output\u002Fr-analysis\u002F\u003Cslug>\u002F\u003Ctimestamp>\u002F   # 本次运行全部产物\noutput\u002Fr-analysis\u002F\u003Cslug>\u002Flatest\u002F        # 运行结束后的完整副本\n",[636],{"type":48,"tag":84,"props":637,"children":638},{"__ignoreMap":190},[639],{"type":54,"value":634},{"type":48,"tag":73,"props":641,"children":642},{},[643,645],{"type":54,"value":644},"图表双格式 300 dpi（与 python-analysis 相同约定）：",{"type":48,"tag":186,"props":646,"children":648},{"className":188,"code":647,"language":19,"meta":190,"style":190},"ggsave(file.path(out_dir, \"km-curve.png\"), p, dpi = 300, width = 6, height = 4)\nggsave(file.path(out_dir, \"km-curve.pdf\"), p, width = 6, height = 4)\n",[649],{"type":48,"tag":84,"props":650,"children":651},{"__ignoreMap":190},[652,660],{"type":48,"tag":196,"props":653,"children":654},{"class":198,"line":199},[655],{"type":48,"tag":196,"props":656,"children":657},{},[658],{"type":54,"value":659},"ggsave(file.path(out_dir, \"km-curve.png\"), p, dpi = 300, width = 6, height = 4)\n",{"type":48,"tag":196,"props":661,"children":662},{"class":198,"line":30},[663],{"type":48,"tag":196,"props":664,"children":665},{},[666],{"type":54,"value":667},"ggsave(file.path(out_dir, \"km-curve.pdf\"), p, width = 6, height = 4)\n",{"type":48,"tag":73,"props":669,"children":670},{},[671],{"type":54,"value":672},"统计结果（系数表、检验结果）同时落机器可读文件（CSV），报告数字须能指回该文件。",{"type":48,"tag":57,"props":674,"children":676},{"id":675},"_5-报告rmarkdown-quarto",[677],{"type":54,"value":678},"5 · 报告：rmarkdown \u002F quarto",{"type":48,"tag":69,"props":680,"children":681},{},[682,687,708,721],{"type":48,"tag":73,"props":683,"children":684},{},[685],{"type":54,"value":686},"给人看的报告用 rmarkdown（.Rmd）或 quarto（.qmd）撰写，渲染产物（HTML\u002FPDF\u002FDOCX）放进同一次运行的时间戳目录。",{"type":48,"tag":73,"props":688,"children":689},{},[690,692,698,700,706],{"type":54,"value":691},"报告中的数字尽量由代码内联生成（",{"type":48,"tag":84,"props":693,"children":695},{"className":694},[],[696],{"type":54,"value":697},"`r knitr::inline_expr(...)`",{"type":54,"value":699}," \u002F quarto 的 ",{"type":48,"tag":84,"props":701,"children":703},{"className":702},[],[704],{"type":54,"value":705},"{r}",{"type":54,"value":707}," 行内表达式），减少手抄数字；必须手抄时，对照产物 CSV 逐个核对。",{"type":48,"tag":73,"props":709,"children":710},{},[711,713,719],{"type":54,"value":712},"渲染命令同样脚本化（如 ",{"type":48,"tag":84,"props":714,"children":716},{"className":715},[],[717],{"type":54,"value":718},"Rscript -e \"quarto::quarto_render('reports\u002Fxxx.qmd')\"",{"type":54,"value":720},"），不用 RStudio 的 Knit 按钮作为唯一渲染途径。",{"type":48,"tag":73,"props":722,"children":723},{},[724,726,732],{"type":54,"value":725},"报告交付前可复用 python-analysis 的 ",{"type":48,"tag":84,"props":727,"children":729},{"className":728},[],[730],{"type":54,"value":731},"stats_integrity_check.py",{"type":54,"value":733}," 做数字体检（百分比、p 值、样本量、CI 的确定性检查），error 清零方可交付。",{"type":48,"tag":57,"props":735,"children":737},{"id":736},"_6-完整示例",[738],{"type":54,"value":739},"6 · 完整示例",{"type":48,"tag":63,"props":741,"children":742},{},[743,745,751],{"type":54,"value":744},"一次 analysis 阶段的 R 分析闭环（虚构示例，slug 为 ",{"type":48,"tag":84,"props":746,"children":748},{"className":747},[],[749],{"type":54,"value":750},"3f9a1c7e",{"type":54,"value":752},"）：",{"type":48,"tag":186,"props":754,"children":756},{"className":443,"code":755,"language":445,"meta":190,"style":190},"# 1. 环境（首次）：R 内执行 renv::init()，之后每次分析前 renv::restore()\n# 2. 跑分析脚本（非交互，一条命令）\nRscript scripts\u002Fanalyze-survival.R\n#    脚本内部：set.seed(42)；读 data\u002F2026-08-cohort\u002F；\n#    产物写 output\u002Fr-analysis\u002F3f9a1c7e\u002F20260819-153000\u002F（含 session-info.txt）\n\n# 3. 渲染报告（同样脚本化）\nRscript -e \"quarto::quarto_render('reports\u002Fsurvival-2026-08.qmd')\"\n\n# 4. 刷新 latest（先清空再放副本），然后登记 provenance\npython \u003C插件包路径>\u002Fskills\u002Fprovenance-record\u002Fscripts\u002Frecord_run.py \\\n  --path output\u002Fr-analysis\u002F3f9a1c7e\u002Flatest\u002F \\\n  --tool \"Rscript scripts\u002Fanalyze-survival.R\" \\\n  --session cli-2026-08-19-01 \\\n  --note \"KM + Cox 分析，seed=42，R 4.4.1，survival 3.7-0，详见 session-info.txt\"\n\n# 5. 报告数字体检\npython \u003C插件路径>\u002Fskills\u002Fpython-analysis\u002Fscripts\u002Fstats_integrity_check.py \\\n  --path reports\u002Fsurvival-2026-08.md --format json\n",[757],{"type":48,"tag":84,"props":758,"children":759},{"__ignoreMap":190},[760,769,777,789,797,805,815,824,850,858,867,899,916,940,958,979,987,996,1030],{"type":48,"tag":196,"props":761,"children":762},{"class":198,"line":199},[763],{"type":48,"tag":196,"props":764,"children":766},{"style":765},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic",[767],{"type":54,"value":768},"# 1. 环境（首次）：R 内执行 renv::init()，之后每次分析前 renv::restore()\n",{"type":48,"tag":196,"props":770,"children":771},{"class":198,"line":30},[772],{"type":48,"tag":196,"props":773,"children":774},{"style":765},[775],{"type":54,"value":776},"# 2. 跑分析脚本（非交互，一条命令）\n",{"type":48,"tag":196,"props":778,"children":779},{"class":198,"line":429},[780,784],{"type":48,"tag":196,"props":781,"children":782},{"style":455},[783],{"type":54,"value":89},{"type":48,"tag":196,"props":785,"children":786},{"style":467},[787],{"type":54,"value":788}," scripts\u002Fanalyze-survival.R\n",{"type":48,"tag":196,"props":790,"children":791},{"class":198,"line":562},[792],{"type":48,"tag":196,"props":793,"children":794},{"style":765},[795],{"type":54,"value":796},"#    脚本内部：set.seed(42)；读 data\u002F2026-08-cohort\u002F；\n",{"type":48,"tag":196,"props":798,"children":799},{"class":198,"line":26},[800],{"type":48,"tag":196,"props":801,"children":802},{"style":765},[803],{"type":54,"value":804},"#    产物写 output\u002Fr-analysis\u002F3f9a1c7e\u002F20260819-153000\u002F（含 session-info.txt）\n",{"type":48,"tag":196,"props":806,"children":808},{"class":198,"line":807},6,[809],{"type":48,"tag":196,"props":810,"children":812},{"emptyLinePlaceholder":811},true,[813],{"type":54,"value":814},"\n",{"type":48,"tag":196,"props":816,"children":818},{"class":198,"line":817},7,[819],{"type":48,"tag":196,"props":820,"children":821},{"style":765},[822],{"type":54,"value":823},"# 3. 渲染报告（同样脚本化）\n",{"type":48,"tag":196,"props":825,"children":827},{"class":198,"line":826},8,[828,832,837,841,846],{"type":48,"tag":196,"props":829,"children":830},{"style":455},[831],{"type":54,"value":89},{"type":48,"tag":196,"props":833,"children":834},{"style":467},[835],{"type":54,"value":836}," -e",{"type":48,"tag":196,"props":838,"children":839},{"style":461},[840],{"type":54,"value":545},{"type":48,"tag":196,"props":842,"children":843},{"style":467},[844],{"type":54,"value":845},"quarto::quarto_render('reports\u002Fsurvival-2026-08.qmd')",{"type":48,"tag":196,"props":847,"children":848},{"style":461},[849],{"type":54,"value":582},{"type":48,"tag":196,"props":851,"children":853},{"class":198,"line":852},9,[854],{"type":48,"tag":196,"props":855,"children":856},{"emptyLinePlaceholder":811},[857],{"type":54,"value":814},{"type":48,"tag":196,"props":859,"children":861},{"class":198,"line":860},10,[862],{"type":48,"tag":196,"props":863,"children":864},{"style":765},[865],{"type":54,"value":866},"# 4. 刷新 latest（先清空再放副本），然后登记 provenance\n",{"type":48,"tag":196,"props":868,"children":870},{"class":198,"line":869},11,[871,875,879,883,887,891,895],{"type":48,"tag":196,"props":872,"children":873},{"style":455},[874],{"type":54,"value":458},{"type":48,"tag":196,"props":876,"children":877},{"style":461},[878],{"type":54,"value":464},{"type":48,"tag":196,"props":880,"children":881},{"style":467},[882],{"type":54,"value":470},{"type":48,"tag":196,"props":884,"children":885},{"style":473},[886],{"type":54,"value":476},{"type":48,"tag":196,"props":888,"children":889},{"style":461},[890],{"type":54,"value":481},{"type":48,"tag":196,"props":892,"children":893},{"style":467},[894],{"type":54,"value":486},{"type":48,"tag":196,"props":896,"children":897},{"style":473},[898],{"type":54,"value":491},{"type":48,"tag":196,"props":900,"children":902},{"class":198,"line":901},12,[903,907,912],{"type":48,"tag":196,"props":904,"children":905},{"style":467},[906],{"type":54,"value":499},{"type":48,"tag":196,"props":908,"children":909},{"style":467},[910],{"type":54,"value":911}," output\u002Fr-analysis\u002F3f9a1c7e\u002Flatest\u002F",{"type":48,"tag":196,"props":913,"children":914},{"style":473},[915],{"type":54,"value":491},{"type":48,"tag":196,"props":917,"children":919},{"class":198,"line":918},13,[920,924,928,932,936],{"type":48,"tag":196,"props":921,"children":922},{"style":467},[923],{"type":54,"value":540},{"type":48,"tag":196,"props":925,"children":926},{"style":461},[927],{"type":54,"value":545},{"type":48,"tag":196,"props":929,"children":930},{"style":467},[931],{"type":54,"value":550},{"type":48,"tag":196,"props":933,"children":934},{"style":461},[935],{"type":54,"value":555},{"type":48,"tag":196,"props":937,"children":938},{"style":473},[939],{"type":54,"value":491},{"type":48,"tag":196,"props":941,"children":943},{"class":198,"line":942},14,[944,949,954],{"type":48,"tag":196,"props":945,"children":946},{"style":467},[947],{"type":54,"value":948},"  --session",{"type":48,"tag":196,"props":950,"children":951},{"style":467},[952],{"type":54,"value":953}," cli-2026-08-19-01",{"type":48,"tag":196,"props":955,"children":956},{"style":473},[957],{"type":54,"value":491},{"type":48,"tag":196,"props":959,"children":961},{"class":198,"line":960},15,[962,966,970,975],{"type":48,"tag":196,"props":963,"children":964},{"style":467},[965],{"type":54,"value":568},{"type":48,"tag":196,"props":967,"children":968},{"style":461},[969],{"type":54,"value":545},{"type":48,"tag":196,"props":971,"children":972},{"style":467},[973],{"type":54,"value":974},"KM + Cox 分析，seed=42，R 4.4.1，survival 3.7-0，详见 session-info.txt",{"type":48,"tag":196,"props":976,"children":977},{"style":461},[978],{"type":54,"value":582},{"type":48,"tag":196,"props":980,"children":982},{"class":198,"line":981},16,[983],{"type":48,"tag":196,"props":984,"children":985},{"emptyLinePlaceholder":811},[986],{"type":54,"value":814},{"type":48,"tag":196,"props":988,"children":990},{"class":198,"line":989},17,[991],{"type":48,"tag":196,"props":992,"children":993},{"style":765},[994],{"type":54,"value":995},"# 5. 报告数字体检\n",{"type":48,"tag":196,"props":997,"children":999},{"class":198,"line":998},18,[1000,1004,1008,1013,1017,1021,1026],{"type":48,"tag":196,"props":1001,"children":1002},{"style":455},[1003],{"type":54,"value":458},{"type":48,"tag":196,"props":1005,"children":1006},{"style":461},[1007],{"type":54,"value":464},{"type":48,"tag":196,"props":1009,"children":1010},{"style":467},[1011],{"type":54,"value":1012},"插件路",{"type":48,"tag":196,"props":1014,"children":1015},{"style":473},[1016],{"type":54,"value":476},{"type":48,"tag":196,"props":1018,"children":1019},{"style":461},[1020],{"type":54,"value":481},{"type":48,"tag":196,"props":1022,"children":1023},{"style":467},[1024],{"type":54,"value":1025},"\u002Fskills\u002Fpython-analysis\u002Fscripts\u002Fstats_integrity_check.py",{"type":48,"tag":196,"props":1027,"children":1028},{"style":473},[1029],{"type":54,"value":491},{"type":48,"tag":196,"props":1031,"children":1033},{"class":198,"line":1032},19,[1034,1038,1043,1048],{"type":48,"tag":196,"props":1035,"children":1036},{"style":467},[1037],{"type":54,"value":499},{"type":48,"tag":196,"props":1039,"children":1040},{"style":467},[1041],{"type":54,"value":1042}," reports\u002Fsurvival-2026-08.md",{"type":48,"tag":196,"props":1044,"children":1045},{"style":467},[1046],{"type":54,"value":1047}," --format",{"type":48,"tag":196,"props":1049,"children":1050},{"style":467},[1051],{"type":54,"value":1052}," json\n",{"type":48,"tag":63,"props":1054,"children":1055},{},[1056,1058,1063],{"type":54,"value":1057},"每一步都可单独重跑：环境坏了重 ",{"type":48,"tag":84,"props":1059,"children":1061},{"className":1060},[],[1062],{"type":54,"value":260},{"type":54,"value":1064},"，结果存疑重跑第 2 步（同种子应得同结果），报告改版只重跑第 3 步。这条链路上任何一环不可重放，都说明前面的规程有缺口，先补规程再继续。",{"type":48,"tag":57,"props":1066,"children":1068},{"id":1067},"输出模板",[1069],{"type":54,"value":1067},{"type":48,"tag":63,"props":1071,"children":1072},{},[1073],{"type":54,"value":1074},"分析完成后的汇报：",{"type":48,"tag":186,"props":1076,"children":1080},{"className":1077,"code":1078,"language":1079,"meta":190,"style":190},"language-markdown shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","## R 分析完成（\u003C任务名>）\n\n- 环境：renv（renv.lock 已 snapshot），R \u003C版本>\n- 种子：set.seed(\u003CN>)（已登记）\n- 产物：output\u002Fr-analysis\u002F\u003Cslug>\u002Flatest\u002F（清单：…；含 session-info.txt）\n- 报告：\u003C渲染产物路径>\n- provenance：已登记（note：…）\n\n下一步：…\n","markdown",[1081],{"type":48,"tag":84,"props":1082,"children":1083},{"__ignoreMap":190},[1084,1097,1104,1117,1129,1141,1153,1165,1172],{"type":48,"tag":196,"props":1085,"children":1086},{"class":198,"line":199},[1087,1092],{"type":48,"tag":196,"props":1088,"children":1089},{"style":461},[1090],{"type":54,"value":1091},"## ",{"type":48,"tag":196,"props":1093,"children":1094},{"style":455},[1095],{"type":54,"value":1096},"R 分析完成（\u003C任务名>）\n",{"type":48,"tag":196,"props":1098,"children":1099},{"class":198,"line":30},[1100],{"type":48,"tag":196,"props":1101,"children":1102},{"emptyLinePlaceholder":811},[1103],{"type":54,"value":814},{"type":48,"tag":196,"props":1105,"children":1106},{"class":198,"line":429},[1107,1112],{"type":48,"tag":196,"props":1108,"children":1109},{"style":461},[1110],{"type":54,"value":1111},"-",{"type":48,"tag":196,"props":1113,"children":1114},{"style":473},[1115],{"type":54,"value":1116}," 环境：renv（renv.lock 已 snapshot），R \u003C版本>\n",{"type":48,"tag":196,"props":1118,"children":1119},{"class":198,"line":562},[1120,1124],{"type":48,"tag":196,"props":1121,"children":1122},{"style":461},[1123],{"type":54,"value":1111},{"type":48,"tag":196,"props":1125,"children":1126},{"style":473},[1127],{"type":54,"value":1128}," 种子：set.seed(\u003CN>)（已登记）\n",{"type":48,"tag":196,"props":1130,"children":1131},{"class":198,"line":26},[1132,1136],{"type":48,"tag":196,"props":1133,"children":1134},{"style":461},[1135],{"type":54,"value":1111},{"type":48,"tag":196,"props":1137,"children":1138},{"style":473},[1139],{"type":54,"value":1140}," 产物：output\u002Fr-analysis\u002F\u003Cslug>\u002Flatest\u002F（清单：…；含 session-info.txt）\n",{"type":48,"tag":196,"props":1142,"children":1143},{"class":198,"line":807},[1144,1148],{"type":48,"tag":196,"props":1145,"children":1146},{"style":461},[1147],{"type":54,"value":1111},{"type":48,"tag":196,"props":1149,"children":1150},{"style":473},[1151],{"type":54,"value":1152}," 报告：\u003C渲染产物路径>\n",{"type":48,"tag":196,"props":1154,"children":1155},{"class":198,"line":817},[1156,1160],{"type":48,"tag":196,"props":1157,"children":1158},{"style":461},[1159],{"type":54,"value":1111},{"type":48,"tag":196,"props":1161,"children":1162},{"style":473},[1163],{"type":54,"value":1164}," provenance：已登记（note：…）\n",{"type":48,"tag":196,"props":1166,"children":1167},{"class":198,"line":826},[1168],{"type":48,"tag":196,"props":1169,"children":1170},{"emptyLinePlaceholder":811},[1171],{"type":54,"value":814},{"type":48,"tag":196,"props":1173,"children":1174},{"class":198,"line":852},[1175],{"type":48,"tag":196,"props":1176,"children":1177},{"style":473},[1178],{"type":54,"value":1179},"下一步：…\n",{"type":48,"tag":57,"props":1181,"children":1183},{"id":1182},"本技能不做什么",[1184],{"type":54,"value":1182},{"type":48,"tag":1186,"props":1187,"children":1188},"ul",{},[1189,1202,1207,1212,1217],{"type":48,"tag":73,"props":1190,"children":1191},{},[1192,1194,1200],{"type":54,"value":1193},"不替用户选统计模型与检验方法：模型适用性是领域判断，必要时标注 ",{"type":48,"tag":84,"props":1195,"children":1197},{"className":1196},[],[1198],{"type":54,"value":1199},"[模型知识—待核实]",{"type":54,"value":1201}," 并请用户确认。",{"type":48,"tag":73,"props":1203,"children":1204},{},[1205],{"type":54,"value":1206},"不管理全局 R 安装：安装 R 本身、Rtools、系统库依赖向用户说明后由用户执行。",{"type":48,"tag":73,"props":1208,"children":1209},{},[1210],{"type":54,"value":1211},"不动原始数据：清洗纠错一律生成新文件（research-workspace 只读原则）。",{"type":48,"tag":73,"props":1213,"children":1214},{},[1215],{"type":54,"value":1216},"不覆盖 Python 生态：Python 分析走 python-analysis；混合项目两边产物分目录登记，互不混用 skill 名。",{"type":48,"tag":73,"props":1218,"children":1219},{},[1220],{"type":54,"value":1221},"不做远程提交：集群上的 R 作业按 hpc-slurm 规程封装，本技能只管本地规程。",{"type":48,"tag":57,"props":1223,"children":1225},{"id":1224},"收尾与下一步",[1226],{"type":54,"value":1224},{"type":48,"tag":1186,"props":1228,"children":1229},{},[1230,1235,1240,1245],{"type":48,"tag":73,"props":1231,"children":1232},{},[1233],{"type":54,"value":1234},"交付前清单：latest\u002F 已刷新、session-info.txt 在产物内、provenance 已登记、数字体检 error 清零。",{"type":48,"tag":73,"props":1236,"children":1237},{},[1238],{"type":54,"value":1239},"结论支撑论文论断时进入 evidence-capsule 冻结（renv.lock + session-info.txt 一并打包）。",{"type":48,"tag":73,"props":1241,"children":1242},{},[1243],{"type":54,"value":1244},"报告按 reviewer-protocol 接受发布前审查；error 级意见清零后交付。",{"type":48,"tag":73,"props":1246,"children":1247},{},[1248,1250,1255],{"type":54,"value":1249},"任务运行时间长时改用 run-monitor 后台执行（",{"type":48,"tag":84,"props":1251,"children":1253},{"className":1252},[],[1254],{"type":54,"value":89},{"type":54,"value":1256}," 同样适用），会话不空等。",{"type":48,"tag":1258,"props":1259,"children":1260},"style",{},[1261],{"type":54,"value":1262},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"items":1264,"total":1365},[1265,1281,1298,1310,1324,1339,1353],{"slug":1266,"name":1266,"fn":1267,"description":1268,"org":1269,"tags":1270,"stars":26,"repoUrl":27,"updatedAt":1280},"article2tasks","convert articles into Dida365 tasks","将技术周报（批量）或单篇文章整理为滴答清单待办事项，自动分类到已有清单并打标签，全程通过 MCP 写入，跨平台无需任何本地脚本。当用户提供周报内容、文章链接，或提及「周报」「文章汇总」「添加到滴答」时，使用此技能。",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1271,1274,1277],{"name":1272,"slug":1273,"type":16},"Content Creation","content-creation",{"name":1275,"slug":1276,"type":16},"MCP","mcp",{"name":1278,"slug":1279,"type":16},"Task Management","task-management","2026-08-18T03:49:38.751656",{"slug":1282,"name":1282,"fn":1283,"description":1284,"org":1285,"tags":1286,"stars":26,"repoUrl":27,"updatedAt":1297},"citation-verify","verify academic citation accuracy","当用户需要核验参考文献真实性、检查 BibTeX 条目是否有误、审查论文引用是否可靠、 排查 bibliography 中的错误条目、验证 DOI 与题录是否对得上、发现参考文献张冠李戴、 做投稿前引用体检或审稿引用抽查时使用。同义场景：参考文献核验、引用核查、 文献真伪鉴别、bib 文件检查、参考文献纠错、引用元数据比对、 \"帮我看看这些参考文献有没有问题\"\"这个 DOI 对得上吗\"\"有没有编造的引用\"。",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1287,1290,1293,1296],{"name":1288,"slug":1289,"type":16},"Code Analysis","code-analysis",{"name":1291,"slug":1292,"type":16},"Documentation","documentation",{"name":1294,"slug":1295,"type":16},"QA","qa",{"name":14,"slug":15,"type":16},"2026-08-21T03:59:17.615117",{"slug":1299,"name":1299,"fn":1300,"description":1301,"org":1302,"tags":1303,"stars":26,"repoUrl":27,"updatedAt":1309},"claim-check","verify research claims against evidence","当需要检查论文草稿中的事实性论断是否有证据支撑、做引用-论断对齐审计、 找出没有出处的陈述、核对文内引用是否真能支撑所在句子时加载使用； 通常由 evidence-loop 或审稿类流程调用，不直接面向用户。同义场景： 论断支撑检查、claim 支撑审计、无支撑断言排查、证据覆盖检查、 引用与论断对齐、\"这段话有没有文献撑\"\"哪些说法没有引用\"。",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1304,1307,1308],{"name":1305,"slug":1306,"type":16},"Audit","audit",{"name":1288,"slug":1289,"type":16},{"name":14,"slug":15,"type":16},"2026-08-21T03:59:02.154691",{"slug":1311,"name":1311,"fn":1312,"description":1313,"org":1314,"tags":1315,"stars":26,"repoUrl":27,"updatedAt":1323},"cn-literature","search and organize Chinese academic literature","当用户需要检索或整理中文文献（CNKI 知网、万方、维普、超星）、把中文数据库 导出的题录文件解析成统一 PaperDocument、或把中文文献与英文检索结果合并去重 时使用。同义场景：中文文献检索、知网导出题录解析、万方检索、Refworks\u002FEndNote 格式转换、\"帮我把这份 CNKI 导出的 txt 整理成文献表\"\"中文核心期刊上关于 X 有哪些研究\"。",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1316,1319,1322],{"name":1317,"slug":1318,"type":16},"Data Cleaning","data-cleaning",{"name":1320,"slug":1321,"type":16},"Documents","documents",{"name":14,"slug":15,"type":16},"2026-08-21T03:59:12.24404",{"slug":1325,"name":1325,"fn":1326,"description":1327,"org":1328,"tags":1329,"stars":26,"repoUrl":27,"updatedAt":1338},"cold-start-interview","initialize research profiles via interviews","当用户首次使用科研工作台、研究画像仍为空白，或用户主动说\"先做个访谈\"\"重新设置我的研究信息\"\"初始化画像\"\"cold start\"\"重新 interview\"时使用。本技能通过结构化访谈收集用户的研究领域、常用数据源、算力环境、写作语言与目标期刊、引用格式、团队协作规范、伦理合规要求，并把回答以散文形式写回插件根目录 CLAUDE.md 的研究画像部分。支持 quick（2 分钟 5 问）、full（完整 15 问）、--redo（推翻重谈）、--check（只检查画像完整度不提问）四种模式，支持中断后续谈。同义触发场景：新用户引导、首次配置、研究背景调查、填研究档案、更新个人研究信息、check 画像。",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1330,1331,1334,1337],{"name":1291,"slug":1292,"type":16},{"name":1332,"slug":1333,"type":16},"Onboarding","onboarding",{"name":1335,"slug":1336,"type":16},"Productivity","productivity",{"name":14,"slug":15,"type":16},"2026-08-21T03:59:58.579998",{"slug":1340,"name":1340,"fn":1341,"description":1342,"org":1343,"tags":1344,"stars":26,"repoUrl":27,"updatedAt":1352},"customize","customize research guardrails and settings","当用户想修改研究画像或共享守则（guardrails）时使用：换了研究领域、换了目标期刊、换了引用格式、换了算力环境、合规要求变化、想调整某条 guardrail 的严格程度。同义触发场景：改一下画像、更新我的研究信息、修改 CLAUDE.md、调整设置、换引用格式、customize、个性化配置、改规则、重新配置工作台。本技能是画像与守则的唯一维护入口：读取 CLAUDE.md、与用户逐项确认修改点、写回文件、并明确告知哪些 skill 的行为会因此变化。",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1345,1348,1351],{"name":1346,"slug":1347,"type":16},"Best Practices","best-practices",{"name":1349,"slug":1350,"type":16},"Configuration","configuration",{"name":14,"slug":15,"type":16},"2026-08-21T03:59:35.867596",{"slug":1354,"name":1354,"fn":1355,"description":1356,"org":1357,"tags":1358,"stars":26,"repoUrl":27,"updatedAt":1364},"dida365","manage Dida365 tasks and habits","Manage 滴答清单 (Dida365 China) tasks, lists, habits, focus records and countdowns through the official Dida365 MCP server at mcp.dida365.com. Use when the user asks to check, plan, create, update, complete or review tasks and habits on dida365.com, or asks about focus history and countdowns.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1359,1360,1363],{"name":1275,"slug":1276,"type":16},{"name":1361,"slug":1362,"type":16},"Scheduling","scheduling",{"name":1278,"slug":1279,"type":16},"2026-08-18T03:49:37.126385",36,{"items":1367,"total":1566},[1368,1392,1408,1427,1442,1462,1480,1498,1513,1529,1546,1556],{"slug":1369,"name":1369,"fn":1370,"description":1371,"org":1372,"tags":1373,"stars":1389,"repoUrl":1390,"updatedAt":1391},"android-native-dev","develop Android native applications","Android native application development and UI design guide. Covers Material Design 3, Kotlin\u002FCompose development, project configuration, accessibility, and build troubleshooting. Read this before Android native application development.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1374,1377,1380,1383,1386],{"name":1375,"slug":1376,"type":16},"Accessibility","accessibility",{"name":1378,"slug":1379,"type":16},"Android","android",{"name":1381,"slug":1382,"type":16},"Kotlin","kotlin",{"name":1384,"slug":1385,"type":16},"Mobile","mobile",{"name":1387,"slug":1388,"type":16},"UI Components","ui-components",13030,"https:\u002F\u002Fgithub.com\u002FMiniMax-AI\u002Fskills","2026-07-13T06:16:54.247834",{"slug":1393,"name":1393,"fn":1394,"description":1395,"org":1396,"tags":1397,"stars":1389,"repoUrl":1390,"updatedAt":1407},"buddy-sings","generate singing performances for AI companions","Use when user wants their Claude Code pet (\u002Fbuddy) to sing a song. Triggers on any request that combines the concept of their Claude Code buddy, pet, or companion with singing or music. Supports multilingual triggers — match equivalent phrases in any language.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1398,1401,1404],{"name":1399,"slug":1400,"type":16},"Agents","agents",{"name":1402,"slug":1403,"type":16},"Audio","audio",{"name":1405,"slug":1406,"type":16},"Creative","creative","2026-07-13T06:16:35.130644",{"slug":1409,"name":1409,"fn":1410,"description":1411,"org":1412,"tags":1413,"stars":1389,"repoUrl":1390,"updatedAt":1426},"color-font-skill","select color palettes and font pairings","Choose presentation-ready color palettes and font pairings for PPT\u002Fdesign tasks. Use when users ask for visual theme choices, brand-safe palettes, or font recommendations. Triggers include: 配色, 色板, 字体, color palette, font, PPT配色, 字体搭配.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1414,1417,1420,1423],{"name":1415,"slug":1416,"type":16},"Design","design",{"name":1418,"slug":1419,"type":16},"Presentations","presentations",{"name":1421,"slug":1422,"type":16},"Themes","themes",{"name":1424,"slug":1425,"type":16},"Typography","typography","2026-07-13T06:17:02.785587",{"slug":1428,"name":1428,"fn":1429,"description":1430,"org":1431,"tags":1432,"stars":1389,"repoUrl":1390,"updatedAt":1441},"design-style-skill","select visual design systems for presentations","Select a consistent visual design system for PPT slides using radius\u002Fspacing style recipes. Use when users ask for overall style direction or component styling consistency. Includes Sharp\u002FSoft\u002FRounded\u002FPill recipes, component mappings, typography\u002Fspacing rules, and mixing guidance. Triggers: 风格, style, radius, spacing, 圆角, 间距, PPT风格, 视觉风格, design style, component style.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1433,1434,1437,1440],{"name":1415,"slug":1416,"type":16},{"name":1435,"slug":1436,"type":16},"Design System","design-system",{"name":1438,"slug":1439,"type":16},"PowerPoint","powerpoint",{"name":1418,"slug":1419,"type":16},"2026-07-13T06:17:10.398389",{"slug":1443,"name":1443,"fn":1444,"description":1445,"org":1446,"tags":1447,"stars":1389,"repoUrl":1390,"updatedAt":1461},"flutter-dev","build cross-platform apps with Flutter","Flutter cross-platform development guide covering widget patterns, Riverpod\u002FBloc state management, GoRouter navigation, performance optimization, and platform-specific implementations. Includes const optimization, responsive layouts, testing strategies, and DevTools profiling.\nUse when: building Flutter apps, implementing state management (Riverpod\u002FBloc), setting up GoRouter navigation, creating custom widgets, optimizing performance, writing widget tests, cross-platform development.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1448,1451,1454,1455,1458],{"name":1449,"slug":1450,"type":16},"Dart","dart",{"name":1452,"slug":1453,"type":16},"Flutter","flutter",{"name":1384,"slug":1385,"type":16},{"name":1456,"slug":1457,"type":16},"Performance","performance",{"name":1459,"slug":1460,"type":16},"State Management","state-management","2026-07-13T06:16:36.626679",{"slug":1463,"name":1463,"fn":1464,"description":1465,"org":1466,"tags":1467,"stars":1389,"repoUrl":1390,"updatedAt":1479},"frontend-dev","build visually striking frontend web pages","Full-stack frontend development combining premium UI design, cinematic animations,\nAI-generated media assets, persuasive copywriting, and visual art. Builds complete,\nvisually striking web pages with real media, advanced motion, and compelling copy.\nUse when: building landing pages, marketing sites, product pages, dashboards,\ngenerating media assets (image\u002Fvideo\u002Faudio\u002Fmusic), writing conversion copy,\ncreating generative art, or implementing cinematic scroll animations.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1468,1471,1472,1473,1476],{"name":1469,"slug":1470,"type":16},"Animation","animation",{"name":1405,"slug":1406,"type":16},{"name":1415,"slug":1416,"type":16},{"name":1474,"slug":1475,"type":16},"Frontend","frontend",{"name":1477,"slug":1478,"type":16},"Web Development","web-development","2026-07-13T06:16:39.108827",{"slug":1481,"name":1481,"fn":1482,"description":1483,"org":1484,"tags":1485,"stars":1389,"repoUrl":1390,"updatedAt":1497},"fullstack-dev","build full-stack web applications","Full-stack backend architecture and frontend-backend integration guide.\nTRIGGER when: building a full-stack app, creating REST API with frontend, scaffolding backend service,\nbuilding todo app, building CRUD app, building real-time app, building chat app,\nExpress + React, Next.js API, Node.js backend, Python backend, Go backend,\ndesigning service layers, implementing error handling, managing config\u002Fauth,\nsetting up API clients, implementing auth flows, handling file uploads,\nadding real-time features (SSE\u002FWebSocket), hardening for production.\nDO NOT TRIGGER when: pure frontend UI work, pure CSS\u002Fstyling, database schema only.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1486,1489,1490,1493,1496],{"name":1487,"slug":1488,"type":16},"Backend","backend",{"name":1474,"slug":1475,"type":16},{"name":1491,"slug":1492,"type":16},"Full-stack","full-stack",{"name":1494,"slug":1495,"type":16},"REST API","rest-api",{"name":1477,"slug":1478,"type":16},"2026-07-13T06:16:43.219005",{"slug":1499,"name":1499,"fn":1500,"description":1501,"org":1502,"tags":1503,"stars":1389,"repoUrl":1390,"updatedAt":1512},"gif-sticker-maker","create animated GIF stickers from photos","Convert photos (people, pets, objects, logos) into 4 animated GIF stickers with captions.\nUse when: user wants to create cartoon stickers, GIF expressions, emoji packs, animated avatars,\nor convert photos to Funko Pop \u002F Pop Mart blind box style animations.\nTriggers: sticker, GIF, cartoon, emoji, expression pack, avatar animation.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1504,1505,1506,1509],{"name":1469,"slug":1470,"type":16},{"name":1405,"slug":1406,"type":16},{"name":1507,"slug":1508,"type":16},"Images","images",{"name":1510,"slug":1511,"type":16},"Media","media","2026-07-13T06:16:51.74461",{"slug":1514,"name":1514,"fn":1515,"description":1516,"org":1517,"tags":1518,"stars":1389,"repoUrl":1390,"updatedAt":1528},"ios-application-dev","develop iOS applications with SwiftUI and UIKit","iOS application development guide covering UIKit, SnapKit, and SwiftUI. Includes touch targets, safe areas, navigation patterns, Dynamic Type, Dark Mode, accessibility, collection views, common UI components, and SwiftUI design guidelines. For detailed references on specific topics, see the reference files.\nUse when: developing iOS apps, implementing UI, reviewing iOS code, working with UIKit\u002FSnapKit\u002FSwiftUI layouts, building iPhone interfaces, Swift mobile development, Apple HIG compliance, iOS accessibility implementation.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1519,1520,1523,1524,1527],{"name":1375,"slug":1376,"type":16},{"name":1521,"slug":1522,"type":16},"iOS","ios",{"name":1384,"slug":1385,"type":16},{"name":1525,"slug":1526,"type":16},"SwiftUI","swiftui",{"name":1387,"slug":1388,"type":16},"2026-07-13T06:16:55.686092",{"slug":1530,"name":1530,"fn":1531,"description":1532,"org":1533,"tags":1534,"stars":1389,"repoUrl":1390,"updatedAt":1545},"minimax-docx","create and edit DOCX documents","Professional DOCX document creation, editing, and formatting using OpenXML SDK (.NET). Three pipelines: (A) create new documents from scratch, (B) fill\u002Fedit content in existing documents, (C) apply template formatting with XSD validation gate-check. MUST use this skill whenever the user wants to produce, modify, or format a Word document — including when they say \"write a report\", \"draft a proposal\", \"make a contract\", \"fill in this form\", \"reformat to match this template\", or any task whose final output is a .docx file. Even if the user doesn't mention \"docx\" explicitly, if the task implies a printable\u002Fformal document, use this skill.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1535,1536,1539,1542],{"name":1320,"slug":1321,"type":16},{"name":1537,"slug":1538,"type":16},"DOCX","docx",{"name":1540,"slug":1541,"type":16},"Office","office",{"name":1543,"slug":1544,"type":16},"Templates","templates","2026-07-13T06:16:40.461868",{"slug":1547,"name":1547,"fn":1548,"description":1549,"org":1550,"tags":1551,"stars":1389,"repoUrl":1390,"updatedAt":1555},"minimax-music-gen","generate music and audio tracks","Use when user wants to generate music, songs, or audio tracks. Triggers on any request involving music creation, song writing, lyrics generation, audio production, or covers. Also triggers when user provides lyrics and wants them turned into a song, or describes a mood\u002Fscene and wants background music. Supports multilingual triggers — match equivalent phrases in any language. Do NOT use for music playback of existing files, music theory questions, or music recommendation without generation.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1552,1553,1554],{"name":1402,"slug":1403,"type":16},{"name":1405,"slug":1406,"type":16},{"name":1510,"slug":1511,"type":16},"2026-07-13T06:16:50.381758",{"slug":1557,"name":1557,"fn":1558,"description":1559,"org":1560,"tags":1561,"stars":1389,"repoUrl":1390,"updatedAt":1565},"minimax-music-playlist","generate personalized music playlists","Generate personalized music playlists by analyzing the user's music taste and generation feedback history. Triggers on any request involving playlist generation, music taste profiling, or personalized music recommendations. Supports multilingual triggers — match equivalent phrases in any language.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1562,1563,1564],{"name":1402,"slug":1403,"type":16},{"name":1405,"slug":1406,"type":16},{"name":1510,"slug":1511,"type":16},"2026-07-13T06:16:57.002997",84]