Regarding the "xkiv casts x skill":
Assume it is Round 0 if you get the jump, round 1 if you don't.
In either case, when you use a skill, cast a spell, or attack, it is happening in round 0 or 1.
We submit the request to fight.php.
The response comes in and we increment the round.
We report all the results as happening in the new round.
Now, KoL itself tells us the round that it thinks it is during each response to a fight.php request.
There is an existing bug report, somewhere, that says we should simply log KoL's round.
That's probably right, but it's not something I, personally, have any interest in looking at, right now.