From refactor
Apply Change Value to Reference when you see Duplicated Code. Duplicate copies of a logically-single entity collapse into one shared object that everyone references.
How this skill is triggered — by the user, by Claude, or both
Slash command
/refactor:change-value-to-referenceThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
**Target state:** Duplicate copies of a logically-single entity collapse into one shared object that everyone references.
Target state: Duplicate copies of a logically-single entity collapse into one shared object that everyone references.
Why apply it: Updates to the entity are visible everywhere; storage shrinks; identity becomes meaningful again.
Pitfall: Sharing introduces the question 'who owns this?' — make sure the lifetime and visibility of the shared reference are well-defined.
// Avoid:
// every order carries its own Customer copy
orders.forEach(o => o.customer = { name: 'Acme' });
// Prefer:
const acme = customerRepository.find('Acme');
orders.forEach(o => o.customer = acme);
Removes smells: Duplicated Code
npx claudepluginhub wallacedrew/ritl --plugin refactorGuides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.