If "habit" refers to a repeated action:
* Occasional
* Infrequent
* Sporadic
* Uncommon
* Rare
* Once-in-a-while
If "habit" refers to a learned behavior:
* Instinct
* Natural tendency
* Unlearned behavior
If "habit" refers to a pattern or routine:
* Spontaneity
* Impulsiveness
* Unpredictability
* Flexibility
If "habit" refers to a negative, ingrained behavior:
* Virtue
* Good habit
* Healthy practice
The best antonym will depend on the specific context and what aspect of "habit" you want to contrast.