Darkling beetle larva, Mimopeus sp. probably M. opaculus
The darkling beetles are a large and diverse group, one of the largest beetle families. These beetles are dark in colour and somewhat resemble ground beetles. There are 139 endemic and 10 introduced species in New Zealand (Ward et al., 1999). The larvae of darkling beetles are known as "mealworms" or "false wireworms", Both adult beetles and larvae occur in dead logs, litter and in piles of plant debris. They feed on plant material.
The New Zealand native beetle Mimpoeus opaculus (fam. Tenebrionidae) is a large (~2 cm), dull-brown, flat oval beetle, commonly found in groups in dry well-decayed wood debris.
These large (5-6 cm long), shiny yellow-brown larvae occur in the same habitats as adults.
Thanks to Wikipedia for text and information: https://creativecommons.org/licenses/by-sa/3.0