Hardening

Hardening is a skill for Claude Code, Codex from danielmiessler/LifeOS. It costs 141 tokens per session (1,358 once invoked), scanned A, original, MIT.

A testing guide that strengthens an existing test suite and the code it checks. It covers property-based testing, mutation testing, complexity and duplication checks, and testing whether acceptance criteria are specific enough.

In plain words
What is it for?
Use it to find bugs that example tests miss, test broad rules across many inputs, check whether tests catch deliberate code changes, and identify duplication or overly complex code.
Why use it?
Ordinary tests check selected examples and can miss unexpected inputs or bugs; these checks look for weaknesses in the tests themselves.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

About the project

LifeOS is an AI-assisted personal operating system that records a person’s goals, values, context, and current situation to help move them toward a desired future state. It supports work such as building applications, starting businesses, and creative projects. Its catalogue entries extend the system through skills, hooks, agents, and commands.

danielmiessler/LifeOS · 18,885 stars · on GitHub · ourlifeos.ai

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/danielmiessler/lifeos/hardening
Any agent
npx skills add danielmiessler/LifeOS --skill hardening
Clone the repo
git clone --depth 1 https://github.com/danielmiessler/LifeOS

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for Hardening

README.md
[![agentmods](https://agentmods.dev/badge/skills/danielmiessler/lifeos/hardening.svg)](https://agentmods.dev/skills/danielmiessler/lifeos/hardening)
Your own site
<a href="https://agentmods.dev/skills/danielmiessler/lifeos/hardening"><img src="https://agentmods.dev/badge/skills/danielmiessler/lifeos/hardening.svg" alt="Measured on agentmods" height="20"></a>
Per session 141 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,358 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00141 $0.01358
Opus 5 $0.00071 $0.00679
Sonnet 5 $0.00028 $0.00272
Haiku 4.5 $0.00014 $0.00136

Measured 6d ago against content hash ded92c1da67e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

Hardening scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

LifeOS/install/skills/Hardening/SKILL.md · 69 lines

How it starts

The opening of the file, as written. The whole thing — 69 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Hardening Skill

What It Does

Hardening sharpens what already exists — tests, ISCs, and code — without adding new functionality. Five workflows target test-surface and code-surface robustness: property-based testing via fast-check, mutation testing via Stryker, CRAP-complexity scoring, DRY duplication detection, and acceptance-test mutation that perturbs ISC text to catch fluff.

The Problem

Example-based tests check a handful of inputs the author thought of, so the bugs that survive are the inputs the author didn't think of. A test suite can be green and still be weak. ISCs can read as crisp pass/fail and still be fluff that anything would satisfy. You can't see any of this by reading the tests — you need to test the tests. This skill mechanizes that: property tests express the universal claim and shrink failures to the minimal counterexample, mutation testing proves the suite catches injected bugs, and acceptance-test mutation proves each ISC actually constrains the work.

How It Works

Hardening techniques sharpen what already exists — tests, ISCs, code. They don't add new functionality. Five workflows, all targeting test-surface and code-surface robustness.

Workflow Routing

Workflow Trigger File
PropertyTest property test, property based testing, PBT, fast-check, universal quantified claim, shrink counterexample — pure functions, parsers, serializers, data transforms, invariants Workflows/PropertyTest.md
MutationTest mutation test, mutation testing, Stryker, test the tests — planned, not yet built (stub; see Status)
CrapAnalysis CRAP score, CRAP analysis, risky undertested code — planned, not yet built (stub; see Status)
DryAnalysis DRY scan, jscpd, duplication rot — planned, not yet built (stub; see Status)
AcceptanceTestMutation acceptance test mutation, sharpen ISCs, detect fluff ISCs — planned, not yet built (stub; see Status)

Doctrine

These workflows operate against the existing test surface. PropertyTest doesn't replace bun-test examples — properties express the universal claim, examples are sampled instances of it. MutationTest doesn't replace test authoring — it grades existing tests' robustness. CRAP and DRY don't add tests — they prioritize where to add them. Acceptance-test mutation doesn't add ISCs — it mechanizes the Fluff vs Load-bearing distinction from ISAFormat.md.

Read the full file on GitHub · 69 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 69 lines · 141 tokens per session scan A ded92c1da67e

Subscribe to this mod's changes

Hardening is a skill published in the GitHub repository danielmiessler/LifeOS (18,885 stars, last pushed yesterday), licensed MIT. It adds 141 tokens to every session and 1,358 once invoked, about $0.0007 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

maaslalani-cli-style

Build CLIs and terminal tools in the style of maaslalani (slides, nap, sheets, gambit, typer, invoice, gum). Use when designing or building a new CLI/TUI tool, restructuring an existing one, or reviewing a terminal tool's UX, layout, keybindings, or README.

Zfinix/aster · 70 tokens

i-have-adhd

Action-first, zero-filler replies for a reader who loses the thread in prose. Use when the user asks for terse or direct answers, says too long, get to the point, tldr, stop rambling, or when replies keep getting cut off or ignored.

Zfinix/aster · 60 tokens

plan-devex-review

Interactive developer experience plan review. Explores developer personas, benchmarks against competitors, designs magical moments, and traces friction points before scoring. Three modes: DX EXPANSION (competitive advantage), DX POLISH (bulletproof every touchpoint), DX TRIAGE (critical gaps only). Use when asked to…

Global-mindee/WAY · 156 tokens

plan-tune

Self-tuning question sensitivity + developer psychographic for gstack (v1: observational). Review which AskUserQuestion prompts fire across gstack skills, set per-question preferences (never-ask / always-ask / ask-only-for-one-way), inspect the dual-track profile (what you declared vs what your behavior suggests), and…

Global-mindee/WAY · 170 tokens

tabw

Use when the user asks to "continue every session", "send this to all windows", "/ar:tabw". Acts on Claude sessions across tmux windows; destructive to in-flight work, so it states what it will do before doing it.

ahundt/autorun · 53 tokens

tabs

Use when the user asks to "list my claude sessions", "which windows are waiting", "/ar:tabs". Discovers Claude sessions across tmux windows and reports which need attention.

ahundt/autorun · 40 tokens