Store an int in key local variable

Just use itob: Opcodes - Algorand Developer Portal

Note that it will convert the integer into a big-endian byte string, not into its decimal representation.
This is much more compact but will not be displayed nicely in most places like block explorers (which should not be a real issue).

Converting to a decimal or hexadecimal string is possible but require to write your own code. Furthermore it takes more space. So it is really not recommended.