6. Let $f(x)=x^{2}+a x+b-2 (|x| \geqslant 2)$. If the graph of the function $y=f(x)$ intersects the $x$-axis, then the minimum value of $a^{2}+b^{2}$ is $\qquad$ .
6. $\frac{4}{5}$.

The function intersects the $x$-axis in five scenarios as shown in Figure 6.

For Figures 6(a), (b), and (c), it is easy to see that at least one of $f(-2) \leqslant 0$ and $f(2) \leqslant 0$ holds, i.e.,
$$
-2 a+b+2 \leqslant 0 \text { or } 2 a+b+2 \leqslant 0 \text {. }
$$

Thus, the region in the $(a, b)$ plane is as shown in the shaded area of Figure 7, and the distance from point $O$ to the line is
$$
\frac{12 \times 0+0+21}{\sqrt{5}}=\frac{2}{\sqrt{5}}.
$$
Therefore, $a^{2}+b^{2} \geqslant \frac{4}{5}$.

The equality holds when $a= \pm \frac{4}{5}, b=-\frac{2}{5}$.
For Figures 6(d) and (e), it is clear that $|a| \geqslant 4$.
In this case, $a^{2}+b^{2} \geqslant 16$.
Thus, the minimum value of $a^{2}+b^{2}$ is $\frac{4}{5}$.