Replace/Add Feature for kerning

Hello. I am trying to write the kern feature manually (with just one lookup). For this, I need to replace the code in the kern feature with my own code. Instead of adding a kern feature with code for each instance and then export each instance separately (activate only one instance, edit the code in kern export, activate only next instance, repeat…), I would like to add this code to each instance as a custom parameter.

So far, neither Add feature nor Replace feature have worked. Why is this? Any way I can do this? Thanks!

The “Add Feature” works for me in 3.2. But it will also add the default kerning.

I had a look and I think I improved it. If you add a # Automatic Code in your code (either at the beginning or end), you get both, the manual and the automatic code. Without it, only the manual code.