
Chrysophylax |

It rarely comes up, but occasionally a vertical chasm, or underwater entrance etc. has an obstacle that makes it difficult for an Animal Companion to deal with.
Sometimes the problem is the animal companion just doesn't like the idea of going down a particularly smelly hole or fighting undead/aberrations.
In any case if the animal companion has to use an unfamiliar skill such as Acrobatics, Climb or Swim then the first thing you'll need to do is use the "Push" Handle Animal task on the animal. It's a DC 25 to do so.
When successful the animal will attempt the unfamiliar skill - remember some animals have limitations that others don't. A horse can not Climb a rope, but could conceivably Climb a steep and narrow path. Make the skill check as normal and play the consequences.
As the GM you're within your right to cause the animal to become uncooperative if there are two many failures (increasing the DC of the "Push" task by 2 points for each failed check) as the animal becomes discouraged and eventually refuses to follow its master. In which case it will likely wait for it's master patiently at the dungeon entrance.
Druids and Cavaliers have Animal Companions as but ONE aspect of their class. It's a powerful ability and as such comes with some limitations and role playing consequences (just as a Paladin's code does, just as a Cleric's alignment does).
In any case I hope you found the above helpful. It was all extrapolated from the Handle Animal skill. :)
In general, this seems excellent advice.
I'm willing to wave some things by, but a black bear (or similar comparatively small ursine) isn't one of them. Yes, it gives advantages -- but at a price. If I, as GM, am successful, that "price" will occasionally frustrate the player, but it will also give them opportunities to do their thing. It's also an "opportunity for roleplay," as we used to say, although that's about as comforting as saying, "This will be a great learning experience!"
One other thought, re: animal companions:
If the bear can't come in the dungeon, that's reasonable -- but make sure that you give the druid's player some particular way to shine, such as a wilderness encounter before the dungeon where the bear can be quite useful. It helps lessen the sting, while still presenting the gentle suggestion that forethought is a Good Idea when talking about a large, toothy animal.