analyze
Run computational analysis using the repository's registered datasets, conventions, and validation requirements. Use for clustering, PCA/UMAP, differential expression, survival or time-series models, statistical tests, sensitivity analysis, continuing prior analyses, or debugging unexpected analytical results. Do not use for merely previewing data, ingesting files, writing reports, brainstorming, repository setup, or unrelated code fixes.
- License 许可
- MIT
- 最近更新
- 2026-11-15
- Stars
- ★ 72
- Forks
- 2
01 前言 Front Matter
- name
- analyze
- description
- Run computational analysis using the repository's registered datasets, conventions, and validation requirements. Use for clustering, PCA/UMAP, differential expression, survival or time-series models, statistical tests, sensitivity analysis, continuing prior analyses, or debugging unexpected analytical results. Do not use for merely previewing data, ingesting files, writing reports, brainstorming, repository setup, or unrelated code fixes.
02 资源文件 4
- 参考文档agents/openai.yaml216 B
- 参考文档references/analysis-decisions.md6.3 KB
- 参考文档references/planning-failure-modes.md13.0 KB
- 参考文档references/planning.md10.5 KB
03 SKILL.md 正文
Mycelium — Analyze
Resolve bundled skills/ and network/ paths relative to the Mycelium plugin
root—the ancestor containing .codex-plugin/ and .claude-plugin/. Resolve
analysis and .living/ paths relative to the user's repository.
Start a new analysis or continue an existing one, routing to the appropriate convention packs installed in this repository.
Steps
-
Read manifests to understand the project:
analysis/ANALYSIS_MANIFEST.md— existing analysesdata/DATA_MANIFEST.md— available dataalgorithms/ALGORITHM_MANIFEST.md— available algorithms
-
Continuing existing: Navigate to
analysis/[name]/and read its documentation file (UPPER_SNAKE_CASE of folder name, e.g.,SNP_ANALYSIS.md). -
Offer a planning discussion before the first run. For a new analysis, or new work (a new question, or a new method for its question) in an analysis whose
**Planning**:record is missing orpending, ask once in plain text whether the user wants a short planning discussion: at most 5 questions, one at a time, each with the evidence found and a recommended answer, ending in a sourced plan to confirm before anything runs. Yes is the recommended default. If the user skips, ask no planning questions and go straight to the analysis with a short plan built from the request, repository evidence, and labelled defaults. Planning is read-only until the plan is confirmed or skipped. Full procedure:skills/analyze/references/planning.md. -
New analysis: Create
analysis/[name]/with documentation file (UPPER_SNAKE_CASE.md),scripts/,outputs/,reports/. If building on a parent analysis, record the lineage in the manifest entry. Record the planning outcome and the plan in the documentation file's## Plansection. -
Route to installed conventions:
- Read
.living/conventions/ACTIVE_CONVENTIONS.yamlto see what's installed. - Always consult the core references:
skills/core/references/analysis-conventions.md(structure) andskills/core/references/statistical-conventions.md(methodology). These are the baseline. - If
robust-analysisis installed (check.living/conventions/robust-analysis/): Follow its conventions as the primary execution guide. Read.living/conventions/robust-analysis/analysis-conventions.mdas the entry point — it links to detail files for strict execution, validation checks, sensitivity sweeps, null hypothesis testing, and adversarial probing. These conventions are non-negotiable when installed. - If a domain convention is installed (e.g.,
bioinformatics,image-analysis): Consult itsanalysis-conventions.mdfor domain-specific methodology. Domain conventions layer on top of robust-analysis. - If multiple conventions apply, follow the cascade: repo-local (
.living/conventions.md) > domain > core.
- Read
-
Check the data assumptions before running. This step runs either way, whether the planning discussion happened or was skipped. When a statistical test or model depends on the sample table's structure (cohort sizes, unit of replication, pairing across timepoints, batch versus contrast), write those assumptions as a contract in
analysis/<name>/data_contract.jsonand runskills/core/scripts/data_contract_check.pyon it before the first analysis run. Take the contract's values from the plan's rows (step 3) or the repository, never from a first look at the data. A blocking alert stops the analysis until the user decides. Never loosen the contract to make it pass (drop a check, change a threshold, add a filter, switch the unit column) without the user's agreement, and log any agreed change to.living/decisions.md. Re-run it when the data changes. Full guide, contract format, and run command:skills/core/references/data-contract-check.md. -
Execution standards:
- Use marimo for exploratory work, plain Python scripts for reproducible pipelines.
- Every analysis must have a
run.shorrun.pythat reproduces final outputs. - Register reportable values with
register_valueat the site that computes them. Any number or short phrase the analysis would expect a future report to quote (sample counts, thresholds, contrast phrases, headline metrics) goes throughskills/core/scripts/register_value.py. The call writesanalysis/<name>/outputs/numbers.json; the report's Phase-1 merge picks up the fragment automatically, andscitexlintrthen catches drift between the manifest value and any quoted snapshot in the.texsource. Full guide:skills/core/references/report-values-guide.md. Skip this only for values the report will never cite.
-
Lint with
scilintrafter writing or modifying analysis code (non-negotiable). This is a fast static analyzer that flags silent scientific commitments — things that look like ordinary software (broadexcept, positional indexing, unchecked joins, unannotated filters, label leakage, magic thresholds, unseeded RNGs, etc.). The core principle is: scientifically meaningful choices must not be anonymous. Readskills/core/references/scilintr-guide.mdbefore invoking it the first time in a session — it explains the philosophy, the rule catalogue, and (critically) theANALYSIS_OK[category]: explanationwaiver mechanism. Workflow:- Check the version once per session, for the implementation the analysis uses. Python:
python3 skills/core/scripts/check_linter_versions.py scilintrreports the installed version and the latest on PyPI; it never installs, and if it is missing, install withpip install scilintr. R: the Python check does not apply (the R package runs asRscript -e 'scilintr::main()');Rscript -e 'packageVersion("scilintr")'gives the installed version, andRscript -e 'op <- old.packages(repos = "https://cloud.r-project.org"); cat(if ("scilintr" %in% rownames(op)) paste("update available:", op["scilintr", "ReposVer"]) else "no newer CRAN release", "\n")'checks CRAN without installing; if it is missing, install withinstall.packages("scilintr"). If an update is available, tell the user and offer the upgrade — run it only with their agreement, since a newer linter can add rules and change what passes mid-analysis. - After every code write or edit, run
scilintr <file_or_dir>on the touched files. The CLI is fast (sub-second on most files), so there is no reason to defer. - Drive findings to zero, either by fixing the pattern (preferred — most findings have a cleaner code path) or by adding a structured waiver (
# ANALYSIS_OK[category]: explanation; where the check/assertion lives). A waiver must answer what / why scientifically valid / where it is recorded. Vacuous waivers (# ANALYSIS_OK: fine) are not acceptable. - Before declaring the analysis complete, run
scilintron the full analysis directory (e.g.,scilintr analysis/<name>/) to catch cross-file rules (duplicate-parameter-source, shadow-overwrite, definition drift). - This is complementary to
/mycelium:review, not a substitute. Lint catches structural patterns cheaply; review catches semantic and statistical issues.
- Check the version once per session, for the implementation the analysis uses. Python:
-
Run the post-action hook protocol after significant steps (see
/mycelium:corefor the full protocol):- Update
analysis/ANALYSIS_MANIFEST.md - Update the analysis documentation file
- Log decisions to
.living/decisions.md - Log learnings to
.living/learnings.md. Derivemitigation_typeby the rule inskills/core/templates/learning-entry.md:structuralif a shipped test, assertion, type constraint, frozenset, or schema validation enforces it; otherwiseconventionif a.living/conventions.mdentry covers it; otherwiseambient-awareness. - Run
skills/core/scripts/validate_structure.py
- Update
04 同仓库更多 Skills
transfer
Cross-pollinate learnings across Science subprojects by scanning recent .living/learnings.md entries and identifying actionable knowledge transfers. Use when user says "transfer knowledge", "cross-pollinate", "sync learnings", or "knowledge transfer".
review
Review or audit analytical code and scientific changes in statistics, ML, bioinformatics, or data pipelines. Use for PRs, commits, diffs, sanity checks, correctness questions, pre-merge review, tripwire testing, or conversational grill mode. Consult the bundled statistical, leakage, bioinformatics, documentation, LLM-failure, and code-quality checklists; synthesize prioritized findings. Do not use for writing new analysis, reports, brainstorming, project initialization, or pure software review with no analytical component.
report
Create a shareable report — a PDF, or a self-contained HTML report with a companion slide deck — a manuscript section, or a structured writeup from completed Mycelium analyses. Load the project's report templates, provenance, section guidance, and QC checklist. Use when the user wants a document artifact for collaborators or publication. Do not use for conversational explanation, standalone figures, performing analysis, ingestion, setup, or brainstorming.
lifecycle-audit
Run a black-box Mycelium lifecycle smoke test through a real Claude Code or Codex CLI task. Use after plugin installation, hook, SessionStart, PostToolUse, Stop, activity tracking, handoff, or data-lineage changes; when automatic hooks appear not to fire; or before merging cross-host lifecycle work. Verify installed-build identity, natural dispatch, state transitions, positive and negative probes, and scientific-tree isolation. Do not use as a substitute for unit tests or for ordinary scientific analysis.
ingest
Add or import files and datasets into a Mycelium project with metadata, provenance, validation, and DATA_MANIFEST updates. Use for collaborator or facility outputs and formats such as CSV, FASTQ, XLSX, TIFF, JSON, FCS, TSV, or images. Do not use for analyzing existing data, listing datasets, deleting data, downloading URLs, or editing code.
ideas
Brainstorm research ideas using installed persona and ideation conventions. Use for fresh perspectives, creative angles, new analysis directions, expert viewpoints, "what are we missing?", or other open-ended exploration. Do not use for a defined analysis, code fix, project setup, or data ingestion task.