I find Kled beats both yas and Riven pretty easily, though there's a smaller room for error against Yas since he can carry games. Now Kled IS my favourite top laner by far, so I do feel confident about the answers I have. Since you only named those two specific match-ups though, I'll keep them in mind specifically.
First, some general tips:
Through personal experience, Press The Attack is Kled's best rune. He can get all 3 autos up very quickly and doing so applies more damage in a trade. Conqueror is nice against tankier team comps, but most of the time, you'll get more value in trades and duels with PTA. Idk what you use for secondary runes, but I go with the popular bone plating and demolish runes to survive burst easier and be better rewarded for pushing someone out of lane.
For items, Kled does have some tempting options, but
and
are always the two you need before all else. Hydra gives you much needed wave clear and an AA reset, and Cleaver just gives you everything Kled needs. Literally everything. Still, Tiamat is very helpful early on, so even if you plan to complete Cleaver first, you should at least build Tiamat first.
Other items you build are often based on what you feel you need, but remember that Kled is damage dealer that wants to survive. If you give him a tank item, it's because you want that very specific tank item to deal with a specific problem (Like Omen if 3 enemies have crit for some reason), and if you're giving him damage, it's still a damage item that helps him not, like GA or Death's Dance. Just to name a few (possibly bad) examples.
Now, no matter what you're up against, you will lose Skaarl sometimes. It'll take time to get him back unless you go HAM and attack the enemy champion, which isn't always the best idea. When attacking the enemy in this state, consider: The damage they can do to you, the CC they may apply, the possibility of getting ganked, if your wave is pushed enough to recall, and how much courage you currently have build up. I also suggest to ALWAYS have at least one charge of pocket pistol ready in case THEY choose to fight you.
Now for playing Kled against Yasuo:
This fight mostly favors you, but Yas does have the damage advantage at level 1. His Q can poke you several times at lvl 1, and you'll usually want your own Q at lvl 1. Your level 2 and 3 however turns that around. Once you're at level 3, you can do moe bullshit whenever you want. The usually trade often involves dashing in (E), landing your beartrap on him (Q) before he can even think about using his windwall, then you can make your 3 stabs on him, and once or before your beartrap pulls him in, back off. If you have the time and position, you can back off with your second dash.
This all in attack makes for a very hard hitting trade, but until your cooldowns come back up, you have to respect Yas again. He won't burst you down without his ult, but he can still do consistent pokes. Avoid those pokes, predict his own movements (which is much more linear than you would think), and find the right time to make those all in trades. As long as you don't die from these fights and stay on equal footing as the Yas, you'll still be in a good position to win a trade or fight.
Kled against Riven:
Here, you actually have the lvl 1 advantage, assuming you did pick PTA. Riven's damage is in the form of quick little bursts from her Q, where as a lot of your own damage is from consistent basic attacks. Still start with your Q though, since that's CC and damage in it's own right. Her CC is very short, so it won't stop you from attacking for long, but it can be enough to let her back off before you trade back. But if your own cooldowns are ready and you can dash In on her, even if she tries to run off, you can still chase after and punish her for being too aggressive.
Riven at level 6 is when things get harder, as her ult adds more dueling power than Kled's, which is better for starting or retreating from a fight than it is at helping the actual fight. Much of what I said before still applies, but she can now juice herself and add an actual finishing move to kill you when you lose Skaarl. At this point of the game, you either keep fighting because her death is guaranteed anyway, or retreat before she can knock you off of Skaarl, as she can otherwise finish you off if her R is ready to e used.
Well, I hope you enjoyed my book. Feel free to ask anything I may have not covered.