Onmyoji, who were assigned as hogi (otherwise known as a gikan, meaning a bureaucrat with specialized skills), originally performed only senzei and chiso (rituals performed to determine lucky and unlucky directions) using Onmyodo, which is based on the principles of Inyo gogyo (Yin-Yang and the Five Elements), but later were given responsibility for all divinations, magic, and religious services outside the provisions of the Ritsuryo legal system.
陰陽五行の思想に基づいた陰陽道によって占筮及び地相などを行う方技（技官）として配置され、後には本来の律令規定を超えて占術・呪術・祭祀全般をつかさどるようになった職掌のことをいう。