  In this paper, we introduce a new concept of $L^2$-extension indices. This
index is a function that gives the minimum constant with respect to the
$L^2$-estimate of an Ohsawa--Takegoshi-type extension at each point. By using
this notion, we propose a new way to study the positivity of curvature. We
prove that there is an equivalence between how sharp the $L^2$-extension is and
how positive the curvature is. New examples of sharper $L^2$-extensions are
also systematically given. As applications, we use the $L^2$-extension index to
study Pr\'ekopa-type theorems and to study the positivity of a certain direct
image sheaf. We also provide new characterizations of pluriharmonicity and
curvature flatness.
