6. Given a regular triangular prism with a base edge length of 1, the diagonals of the two lateral faces are perpendicular to each other. Then the length of the lateral edge of the prism is $\qquad$
6. $\frac{\sqrt{2}}{2}$.

Let the triangular prism $A B C-A_{1} B_{1} C_{1}$, with side edge length $a$, and the skew diagonals of the side faces $A B_{1}$ and $B C_{1}$ are perpendicular to each other. Then
$$
\begin{array}{l}
\overrightarrow{A B_{1}} \cdot \overrightarrow{B C_{1}}=0 \\
\Rightarrow\left(\overrightarrow{B_{1} B}+\overrightarrow{B A}\right) \cdot\left(\overrightarrow{B B_{1}}+\overrightarrow{B_{1} C_{1}}\right)=0 \\
\Rightarrow \overrightarrow{B_{1} B} \cdot \overrightarrow{B B_{1}}+\overrightarrow{B_{1} B} \cdot \overrightarrow{B_{1} C_{1}}+\overrightarrow{B A} \cdot \overrightarrow{B B_{1}}+\overrightarrow{B A} \cdot \overrightarrow{B_{1} C_{1}}=0 \\
\Rightarrow-a^{2}+\cos 60^{\circ}=0 \Rightarrow a=\frac{\sqrt{2}}{2}
\end{array}
$$