8. The constant term in the expansion of $\left(x^{2}+x-\frac{1}{x}\right)^{6}$ is $\qquad$ (answer with a specific number).
8. -5 .

From the conditions, the constant term is
$$
C_{6}^{2}(-1)^{4}+C_{6}^{3}(-1)^{3}=-5 .
$$