  Understanding the galaxy-halo connection is fundamental for contemporary
models of galaxy clustering. The extent to which the haloes' assembly history
and environment impact galaxy clustering (a.k.a. galaxy assembly bias; GAB),
remains a complex and challenging problem. Using a semi-analytic galaxy
formation model, we study the individual contributions of different secondary
halo properties to the GAB signal. These are obtained by comparing the
clustering of stellar-mass selected samples to that of shuffled samples where
the galaxies are randomly reassigned to haloes of fixed mass and a specified
secondary halo property. We explore a large range of internal halo properties
and environmental measures. We find that commonly used properties like halo age
or concentration amount to only 20-30 per cent of the signal, while the
smoothed matter density or the tidal anisotropy can account for the full level
of GAB (though care should be given to the specific definition). For the
"successful" measures, we examine the occupancy variations and the associated
changes in the halo occupation function parameters. These are used to create
mock catalogues that reproduce the full level of GAB. Finally, we propose a
practical modification of the standard halo occupation distribution model,
which can be tuned to any level of assembly bias. Fitting the parameters to our
semi-analytic model, we demonstrate that the corresponding mock catalogue
recovers the target level of GAB as well as the occupancy variations. Our
results enable producing realistic mock catalogues and directly inform
theoretical modelling of assembly bias and attempts to detect it in the
Universe.
