immutability
CommunityNever mutate; always return new objects.
Authoryanko-belov
Version1.0.0
Installs0
System Documentation
What problem does it solve?
Mutating objects or arrays can introduce subtle bugs and hard-to-track state changes. This Skill enforces immutability by always returning new copies instead of mutating existing data.
Core Features & Use Cases
- Immutable updates: Replace objects or arrays with new copies to preserve original state.
- Predictable state management: Improves debugging, undo/redo, and React change detection.
- Use case: In a Redux-like app, when updating a user profile, return a new user object rather than mutating the existing one.
Quick Start
Use an immutable update pattern to modify an object, for example: return { ...obj, updated: true } instead of mutating obj.
Dependency Matrix
Required Modules
None requiredComponents
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: immutability Download link: https://github.com/yanko-belov/code-craft/archive/main.zip#immutability Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.