The stub and skeleton are produced by the rmic command line utility. "rmic" stands for "RMI Compiler", in fact.
It's possible that rmic is like a lot of other
Java utilities where the actual program is in Java enclosed in a shell wrapper and could be called directly from Java code, but that's only the first step towards getting IntelliJ to run it automatically.
A much easier way to do things is to use a tool like
Maven that has an RMIC plugin so that the total build process will include that step. Also, it's not a bad practice to use a batch builder like Maven or Gradle in any case.
IDE's are great for coding and debugging, but I learned the hard way that batch builders are less likely to break when you have an emergency build to do. Besides, IntelliJ should be able to run Maven for you, so literally using a command line becomes optional.