defensive-programming

Community

Write safer, more reliable code by default.

Authoryuchenzhu-research
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Defensive programming patterns help reduce misuse and bugs by enforcing immutability, strict visibility, and contract-based validation across codebases.

Core Features & Use Cases

  • Immutability by default across variables, fields, and parameters
  • Minimal visibility and sealed types to guard API surfaces
  • Design by contract with preconditions, postconditions, and invariants
  • Boundary validation and safe data handling
  • Resource safety (RAII) and deterministic cleanup
  • Safe defaults, exhaustive matching, and explicit error handling

Quick Start

Adopt defensive programming principles in your module by applying immutable defaults and sealed public APIs from the outset.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: defensive-programming
Download link: https://github.com/yuchenzhu-research/zhihu-scraper/archive/main.zip#defensive-programming

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.