There a many magic words out there, but none that identify the wiki with its wiki ID (wfWikiId()). What I would like to see is a magic word that does this.
For example on en.wikipedia.org I would use {{WIKIID}} and it would output enwiki. On de.wikipedia.org it would output dewiki. On species.wikimedia.org it would out specieswiki, and so forth.