  We formulate a theory of skyrmion and antiskyrmion generation using magnetic
field and charge current pulses. We show that the topological defect can be
created at an edge of a system with Dzyaloshinskii-Moriya interaction (DMI) as
well as at a boundary between regions with different DMI. We consider both
perpendicular and in-plane (also known as magnetic bimerons) versions of
skyrmions and antiskyrmions. We show that the magnetization twist in the
vicinity of an edge or a boundary is described by a kink solution, the presence
of which can instigate the generation of topological defects. We study the
collective excitations of magnetization analytically and numerically, and
demonstrate that under application of magnetic field and charge current pulses
the magnon modes localized near boundaries can develop instabilities leading to
the formation of skyrmions or antiskyrmions. Due to the skyrmion and
antiskyrmion Hall effects, a properly chosen current direction can push the
topological defects away from the boundary, thus facilitating their generation.
