Example 6 Let $a=\frac{\sqrt{5}-1}{2}$. Then $\frac{a^{5}+a^{4}-2 a^{3}-a^{2}-a+2}{a^{3}-a}=$ $\qquad$ [6] $(2008$, National Junior High School Mathematics Competition)
Solve: Given $a=\frac{\sqrt{5}-1}{2} \Rightarrow 2 a+1=\sqrt{5}$.
Square both sides and simplify to get
$$
a^{2}+a=1 \text {. }
$$

Therefore, the original expression is
$$
\begin{array}{l}
=\frac{a^{3}\left(a^{2}+a\right)-2 a^{3}-\left(a^{2}+a\right)+2}{a(a+1)(a-1)} \\
=\frac{1-a^{3}}{\left(a^{2}+a\right)(a-1)} \\
=-\left(a^{2}+a+1\right)=-2 .
\end{array}
$$