Install plugins only in dev or staging

Hi all,
we’ve set up three environments: development, staging and production.
Is there a way to tell composer to install some packages only in development or staging? Maybe also only dev should suffice. I hope this question has not been asked before, I’ve searched around a bit but found nothing. Thanks for feedback.

See here: Different plugins for different stages?

Thanks @cfx, I’ll check asap, should be fine.