[subject] + 刚 + [verb]
[subject] + 刚 + [verb] + [duration]
[subject] + 刚 + [verb],就 + [verb]
刚 goes right before the verb and says the action has only just happened. "Just" can mean a minute ago or a few days ago; what counts is that it feels recent.
With a length of time after the verb, 刚 says how short a time it has been.
刚 in the first half and 就 in the second say the second thing came straight after the first, often unwelcome.
刚 is an adverb: it sits after the subject, right before the verb. 刚才 is a time word, "a moment ago", and can go before the subject. Only 刚才 takes 没 or 不 after it.