Reduce distance between listings and their captions

\documentclass{scrbook}
\usepackage{listings}
\usepackage{minted}
\setminted{autogobble=true,fontsize=\small,baselinestretch=0.8,frame=lines}
\setminted[python]{python3=true,tabsize=4}
\usemintedstyle{trac}
\renewcommand{\listingscaption}{Code Snippet}
\title{MWE}
\usepackage{caption}
\captionsetup[plain]{skip=-10pt}
\begin{document}

\maketitle
\tableofcontents


\chapter{Test}

\begin{listing}[htbp]
\begin{minted}[]{python}
a = 2
\end{minted}
\caption{\label{example}
caption}
\end{listing}

\end{document}

enter image description here


How about this

\documentclass{scrbook}
\usepackage{listings}
\usepackage{minted}
\setminted{autogobble=true, fontsize=\small, baselinestretch=0.8, frame=lines}
\setminted[python]{python3=true, tabsize=4}
\usemintedstyle{trac}
\renewcommand{\listingscaption}{Code Snippet}
\AtEndEnvironment{listing}{\vspace{-8pt}} % <------- 
\title{MWE}
\begin{document}

\maketitle
\tableofcontents
\chapter{Test}

\begin{listing}[htbp]
\begin{minted}[]{python}
a = 2
\end{minted}
\caption{\label{example}caption}
\end{listing}

\end{document}

enter image description here

Of course you can change the value of \vspace to whatever you like.