Remember the reactivity of ambident nucleophiles like CN$^-$.
- With ionic cyanides (KCN, NaCN), the attack is primarily through carbon, forming nitriles (R-CN) as the major product.
- With covalent cyanides (AgCN), the attack is primarily through nitrogen, forming isocyanides (R-NC) as the major product.
Also, remember the distinct hydrolysis and reduction products of nitriles and isocyanides.