How can Lucina use Shield Breaker directly from holding onto a ledge?

I'm going to guess that you mean something like this (if you don't, let me know and I'll delete/rewrite this answer):

Lucina Neutral Special Getup

Before we talk about this, I want to quickly go over your options when you're on ledge. You have 4 of what I'll call "preset" options.

Preset getup options

  • Neutral getup (press toward stage on the control stick)
  • Roll getup (press shield)
  • Jump getup (press jump or up on the control stick)
  • Attack getup (press the attack or special button)

In that order for Lucina, those look like:

Lucina All Getups

I call these "preset" because they're as simple as pressing a single button and having an action come out. However, there's one other option to getup from ledge.

Drop getup

A drop getup is accomplished by letting go of the ledge and then using your second jump in the air to get back onto stage. Since you're using your jump, you can act immediately with a move.

You can let go of ledge by either pressing down on the control stick or by pressing sideways away from stage. Personally I've found that I hold down a little too long and so I make myself fall faster, so I prefer to hold away from stage. So that first gif was done with the following inputs:

Lucina Slowmo Getup

A word of caution

Since you're dropping off ledge, you can act immediately and come out with whatever move you want. This allows for a lot of versatility and you may find yourself tempted to do this often. However, this option is extremely dangerous.

Every "preset" option will give you frames of intangibility, where you can't be hurt or grabbed by the opponent. But with a drop getup, the second you let go of ledge, you're vulnerable. And worse, you're planning on using your second (and for most characters, last) jump almost immediately. If your opponent can guess that you'll do this and they time a punish, you'll suddenly be way off-stage without a second jump and likely dead very early in your stock.

That being said, as a mixup option the versatility of drop getup can allow you to catch opponents off-guard and setup for some stylish game-finishing combos even if you're behind making it hard to resist trying sometimes despite the risks:

enter image description here