/mycelium:hardenfrom mycelium
Converts a learning from ambient-awareness to a structural mitigation by writing a test that enforces it. Use when asked to harden, enforce, or turn a lesson into a test.
Ships in mycelium. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Resolve .living/ and test paths relative to the user's working repository.
Turn a learning the project keeps having to remember into a test that
remembers it. A learning counts as structural only once its check has
shipped (skills/core/templates/learning-entry.md); until then it stays
ambient-awareness, the weakest kind. This skill ships the check. Harden one
learning per run.
.living/learnings.md. Without it, say so and stop.structural_mitigation_candidate, then read each matching
entry. An entry starts at the ### [YYYY-MM-DD] heading above the match;
older projects may use a legacy ## [YYYY-MM-DD] heading.mitigation_type is ambient-awareness and whose
candidate names a concrete check: a function, file, column, or assertion.
Skip the template placeholder and vague candidates ("be careful with X").
Leave convention entries and entries with no mitigation_type alone: a
convention entry is already enforced, so harden does not take it, and an
untyped entry needs its type derived first. An entry marked structural
whose check never shipped re-derives to ambient-awareness, which makes it
a candidate here. The type follows the rule in
skills/core/templates/learning-entry.md; harden only ships a check, after
which that rule makes the entry structural.analysis/.../x.py, assert ...") still qualifies when the check reads a file
a test can read too: show it with "(check moves to a test)". If it checks a
value only the running script holds, skip it and say why: it needs a code
change and a re-run through $mycelium:analyze.pytest.ini, [tool.pytest] in
pyproject.toml, tests/testthat/, or existing test_*.py files and how
they are run (check README, MYCELIUM.md, AGENTS.md, CLAUDE.md).tests/test_<slug>.py (stdlib assert, runnable with
python3) or tests/testthat/test-<slug>.R.analysis/, a
notebook directory, or any path listed in ANALYSIS_MANIFEST.md. A check
inside analysis code changes what ran, so it belongs to a new analysis run,
not to this skill. For a candidate placed in analysis code, write the same
assertion in the test, reading the file the analysis reads or writes, and
leave the script as it is.# Guards learning "<title>" (.living/learnings.md, <date>).A test guards something only if it fails when the learning's problem is present and passes now. How to make the problem present depends on what the test checks:
git worktree (it holds
only tracked files, so copy the new test into it), or the fix monkeypatched
out inside a throwaway run. It must fail there, on its targeted assertion: a
missing test, import error, or collection failure is not a red run. Then
remove the worktree with git worktree remove --force <path> (--force
because the copied test leaves it dirty), which also clears its Git
metadata; deleting the directory alone does not. Never edit the
repository's code to stage the red run, and never keep a test that fails on
the input it is meant to handle.Then the green run: the test must pass on the current code or data. Show both runs.
If it cannot be made to fail in its red run, it guards nothing: stop, and
leave the entry ambient-awareness. If it fails on the current code, the
problem is live: report it, and do not mark the learning structural.
For a data learning (a column, a sample count, a file format), the test may read the repository's data file. If that file is large or git-ignored, say the test only runs where the data exists.
Show the test path, both runs, and the exact edit, then ask. After the user confirms, edit only that entry:
**mitigation_type**: structural**structural_mitigation_candidate**: <unchanged text> Shipped: <test path> (YYYY-MM-DD).Append the Shipped: note to the end of the existing candidate text, even
when that text wraps over several lines. Change no other field or entry, and
do not commit. If Mycelium's Stop hook asks for .living/ updates afterwards,
follow it. End with one line: the learning, the test path, and how to run it.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub arjunrajlaboratory/mycelium --plugin mycelium11 skills in this plugin
/analyzeRun 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.
/codex-reviewAddress Codex review comments on a pull request. Use when the user asks to respond to Codex, fix what Codex flagged, handle an @codex comment, or supplies a Codex review link. Generalize each comment into an error pattern, audit the whole branch for other instances, fix and test them, then draft a reply. Confirm before posting or re-triggering review. Do not use for a general code or scientific review without Codex feedback.
/coreInitialize and maintain Mycelium living repositories. Use when the user mentions Mycelium, living repos, crystallizing learnings or findings, recording decisions or settling which past decision still binds, installing conventions, tracking todo ideas, migrating an older Mycelium project, or managing the .living knowledge layer. Do not use for report writing, generic refactoring, brainstorming, git initialization, or ordinary folder organization.
/developDevelop, refactor, or review the Mycelium plugin itself across Claude Code and Codex. Use for shared skills, plugin manifests, lifecycle hooks, installers, migrations, session accounting, shell execution detection, data lineage, or cross-host compatibility changes in the Mycelium source repository. Apply branch-wide error-pattern review, TDD, compatibility checks, and real-host smoke testing. Do not use for maintaining an ordinary Mycelium-enabled project, performing scientific analysis, or responding to an existing Codex PR comment (use codex-review for that).
/ideasBrainstorm 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.
/ingestAdd 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.
Other plugins' skills for the same job