Gāng 刚/剛, gānggāng 刚刚/剛剛 and gāngcái 刚才/剛才 all mean ‘just, a short time ago’ and mark an event in the recent past. Gāng 刚/剛 is neutral in both spoken and written usage. It allows a wider time range for what counts as ‘recent.’ Gānggāng 刚刚/剛剛 and gāngcái 刚才/剛才 usually refer to a very recent past moment and tend to be more colloquial.

Structure
Basic structure
Gāng 刚/剛, gānggāng 刚刚/剛剛 and gāngcái 刚才/剛才 usually appear before the main verb or verb phrase. Gānggāng 刚刚/剛剛 and gāngcái 刚才/剛才 can also appear at the beginning of the sentence, while gāng 刚/剛 is not allowed to do so.
Negation
When referring to something that did not happen just a moment ago, Chinese normally uses méi(yǒu) 没(有)/沒(有) with gānggang 刚刚/剛剛 or gāngcái 刚才/剛才, not usually with bare gāng 刚/剛. When the speaker denies an intention, attitude, ability, or other modal meaning at that recent moment, bù 不 is used instead, again typically with gānggang 刚刚/剛剛 or gāngcái 刚才/剛才. In these cases, the negation marker is placed directly before the verb or modal verb phrase.
Question
Yes–no questions are formed with the question particle ma 吗/嗎 at the end of the sentence.
Shì bú shì 是不是 can also be used to ask a yes–no question with gāng 刚/剛, gānggāng 刚刚/剛剛 or gāngcái 刚才/剛才.
Question words can be used to ask about time, place, and other things. Gāng 刚/剛, gānggāng 刚刚/剛剛, or gāngcái 刚才/剛才 stays in the time-adverb position.
With time expressions
When a time expression (e.g., liù diǎn 六点/六點 ‘six o’clock’) or a time noun (e.g., zuótiān 昨天 ‘yesterday’) co-occurs with gāng 刚/剛, gānggāng 刚刚/剛剛 or gāngcái 刚才/剛才, the time expression can be placed at the beginning of the sentence or after the subject.
With aspect markers
Gāng 刚/剛, gānggāng 刚刚/剛剛 and gāngcái 刚才/剛才 often co-occur with the aspect marker le 了 (了1) or the experiential aspect marker guo 过/過. Using le 了 highlights that the action has been carried out; using guò 过 highlights prior experience ‘just now’. When indicating a new resulting state, gānggāng 刚刚/剛剛 and gāngcái 刚才/剛才 can be used with the final modal particle le 了 (了2).
With verb-resultative complements
Gāng 刚/剛, gānggāng 刚刚/剛剛, and gāngcái 刚才/剛才 often appear before a verb-resultative complement to show that the result has just been achieved. Common complements include wán 完 ‘finish’, jiàn 见/見 ‘see’, and dào 到 ‘get/find’.
With adverbs
Gāng 刚/剛 + VP1 + jiù 就 + VP2 (+ le 了) expresses two actions in close succession: “as soon as … then …”. The subject is usually the same in both parts. The sentence often ends with le 了 (了2) to mark a completed or newly changed situation.
Functions
1. Expressing recent past
Both gāng 刚/剛 and gānggāng 刚刚/剛剛 indicate that something happened a short time ago. Gāng 刚/剛 can refer to a broader range of recent time, whereas gānggāng 刚刚/剛剛 and gāngcái 刚才/剛才 usually point to a more immediate moment in the recent past.
2. Emphasizing a short interval
Using gāng 刚/剛 or gānggāng 刚刚/剛剛 with jiù 就 can highlight that one action happened immediately after another.