fix(index): make scripts procotol-agnostic