add directive snippet