
Harden
Turns a project learning into a passing test that guards it from regressing
Harden is an open-source agent skill for developer tools. It is available on Claude Code.
- Scripts
- None
- Platforms
- Claude Code
- GitHub stars
- 73
- Last commit
- License
- MIT
- Listing updated
Similar skills
About Harden
Harden takes one learning from a project's .living/learnings.md file that is still marked ambient-awareness but names a concrete check, and ships that check as a real test. It writes the test using the repository's existing test setup, or a simple stdlib Python or testthat file when none exists. Analysis code and analysis directories are left untouched.
The workflow centers on proving the test is meaningful. The agent makes the learning's problem present (with a fixture for data checks, or against the unmitigated implementation for code checks) and confirms the test fails there, then confirms it passes on the current code. If the test cannot fail on the bad input, or fails on the current code, the learning is not marked structural.
After the user confirms the planned edit, the skill changes only that one learning entry: it sets its mitigation type to structural and appends the shipped test path and date to the candidate text. It does not commit anything. It works with Mycelium's own .living/ files, so it expects a repository already set up with that structure.
When your agent uses it
Ship one learning's structural_mitigation_candidate as a real test, then mark the learning's mitigation_type structural. Picks a learning in .living/learnings.md that is still ambient-awareness but names a concrete check, writes the test in the repository's own test setup, proves it fails when the learning's problem is present and passes on the current code, and updates only that entry after the user confirms. Use when the user asks to harden, enforce, or turn a learning, gotcha, or lesson into a test or structural mitigation. Do not use for recording a new learning, promoting learnings to conventions, adding checks inside analysis code, or changing Mycelium itself.
From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.
What it can access
From a static check of its 2 files (6 KB) on GitHub on 1 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.
Check another skill before you install it.
Install
This skill ships in the mycelium plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):
/plugin marketplace add arjunrajlaboratory/mycelium
/plugin install mycelium@myceliumOr copy only this skill to ~/.claude/skills/harden:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/arjunrajlaboratory/mycelium.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/harden &&
cp -R "$tmp/skills/harden" ~/.claude/skills/harden &&
rm -rf "$tmp"For one project only, put the folder in .claude/skills/harden inside it instead.
Copy the skill folder to ~/.agents/skills/harden to use it in every repository:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/arjunrajlaboratory/mycelium.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/harden &&
cp -R "$tmp/skills/harden" ~/.agents/skills/harden &&
rm -rf "$tmp"For one repository only, put the folder in .agents/skills/harden inside it instead.
Copy the skill folder to ~/.cursor/skills/harden to use it in every project:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/arjunrajlaboratory/mycelium.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/harden &&
cp -R "$tmp/skills/harden" ~/.cursor/skills/harden &&
rm -rf "$tmp"For one project only, put the folder in .cursor/skills/harden inside it instead.
Run in a terminal (add --scope workspace to install it for the current workspace only):
gemini skills install https://github.com/arjunrajlaboratory/mycelium.git --path skills/hardenOr copy the folder to ~/.gemini/skills/harden yourself.
For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/harden:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/arjunrajlaboratory/mycelium.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/harden &&
cp -R "$tmp/skills/harden" ~/.copilot/skills/harden &&
rm -rf "$tmp"For one project only, put the folder in .github/skills/harden inside it instead.
Get the folder:
git clone --depth 1 https://github.com/arjunrajlaboratory/mycelium.gitThen copy mycelium/skills/harden into your agent's skills folder as harden. Agents that support SKILL.md read one folder per skill.
What it does
- Candidate selection
- Finds learnings that name a concrete check but have not yet been turned into a test.
- Test placement
- Writes the test within the repository's existing pytest, testthat, or test folder conventions.
- Red and green verification
- Runs the test against the problem state and the current code to confirm it guards something.
- Scoped learning update
- Edits only the chosen learning entry, and only after the user confirms.
- Analysis code protection
- Keeps checks out of analysis scripts and notebook directories, placing them in tests instead.
Good for
- Turn a recurring data gotcha about a column into a regression test
- Make a remembered lesson about a function's edge case into a failing-then-passing test
- Convert a file-format warning from a learning note into an enforced check
- Add a sample-count assertion to the test suite based on a past mistake
Harden FAQ
What does the skill need before Harden can run?
It requires a .living/learnings.md file in the working repository. Without it, the skill stops and reports that.
Where does the generated test go?
It follows the repository's existing test setup, such as pytest.ini, pyproject.toml, tests/testthat/, or existing test_*.py files. With no setup, it creates tests/test_<slug>.py or tests/testthat/test-<slug>.R.
Does Harden change analysis code?
No. It never edits analysis code or places tests under analysis, notebook, or manifest-listed paths. Checks that live in analysis scripts are re-expressed as tests that read the same files.
Does Harden commit the changes?
No. After confirmation it edits only the one learning entry and leaves committing to the user.
When is a learning not marked as structural?
If the test cannot fail when the problem is present, or if it already fails on the current code, the learning stays ambient-awareness or is reported as a live problem.
How do I install Harden in Claude Code?
Copy the skill folder from GitHub to ~/.claude/skills/harden to use it in all your projects, or to .claude/skills/harden in one project. Or install the mycelium plugin, which includes it: /plugin marketplace add arjunrajlaboratory/mycelium, then /plugin install mycelium@mycelium.
Does Harden run scripts?
No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.
Which AI agents can use Harden?
Claude Code. It reads skills in the SKILL.md format; the install steps on this page show where to put the folder.
What are the best alternatives to Harden?
The closest alternatives to Harden are Improve codebase architecture, Harness engineering, Characterization tests, TDD loop and Create formal verification skill.
Where this comes from
- Description: from the skill's own SKILL.md.
More from arjunrajlaboratory/mycelium

Sets up and maintains a living repo layer where an agent records decisions, learnings
- Open source
- 73 GitHub stars
- Developer tools

Guides an agent through repository-aware computational analysis with validation checks
- Open source
- 73 GitHub stars
- Knowledge and memory

Fixes Codex review comments on a PR and audits the branch for the same mistakes
- Open source
- 73 GitHub stars
- Developer tools

Guides changes to the Mycelium plugin itself across Claude Code and Codex hosts
- Open source
- 73 GitHub stars
- Developer tools

Brainstorms research ideas and new analysis angles through persona-based subagents
- Open source
- 73 GitHub stars
- Knowledge and memory

Adds new datasets to a Mycelium project with metadata, provenance and manifest entries
- Open source
- 73 GitHub stars
- Knowledge and memory





