Pragmatically speaking, actions are deemed 'unskillful' (akusala) if they lead to to self-affliction, to the affliction of others, or to both. Actions that don't lead to self-affliction, to the affliction of others, or to both are deemed 'skillful' (kusala) (MN 61). Therefore, the distinction between skillful and unskillful actions is based upon how their results are experienced—not only by ourselves, but by others as well. (This emphasis on the consequential aspect of actions is similar to Jeremy Bentham's teleological utilitarianism, with John Stuart Mill's idea of higher and lower happiness being similar to the Buddha's distinction between long-term and short-term welfare and happiness.)
Psychologically speaking, however, the quality of the intentions behind the actions is what ultimately determines whether they're unskillful or skillful. (This aspect is closer to Kant's deontological categorical imperative when combined with the Buddhist principle of ahimsa or harmlessness.) Intentional actions rooted in greed, hatred, or delusion produce painful mental feelings "like those of the beings in hell," while intentional actions rooted in non-greed, non-hatred and non-delusion produce the opposite ("like those of the Beautiful Black Devas"). Then there are acts rooted in both that bring mixed results "like those of human beings, some devas, and some beings in the lower realms" (AN 4.235). By bringing kamma to an end, however, the mind is said to become free and undisturbed.
In Buddhism, intention or will (cetana) isn't conceived as something independent of causality, but a product of the aggregate of mental formations (sankharakhandha). The cause by which kamma comes into play is sensory contact (phassa). Furthermore, according to Nyanatiloka's Manual of Buddhist Terms and Doctrines, vipaka, 'fruit' or 'result,' is "any ... mental phenomenon (e.g. bodily agreeable or painful feeling, sense-consciousness, etc.), which is the result of wholesome or unwholesome volitional action (karma, q.v.) through body, speech or mind, done either in this or some previous life."
Essentially, intentional actions of body, speech, and mind produce results that are said to have the potential to ripen during this lifetime, in the next birth, or in later births. This can be taken literally (i.e., ripening in the form of a pleasant or unpleasant rebirth in an external realm of existence), or metaphorically (i.e., ripening in the form of various pleasant or unpleasant mental states). In the words of S. Dhammika:
According to the Buddha, every intentional action modifies our consciousness, thus building our character and thereby influencing our behaviour, our experience and consequently our destiny. Positive intentional actions (motivated by generosity, love and wisdom) tend towards consequences that are experienced as positive while intentional negative actions (motivated by greed, hatred and delusion) tend towards consequences that are experienced as negative.
Therefore, I think that in certain contexts, it would be appropriate to think of kamma as 'habit energy' in the sense that the potential effects of an action can be to condition and even strengthen certain physical and psychological reactions. This is especially true in regard to psychological reactions considering that vipaka is limited specifically to 'mental phenomena.'
As for the common misconception of kamma that everything we do or experience in the present is solely conditioned by past actions (i.e., the straight line theory of causality), that's actually how the Jain doctrine of kamma is portrayed in the Pali Canon. The Buddha, on the other hand, took the position that our experience of the present is conditioned by both past and present actions (i.e., the non-linear theory of causality). (It seems to me that the difference between Nigantha Nataputta's doctrine of kamma and the Buddha's doctrine of kamma is not unlike the difference between Democritus' atomism and Epicurus' atomism.)
Since the Buddhist conception of causality is non-linear, we don't have to exhaust all our negative kamma, which is essentially the doctrine of the Jains (see MN 101), we simply have to eliminate the production of kamma in the present. And that's a good thing. Theoretically, if we assume for the moment that all of the teachings on rebirth are literally true, then it'd be statistically impossible to exhaust all of our 'negative kamma' due to the fact that a beginning point to samsara (literally 'wandering on') isn't evident (SN 15.3). (This can be interpreted two ways — that a beginning point to the continual cycle of death and rebirth of beings isn't evident, or that a beginning point to the continual cycle of death and rebirth of the conceit 'I am,' the self-identification that designates a being (satta), isn't evident — and they're not mutually exclusive.)
The Buddha's teachings, on the other hand, state that to gain release from samsara, one must put an end to all types of kamma, not just the negative since kamma is a mental component inherently tied to, and influenced by, greed, hatred, and delusion (AN 3.33). That's why the noble eightfold path is called "the path of practice leading to the cessation of kamma" (SN 35.145). They're skillful actions that, when used appropriately, have the potential to ultimately lead to the elimination of the skillful/unskillful dichotomy altogether, leaving only happiness (Dhp XV), contentment (Thag 9), peace (Snp 2.1), freedom (SN 36.31), and moral perfection behind (AN 9.7). As St. Maximus writes in Opuscula theologica et polemica (albeit from a Christian perspective), "A perfect nature has no need of choice, for it knows naturally what is good. Its freedom is based on this knowledge."