Background: Gaps in the quality of care provided to people with type 2 diabetes are regularly identified. Healthcare professionals often have a strong intention to follow practice guidelines during consultations with people with type 2 diabetes; however, this intention does not always translate into action. Action planning (planning when, where and how to act) and coping planning (planning how to overcome pre-identified barriers) have been hypothesised to help with the enactment of intentions by creating mental cue-response links that promote habit formation. This study aimed to investigate whether habit helps to better understand how action and coping planning relate to clinical behaviour in the context of type 2 diabetes care. Methods: The study utilised a prospective correlational design with six nested sub-studies. General practitioners and practice nurses (n = 427 from 99 UK primary care practices) completed measures of action planning, coping planning and habit at baseline and then self-reported their enactment of guideline-recommended advising, prescribing and examining behaviours 12 months later. Bootstrapped mediation analyses were used to test the indirect effect of action and coping planning on healthcare professionals' clinical behaviour via their relationship with habit. Results: Healthcare professionals who reported higher degrees of action or coping planning for performing six guideline recommended behaviours in the context of type 2 diabetes care were more likely to report performing these behaviours in clinical practice. All 12 bootstrapped mediation analyses showed that the positive relationship between planning (action and coping planning) and healthcare professionals' clinical behaviour operated indirectly through habit. Conclusions: These findings suggest that habit mediates the relationship between planning (action and coping planning) and healthcare professional behaviour. Promoting careful action and coping planning may support routinised uptake of guideline-recommended care by healthcare professionals in the primary care setting. Given the competing demands on healthcare professionals, exploring the behavioural processes involved in promoting more routinisation of behaviours where possible and appropriate could free up cognitive capacity for clinical behaviours that rely on more deliberation.