Illustrative is the synthesis of tert-butyl isocyanide from tert-butylamine in the presence of catalytic amount of the phase transfer catalyst benzyltriethylammonium chloride.
As it is only effective for primary amines, the carbylamine reaction can be used as a chemical test for their presence.
If a primary amine is present, the isocyanide (carbylamine) is formed, as indicated by a foul odour.
The carbylamine test does not give a positive reaction with secondary and tertiary amines.
The mechanism involves the addition of amine to dichlorocarbene, a reactive intermediate generated by the dehydrohalogenation of chloroform.