How to add a slot to a class?

To add a slot (or instance variable), click the grey bar just below the class name in the class coder to reveal the class definition.

Then add (+), edit, and click the checkmark (✓).

You can also add a slot from a fixit in a method coder: if you refer to an unbound variable, the fixit will offer to make it a temporary or a slot.