Not all RPG systems are suitable for all adventure types at all levels. It can be tempting to design an adventure, especially for a high level or well equipped party, and place artificial restrictions on the party in order to make the adventure "work." This is to be avoided if at all possible. The characters, and their players, have earned their abilities and equipment and they should not be removed without a great deal of reflection.
Fantasy wizards, at mid to high levels, have an amazing slew of abilities at their disposal. They can detect alignment. They can read minds. They can pass through walls. Imagine attempting to design a dungeon to handle someone like this, someone who can dissolve stone in order to tunnel between rooms, avoiding all of those hallway traps you placed. Or an investigation adventure in which the party can read minds, talk to the dead, and detect alignments and deceit. It can be tempting to limit these powers. Amulets of Immunity to Detection. Wish spells cast on the dungeon walls to prevent tunnelling through them. I'm sure the analogues in other adventures are obvious, such as spaceships with hulls that sensors can't scan, or Yet Another Computer Malfunction. These are among the hallmarks of a poorly designed adventure.
Generally this means the adventure has been designed for the wrong power levels. If you want to keep the fantasy party from dissolving the walls through magic then the adventure should be written for a level range in which the party doesn't have access to that spell, or perhaps only one or so of that spell. Likewise, investigation adventures. If you don't the wizard running around casting speak with dead then write it for a level that speak with dead is not available. Turning to techniques such as "the spirit hasn't completed its travel to the afterlife" or other mechanisms to limit the spells, does nothing except communicate to the party hat their hard work was useless and can arbitrarily taken away at any time on a whim.
There are other techniques to turn to in order to solve these problems. Writing an adventure for a lower level party, or a party without as much equipment, is one technique. Another technique is to leverage the social element. The party COULD [speak with the dead, nuke the site from orbit, read minds, etc] but what are the social implications of that? Care must be taken to not punish the players for these actions, but rather have some natural follow-ons to nuking the natives of planet Cestus-9. Thus the players get to make a choice: limit themselves or accept the Easy button in return for some consequences later.
An analagous problem if with items use dbythe opposition. Thee's a tendency to create super powered that can only be used ... no, put that in magic items maybe?
And no, you can't give your skeletons amulets that make it harder for the party priest to command them to leave. Just because Gygax jumped off a bridge doesn't mean you should.
[Something about D&D being written for dungeons and the 4 hour workday and its applicablty in a footnote]