Let \(\mathscr {R}\) be a prime ring of characteristic not equal to 2. Let \(\mathscr {Q}_r\) be the Martindale quotient ring of \(\mathscr {R}\) and \(\mathscr {C}\) be the extended centroid of \(\mathscr {R}\) . Suppose that \(f(x_1,\ldots ,x_n)\) is a non-central multilinear polynomial over \(\mathscr {C}\) and define the set \(\mathscr {S}=\{f(r_1,\ldots ,r_n)|r_1, \ldots ,r_n \in \mathscr {R}\}\) . Let \(\mathscr {G}\) and \(\mathscr {F}\) be two generalized skew derivations of \(\mathscr {R}\) associated with the automorphism \(\alpha \) . Let g and h be the associated skew derivations of \(\mathscr {F}\) and \(\mathscr {G},\) respectively. We will provide the complete description of \(\mathscr {F}\) and \(\mathscr {G}\) under the assumption that the identity \(\mathscr {F}(X^2)=(\mathscr {G}(X))^2+\mathscr {G}(X)X+X\mathscr {G}(X)\) holds for all \(X \in \mathscr {S}\) . As an application of this result, we show that if there exists a non-zero skew-derivation d on \(\mathscr {R}\) satisfying \(d(x^2)=d(x)^2+d(x)x+xd(x)\) for all \(x\in \mathscr {R}\) . Then \(\mathscr {R}\) contains a non-zero central ideal.