Domain-wall skyrmions are skyrmions trapped inside a domain wall. We investigate domain-wall skyrmions in chiral magnets using a fully analytic approach. Treating the Dzyaloshinskii-Moriya (DM) interaction perturbatively, we construct the low-energy effective theory of a magnetic domain wall in an O (3 ) sigma model with the DM interaction and an easy-axis potential term, yielding a sine-Gordon model. We then construct domain-wall skyrmions as sine-Gordon solitons along the domain wall. We also construct domain-wall skyrmions on top of a pair of a domain wall and an anti-domain wall. One characteristic feature of domain-wall skyrmions is that both skyrmions and antiskyrmions are equally stable inside the domain wall, unlike the bulk in which only one of them is stable.