·encapsulation
</>

encapsulation

yanko-belov/code-craft

Use when exposing internal state. Use when making fields public for convenience. Use when external code modifies object internals.

16Installs·0Trend·@yanko-belov

Installation

$npx skills add https://github.com/yanko-belov/code-craft --skill encapsulation

SKILL.md

Hide internal state. Expose behavior, not data. Control access through methods.

Public fields let anyone modify your object's internals, bypassing validation and breaking invariants. Encapsulation protects data integrity.

Response: Less code now, more bugs later. Encapsulation prevents invalid states.

Use when exposing internal state. Use when making fields public for convenience. Use when external code modifies object internals. Source: yanko-belov/code-craft.

View raw

Facts (cite-ready)

Stable fields and commands for AI/search citations.

Install command
npx skills add https://github.com/yanko-belov/code-craft --skill encapsulation
Category
</>Dev Tools
Verified
First Seen
2026-02-01
Updated
2026-02-18

Quick answers

What is encapsulation?

Use when exposing internal state. Use when making fields public for convenience. Use when external code modifies object internals. Source: yanko-belov/code-craft.

How do I install encapsulation?

Open your terminal or command line tool (Terminal, iTerm, Windows Terminal, etc.) Copy and run this command: npx skills add https://github.com/yanko-belov/code-craft --skill encapsulation Once installed, the skill will be automatically configured in your AI coding environment and ready to use in Claude Code or Cursor

Where is the source repository?

https://github.com/yanko-belov/code-craft