  Soft gamma-ray repeaters (SGRs) are mainly a Galactic population and
originate from neutron stars with intense ($B\simeq 10^{15}{\rm \ G}$) magnetic
fields ('magnetars'). Occasionally, a giant flare occurs with enormous
intensity, displaying a short hard spike, followed by a weaker, oscillatory
phase which exhibits the rotational period of the neutron star. If the magnetar
giant flares occur in nearby galaxies, they would appear as cosmic short-hard
gamma-ray bursts (GRBs) without detecting the weak oscillatory phase. Recently,
a short-hard GRB named GRB 200415A was detected, with a position coincident
with the Sculptor Galaxy (NGC 253), rasing the question whether it is a classic
short GRB or a magentar giant flare. Here we show that magnetar giant flares
follow a scaling relation between the spectral peak energy and the isotropic
energy in $1\,{\rm keV} - 10\,{\rm MeV}$, i.e., $E_{\rm p}\propto E_{\rm
iso}^{1/4}$, and locate in a distinct region of the $E_{\rm p}-E_{\rm iso}$
plane from that of classic short GRBs. The relation can be well understood in
the model that giant flares arise from the photosphere emissions of
relativistically expanding fireball. GRB 200415A, together with two other
candidate giant flares (GRB 051103 and GRB 070201) follow this relation, which
strongly favor the giant flare origin of these GRBs. The GeV emission detected
by \emph{Fermi}/LAT from GRB 200415A at $18-285 \,$s can also be explained in
the giant flare scenario. The total energy in the GeV emission implies a baryon
load of $\sim 10^{23}{\rm g}$ in the giant flare fireball of GRB 200415A.
