Let R be a prime ring with maximal right ring of quotients Q, extended centroid C and a noncommutative Lie ideal L. Our aim is to characterize the forms of generalized skew derivations $$\delta $$ and $$\varrho $$ of R in case of $$\begin{aligned} p(\delta (u)^{l_{1}}\varrho (u)^{l_{2}}\delta (u)^{l_{3}}\varrho (u)^{l_{4}}\cdots \varrho (u)^{l_{k}} )^{n}=0, \end{aligned}$$ for all $$u\in L$$ , where $$0 \ne p\in R$$ , $$l_{1},l_{2},\ldots ,l_{k}$$ are fixed nonnegative integers with $$l_{1}\ne 0$$ and n is a positive fixed integer. The proof of this main result is based on the so-called extended Jacobson density theorem, which is different from that of previous results in the literature. Also as a result, we obtain if $$p\delta (u)^{n}=0$$ for all $$u \in L$$ , then there exists $$a\in Q$$ such that $$\delta (x)=ax$$ for all $$x \in R$$ and $$pa=0$$ unless R satisfies $$s_4$$ .