Trickster

The trickster figure Reynard the Fox as depicted in an 1869 children's book by Michel Rodange

In mythology and the study of folklore and religion, a trickster is a character in a story (god, goddess, spirit, human or anthropomorphisation) who exhibits a great degree of intellect or secret knowledge and uses it to play tricks or otherwise disobey normal rules and defy conventional behavior.