tsentials-clone

Community

Clone domain objects safely without side effects

Authorsenrecep
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill solves the problem of unintended mutations when you need to copy objects in memory, ensuring changes to working data do not affect originals.

Core Features & Use Cases

  • Cloneable<T> custom deep-copy: Implement clone() on domain models to control how each class is copied (e.g., excluding fields, resetting mutable state).
  • deepClone() hybrid deep cloning: Deep-copy arbitrary values via native structuredClone when available, with a robust recursive fallback for environments like React Native / Hermes.
  • cloneArray() for collections: Produce safe working copies of arrays by calling .clone() on each Cloneable element.
  • Use cases: Snapshotting objects before applying business rules, preparing immutable request/response models, cloning nested aggregates, and preserving circular references safely.

Quick Start

Use the tsentials-clone skill to create a safe deep copy of your in-memory object or collection before applying transformations.

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: tsentials-clone
Download link: https://github.com/senrecep/tsentials/archive/main.zip#tsentials-clone

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.