Need to know what type of boat to offer any specific advice.
With a yacht that can sail/motor at 5 or 6 knots generally leave Cardiff about an hour or two before HW Cardiff.Wether you take the short cut through the Nash passage depends on how confident you are and if you can lock straight in to Swansea that day.
On big tides you sometimes need to anchor at Mumbles to wait for the tide to make a bit before you can lock in.In that case you may as well pass South of the Nash Sands and Scarweather sands then make your way into the Swansea Bay from the West Scarweather Buoy.
The Tawe and Marina locks arent 24 hrs so make sure you can get in before they close for the night
Swansea Marina does a very usefull booklet with loads of info re locking into the Tawe and Marina.I would phone and ask them to send you one beforehand.