From software-design
Use when reviewing or refactoring code that queries object state and makes decisions outside the object that owns the data. Moves behavior to the responsible object to improve encapsulation. Trigger for getter misuse, Feature Envy, Tell Don't Ask, encapsulation improvements, or moving responsibility into domain objects.
How this skill is triggered — by the user, by Claude, or both
Slash command
/software-design:j5ik2o-tell-dont-askThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Tell the object what you want done; do not ask for its state and make the decision elsewhere.
Tell the object what you want done; do not ask for its state and make the decision elsewhere.
Find code that gets state, branches on it, then updates or commands the same object.
Name the intention behind the external decision.
Move that behavior to the object that owns the state.
Replace getters with intention-revealing methods where possible.
Keep DTO, serialization, logging, and UI projection exceptions explicit.
Getter plus if plus setter is a strong smell.
Feature Envy means behavior is closer to another object's data than its own.
Avoid adding anemic pass-through methods; move real decisions.
Read references/patterns.md for refactoring patterns.
For non-trivial implementation, review, or refactoring work, read references/details.md before giving final guidance. It contains the detailed rules, examples, smells, and migration notes that do not belong in the short invocation body.
Return the ask pattern, the moved behavior, revised API, and code changes.
npx claudepluginhub j5ik2o/ai-tools --plugin software-designUse when reviewing or refactoring object coupling caused by train-wreck call chains and knowledge of nested internals. Applies the Law of Demeter / Principle of Least Knowledge to move behavior closer to the owning object. Trigger for chained calls, dot chains, train wrecks, high coupling, Feature Envy, or reducing object navigation.
Proven refactoring patterns (Extract Method, Replace Temp, Introduce Parameter Object) to improve code structure safely. Use when improving existing code while keeping behavior unchanged.
Generates refactoring plans for code smells like long methods, god classes, duplicated code. Assesses risks, provides templates, and guides incremental execution with tests.