This craft is one of the varieties of an adjustable wrench, only implemented in another way. When using a universal key, the nut is clamped using a movable element with a groove.
To make such an instrument you will need a donor - a spanner wrench with an offset. In the key body, a groove is made under the sliding tongue. Thrust plates are welded on each side, a nut between them, then everything is closed with a metal strip and turned.
The movable tongue has the form of clearly repeating the angle on the hexagon head, so this device can be tightly clamped to the desired bolt or nut. The only minus of homemade in its mass, it will not be very convenient to carry such a key with you, but it can replace a whole set.