Add an item in context menu for subcollections

How?

Which context menu?

To do what with the sub-collections? Go to them? Add files to them?

Well, I mean... When I right click a folder o a file in a normal lister I get a menu with several option. Between them I use very often an option added by DBPoweramp for convert an audio file to another format. I'd like to add this option to the files inside a subcollection or to the subcollection itself.
Hope this clarify my needs. Thanks.

Your question suggested that you were seeking a generic solution. Given that different software works in different ways, you may be out of luck.

Does PowerAmp have a "bulk process" command line that can handle a bunch of files, rather than one?

My guess is that you will need something like that to persuade it to weave its magic on several files.

So spend a bit of time looking at what is possible with the software you want to invoke. Then perhaps you can pose a question that make more sense.

If you expect someone else to do the homework, it may take some time, unless there is someone out there who has already tried this.

You can add items to the context menu for files within collections (which also includes the usual context menu items for those files) but not for the collections themselves.

Part of the problem would be that Opus cannot call a program like DBPowerAmp and give it the collection name as an argument since nothing other than Opus knows what a collection is or how to enumerate its contents. You can right-click a normal folder (or the individual files within a folder or collection) since DBPowerAmp (etc.) understands how to deal with that, but collections are an Opus invention which other programs don't know about.

In theory Opus could pass the list of files to the external program when a collection was right-clicked, as if the files themselves had all been selected and right-clicked, but that isn't done right now. Thinking about how it works at the moment it'd require some special coding to make that happen but I guess it would be possible.