On pages referencing Wikidata IDs (known as "QIDs", with regex: Q\d+), like:
please make the QID a link, in the format:
Hm. Not sure I want to make special cases for special tag values. On the first page you mention, the key page, all the links go to the tag value pages anyway, I can't change that. On the tag pages, there is no good place currently to put a link like that. Maybe add a link similar to what is done on the type=* pages (for instance https://taginfo.openstreetmap.org/tags/type=restriction the "See also the relation type page: restriction").
Yes, something like that would do. You could also fetch and display the label from the Wikidata item.