Hardening

Harden LifeOS test suites with property-based, mutation, and CRAP-complexity analysis.

17.4k|2.3k|Updated Sep 8, 2025
One-click install
npx skills add https://github.com/danielmiessler/LifeOS --skill hardening-danielmiessler
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Hardening
Source: https://github.com/danielmiessler/LifeOS/tree/main/LifeOS/install/skills/Hardening
Command: npx skills add https://github.com/danielmiessler/LifeOS --skill hardening-danielmiessler

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

Hardens LifeOS tests and code, detecting potential issues through advanced testing techniques like property-based testing, mutation testing, and CRAP-complexity analysis, without adding new functionality.

Core Features & Use Cases

  • Property-based Testing: Sharpens tests using fast-check to express universal claims and shrink counterexamples.
  • Mutation Testing: Uses Stryker to ensure the test suite catches injected bugs.
  • CRAP-complexity Scoring: Helps identify risky, underscored code.
  • DRY Duplication Detection: Detects duplicate code using jscpd.
  • Acceptance Test Mutation: Detects fluff in ISCs (Integration Stability Clauses).
  • Use Case: Automate the hardening process for your test suite to improve code reliability and identify potential weaknesses.

Quick Start

Run the 'hardening' command to automatically harden your tests and identify potential issues.

Frequently Asked Questions about Hardening

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I improve test suite robustness using mutation testing and property-based testing?

Test suite robustness is improved by combining property-based testing with fast-check to express universal claims, and mutation testing with Stryker to verify the suite catches injected bugs, detecting issues without adding new functionality.

What is CRAP-complexity analysis and how does it identify risky code?

CRAP-complexity scoring is a code quality analysis technique that identifies risky, underscored code by evaluating cyclomatic complexity and test coverage, helping you target areas needing test hardening.

How do I detect duplicate code and reduce complexity in my test suite?

You detect duplicate code using jscpd for DRY duplication detection, while simultaneously measuring CRAP-complexity to isolate and reduce risky code areas within your test suite hardening workflow.

Does mutation testing work with property-based testing to detect fluff in acceptance tests?

Mutation testing works alongside property-based testing to detect fluff in Integration Stability Clauses (ISCs), ensuring acceptance tests genuinely catch injected bugs rather than passing superficially.

What's the best way to automate test suite hardening for code quality assurance?

The best way to automate test suite hardening is running a dedicated hardening command that orchestrates property-based testing, mutation testing, CRAP-complexity analysis, and DRY duplication detection to improve code reliability.