The brothers have been accused of murderous intentions. Although that was specifically in reference to Lehi, Nephi is not the focal point of the story, and that murderous intent appears to be leveled against him. Nephi displays his comparative righteousness to their unrighteousness in the Spirit’s protection.
Jehovah tells Nephi to “stretch forth thine hand.” That phrase is used often in the Old Testament as a statement that Jehovah will be destructive to those against whom the hand is stretched. That is clearly the intent here.
When the text says that Nephi would shock his brothers, we should not assume anything like an electrical shock. That would be anachronistic. It is another meaning of shock, which is “a violent striking” (in Webster’s 1828 dictionary), that we find the contextually appropriate meaning.