Skarpi is mentioned many times before appearing in the first Kingkiller book. He's mentioned as friend of Kvothe and as a companion of the Chronicler. But his only interactions with Kvothe in Wind are in chapters 26 and 28. In neither (as far as I can find) does Kvothe give his name to Skarpi. Yet at the end of chapter 28 when Skarpi is being arrested on trumped up charges of heresy, he uses Kvothe's name when telling him to run. How did he know it?
He has called him by his True Name.
In the universe of "The Kingkiller Chronicles", everything has a true name, and if you know how, you can command everything you know the true name of. That concept is explained in depth as part of the story Skarpi is telling before he calls Kvothe by his name:
In the midst of silence Lyra stood by Lanre's body and spoke his name [...] But Landre heard her calling. Lanre turned at the sound of her voice and came to her. From beyond the doors of death Lanre returned.
(The Name of the Wind, Chapter 26: Lanre Turned)
We do know that commanding something by using its true name, it simply sounds as the calling name of the thing. In other words, if you command the fire to do something, it sounds like you are simply saying "Fire", even though you said something else:
Dal hesitated for a moment, then smiled. He looked intently into the brazier between us, closed his eyes, then gestured to the unlit brazier across the room. "Fire." He spoke the word like a commandment and the distant brazier roared up in a pillar of flame.
"Fire?" I said. "That's it? The name of fire is 'fire'?"
(The Wise Man's Fear, Chapter 22: Slipping)
It's worth looking at what happens when Skarpi calls Kvothe by his name:
"You should run, Kvothe. [...] Head to the rooftops. Stay where they won't see you for a while. [...] There is nothing you can do here. Go."
Since he wasn't looking at me when he spoke, there was a moment of confusion. The Justice gestured again and one of the guards struck Skarpi a blow to the back of his head. [...] I slipped out the door, onto the street.
I took Skarpi's advice and was on the rooftop before they left the bar.
(The Name of the Wind, Chapter 28: Tehlu's Watchful Eye)
What is odd is that Skarpi told Kvothe to hide on the rooftops, in front of the very people he is hiding from. This makes more sense if Skarpi was talking to Kvothe in a language the others could not understand, the same as when Dal was talking to the fire in the other passage. The confusion was not because Skarpi was adressing some unknown person, but because he was saying something they could not understand.
Then if Skarpi did indeed talk to Kvothe using his true name, then how did he know it?
Though we see Kvothe calling the name of the wind with much difficulty and emotions involved, there are a few hints that getting the true name of something can be as easy as simply knowing it:
How can I say this so you understand? Saicere was a fine name.[...] It fit the sword like a glove fits a hand.
But it wasn't the perfect name. This sword's name was Caesura. [...] The name didn't fit like a glove. It fit like skin.
(The Wise Man's Fear, Chapter 125, Caesura)
This does not only apply to objects or elements, but also people:
Elodin looked back and forth between the two of us. "Auri?"
I waited for him to finish his question, but that sreemed to be all of it.
Auri understood before I did. "It's my name", she said, grinning proudly.
"Is it now?" Elodin said curiously.
Auri nodded. "Kvothe gave it to me." She beamed in my direction. "Isn't it marvelous?"
Eloin nodded. "It is a lovely name," he said politely. "And it suits you."
Later in the same chapter:
"Why did you pick that name for her?"
"Ah", I said, embarassed. "Because she's so bright and sweet. She doesn't have any reason to be, but she is. Auri means sunny."
"In what language?" he asked.
I hesitated. "Siaru, I think."
Elodin shook his head. "Sunny is leviriet in Siaru."
(The Wise Man's Fear, Chapter 11: Haven)
The implication is that Auri is not simply a nickname of sorts, but might her true name, or at least part of it. In case of Auri, it seems that something has happened to her that changed her nature in such a way that her old name no longer fits. She even says: "If your name is getting too heavy, you should have Kvothe give you a new one". We have seen a name change like this once before, with the change from Lanre to Haliax.
To sum it up, Skarpi is a skilled namer who knew Kvothes name by looking at him. He commanded him to leave and go to the rooftops, which he promptly did.
At that point in the story, Kvothe is an orphan running free in the city of Tarbean. The place where he often sleeps and helps around, though, is at the home of the priestly man called Trapis.
Kvothe suspects that Trapis might be Tehlin Priest. Scarpi is Tehlin Priest. More importantly, both characters tell stories to children and Scarpi is later arrested as a heretic during one of the storytelling sessions. Trapis is confirmed by Rothfuss in this interview to be a disciple of a schism of Tehlinism referred to as the Mender Heresies.
Basically, Trapis practically knows all the beggar children of Tarbean. He occasionally tells them stories and tells them when Scarpi is in town and telling stories to children.
It is never explained in the books how Scarpi knows Kvothe's name, but my guess is that he just asked Trapis. Their names are quite similar and I guess they might either be brothers by blood or brothers by faith. Both seem to be members of the same schism of Tehlinism.
Other theories are that Skarpi is really Selitos, the famous Namer and that he actually saw Kvothe's true name and so called him by it. The other theory is that Skarpi is really Taborlin The Great, another great Namer, and that he knows and sees true names of everyone.
Truth be told, we don't have confirmation of any of that and Kvothe is somewhat of an unreliable narrator.