Developing the structures of organic materials that rely on the hydrogen bonding of multifunctional substrates is often complicated due to a competition between various possible motifs. In this context, the illustrative case of the carbamoylcyanonitrosomethanide anion, [ONC(CN)-C(O)NH2]-, suggests sufficient control over the crystal lattice with a set of supramolecular synthons, which are specific to all the present nitroso, carbamoyl and cyano groups. The structures of the carbamoylcyanonitrosomethanide salts of ethane-1,2-diammonium, C2H10N22+·2C3H2N3O2-, (1), piperazine-1,4-diium, C4H12N22+·2C3H2N3O2-, (2), butane-1,4-diammonium, C4H14N22+·2C3H2N3O2-, (3), and hexane-1,6-diammonium, C6H18N22+·2C3H2N3O2-, (4), reveal two- and three-dimensional hydrogen-bonded frameworks governed by a set of site-selective interactions. The strongest N-H...O hydrogen bonds [N...O= 2.6842 (17)-2.8718 (17) Å, mean 2.776 (2) Å] are associated with the polarized ammonium N-H donors and nitroso O-atom acceptors, which sustain invariant motifs in the form of nitroso/ammonium dimers. Subtle structural changes within this series of compounds concern the rupture of some weaker interactions, i.e. mutual hydrogen bonds of the carbamoyl groups in (1)-(3) [N...O= 2.910 (2)-2.9909 (18) Å; mean 2.950 (2) Å] and carbamoyl/nitrile hydrogen bonds in (1), (2) and (4) [N...N= 2.936 (2)-3.003 (3) Å, mean 2.977 (2) Å], providing a gradual evolution of the hydrogen-bonding pattern. A hierarchy of the synthons involving three different groups could be applicable to supramolecular synthesis with polyfunctional methanide species, suggesting also a degree of control over layered and interpenetrated hydrogen-bonded networks.