Analyze

From arjunrajlaboratory/mycelium · View interactive version

Analyze is an AI agent skill from the GitHub repository arjunrajlaboratory/mycelium. 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 analytic

How to use this skill

Skill file

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

  1. Read manifests to understand the project:
  1. Continuing existing: Navigate to analysis/[name]/ and read its documentation file (UPPER_SNAKE_CASE of folder name, e.g., SNP_ANALYSIS.md).
  1. 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 or pending, 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.
  1. 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 ## Plan section.
  1. Route to installed conventions:
  1. 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.json and run skills/core/scripts/data_contract_check.py on 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.
  1. Execution standards:
  1. Lint with scilintr after writing or modifying analysis code (non-negotiable). This is a fast static analyzer that flags silent scientific commitments — things that look like ordinary software (broad except, positional indexing, unchecked joins, unannotated filters, label leakage, magic thresholds, unseeded RNGs, etc.). The core principle is: scientifically meaningful choices must not be anonymous. Read skills/core/references/scilintr-guide.md before invoking it the first time in a session — it explains the philosophy, the rule catalogue, and (critically) the ANALYSIS_OK[category]: explanation waiver mechanism. Workflow:
  1. Run the post-action hook protocol after significant steps (see /mycelium:core for the full protocol):
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.