  For a wide class of curvature energy functionals defined for planar curves
under the fixed-length constraint, we obtain optimal necessary conditions for
global and local minimizers. Our results extend Maddocks' and Sachkov's
rigidity principles for Euler's elastica by a new, unified and geometric
approach. This in particular leads to complete classification of stable closed
$p$-elasticae for all $p\in(1,\infty)$ and of stable pinned $p$-elasticae for
$p\in(1,2]$. Our proof is based on a simple but robust `cut-and-paste' trick
without computing the energy nor its second variation, which works well for
planar periodic curves but also extends to some non-periodic or non-planar
cases. An analytically remarkable point is that our method is directly valid
for the highly singular regime $p\in(1,\frac{3}{2}]$ in which the second
variation may not exist even for smooth variations.
