I must be doing something wrong
Yes, you called the method wrong.
Firstly, it is called "skill_type_sealed?()" not "skill_type_sealed()". Next, as Roninator said, it requires an argument to be passed into the parentheses. But there's also another thing.
As I mentioned, the method does not belong to Window_ActorCommand class - it belongs to Game_Actor (or, well, its superclass Game_BattlerBase, but Game_Actor inherits all the code in it anyway).
So going back to the example of calling methods during a Script Call, whenever you type code to do a Script Call, the class that tries to execute the Script Call is actually Game_Interpreter. So whenever you call a method like " add_actor()" in a Script Call it actually tries to look for it in Game_Interpreter and since "add_actor()" does not exist in Game_Interpreter, just typing something like "add_actor(1)" alone will throw an error. "add_actor()" belongs to Game_Party and needs to be called from Game_Party or an instance thereof.
This is why the proper Script Call is "$game_party.add_actor(whatever actor ID)" and not just "add_actor()". $game_party is the name of the variable that contains the Game_Party instance (variables preceded with "$" can be accessed from any class, while variables preceded with "@" can only be accessed in the class they were declared in - if there's no symbol at all in front of it, it can only be used in the individual method they were declared). So this Script Call is telling Game_Interpreter to run Game_Party's add_actor() method.
Similarly, "skill_type_sealed()" belongs to Game_Actor. You need to call it from the actor object, in the same way that this line of code is calling from the actor:
Ruby:
@actor.added_skill_types.sort.each do |stype_id|
...
...
end
What this line of code means is:
1. Call the method "added_skill_types()" from the Game_Actor class contained in the "@actor" variable. This returns a list of the actor's available skill type IDs.
2. Call the "sort()" method from the result generated by the previous method call. The list of IDs is called an Array, and "sort()" is a method belonging to the Array class. This sorts the IDs from smallest to largest.*
3. Call "each" from this sorted array ("each" is another method belonging to the Array class). What this does is run through the sorted Array - for each ID in the array, temporarily assign the current ID being processed to a variable called "stype_ID" and then run all the code inside the "each do" block, doing it over and over as many times as there are items in the array.
Knowing this will be enough to tell you which variable you should call "skill_type_sealed?()" from and what variable to put in as the argument.
And before you say it, yes, this kind of method calls within method calls within method calls can make your head spin but that's what a programming in a language like Ruby tends to typically be like.
*If you're wondering what the point of sorting the list is - it makes it so the commands for the skill types appear in the window in the same order as they are listed in the Terms tab in your Database. Without sorting, they would instead appear in the order that they were added onto the Features list of the actor and their character class (all actor Features will get listed first, then all class Features). I.E without sorting, if you gave Eric the "Magic" skill type under his actor's Features list and then "Special", the "Magic" command would show up first on the window before "Special". With sorting, "Special" appears first in the window because it has a lower ID in the Terms tab (#1 while Magic is #2), even if Magic has been added higher up on his Features list, earlier than Special.