It is written in the following steps :
Step I. Total number f valence electrons in the three atoms involved = 1+4+5=10.
Step II. Skletal structure for HCN is HCN
Step III. Place one shared pair od electrons between both the pairs of atoms and show the remaining six electrons as three lone pairs H:C::N::H:C::N::
Step IV. In the structure, duplet for H atom is complete but the octets of both C and N atoms are incomplete. They can be complated with the multiple bnds
H:C::N:or H - C≡N: