The Buddha defined (literally 'action') as intention, and he essentially took the position that we, as sentient beings, have functional choice via intention operating within a broader framework of causality that conditions the choices available to us at any given time. More importantly, from the Buddhist point of view, kamma is primarily psychological in nature, with the results or fruits (vipaka) of intentional actions being experienced as pleasant, painful, or neither pleasant nor painful feelings (vedana) in the mind. In other word, kamma is how we intentionally react to things, our behaviour. (The Buddha basically took the Jain's deterministic view of kamma and ethicized it.)
That said, it's not about good or bad as much as skillful and unskillful. In Buddhism, all intentional actions are understood to have potential consequences, and actions that cause harm to others and/or ourselves are generally considered to be unskillful and something to be avoided. But if what the Buddha had to say about kamma is true, I don't think there's anyway to know precisely how these things will be experienced (), especially considering the complexity of .
Our experience of the present is conditioned by a multitude of factors, including the results of both past and present actions. For all we know, the results of our past unskillful actions (e.g., killing ants) may count next to nothing compared to all the skillful actions and mental states we've cultivated throughout our lives. More importantly, the Buddha never condemns people merely for making unskillful choices or breaking the precepts; he simply urges them to learn from their mistakes and to make an effort to renounce their unskillful behaviour with the understanding that skillful behaviour leads to long-term welfare and happiness. That's one of the main reasons the precepts are framed as 'training rules' rather than strict commandments.
In this case, the unskillful motivation to harm may be subtle, and may not cause too much stress or suffering right now; but repeatedly cultivating and giving in to the urge to harm may build up over time, becoming an ingrained habit. This can result in not respecting other forms of life and/or inclining the mind towards harming rather than avoiding harm in other circumstances, which can condition more violent behaviour that'll result in more suffering in the future (e.g., maybe losing your temper and harming a pet). Then again, maybe you'll never suffer much over it because of other competing factors. It's impossible to know.
"Sabbe dhamma nalam abhinivesaya" ().
(non-Buddhist related blog)