Wikipedia
Stabskapitän (en: Staff captain), in the cavalry also Stabsrittmeister (en: "Staff riding master" or "Staff cavalry master"), or Kapitänleutnant (en: Captain lieutenant) , was a historic military rank in the Prussian Army. In reference to the German Stabskapitän the equivalent rank in the Imperial Russian Army used to be the rank Stabs-kapitan .
It ranked between the Premierleutnant (later called Oberleutnant) and Hauptmann/ Rittmeister in the Prussian army, and between lieutenant and captain in the Russian army. Its holder represented the actual captain and company commander in his absence, frequently and often for long periods, should his (usually noble) Hauptmann show no interest in leading the company, though the Hauptmann would retain his rank, status and uniform.
In the army of Frederick the Great, a regiment's regimentschef, oberst, staff officers, company commanders and those of nearby rank received a far higher rank than the staff captains who actually led the company. From this difference later developed the salary difference between a first class " Hauptleute first class" and " Hauptleute second class".
In Russian military the rank counted as a lieutenant captain ("light" captain) or Senior Lieutenant who was in charge of a company-size element.
A similar rank, yliluutnantti, is in use in Finnish military ranks.