Donald Trump is a rookie candidate — a potential superstar of vast promise, but making rookie mistakes. The nominee Republicans need for the fall campaign is often hard to make out amid his improvisations and too-harsh replies to his critics.

New Yorkers vote Tuesday. What to do?

Here’s how we see it.

Should he win the nomination, we expect Trump to pivot — not just on the issues, but in his manner. The post-pivot Trump needs to be more presidential: better informed on policy, more self-disciplined and less thin-skinned.

Yet the promise is clearly there in the rookie who is, after all, leading the field as the finals near.

Trump has electrified the public, drawing millions of new voters to the polls and inspiring people who’d given up on ever again having a candidate who’d fight for them.

That’s the work of the Donald Trump we know — a New Yorker, born and bred.

Trump is now an imperfect messenger carrying a vital message. But he reflects the best of ‘New York values’ — and offers the best hope for all Americans who rightly feel betrayed by the political class.

Trump is a do-er. As a businessman, he’s created jobs for thousands. And he’s proven how a private-sector, can-do approach can rip through government red tape and get things done.

These last 10 months, he’s ripped through a different morass — the nation’s stale, insider-driven politics.

And he’s done it by appealing to the public’s anger at a government that’s eternally gridlocked when it comes to serving the people — but always able to deliver for the connected.

He’s slammed the system for being rigged — and he’s right.

To those fed up with the rule of lobbyists and an insular political class, to those who’ve seen their government ignore their needs — seen it continually degrade the quality not just of their economic lives, but of their plaace in society — Trump offers hope.

But then there are those rookie mistakes.

Start with policies that seem made on the fly.

No, pulling US troops out of Japan and South Korea — and pushing both countries to go nuclear to defend themselves — is not remotely a good idea. American commitments may need rethinking — but careful rethinking.

Yes, controlling the border is one of Washington’s fundamental duties — but “Build the Wall” is far too simplistic a policy for a nation of immigrants.

By all means, get the best trade deals for America — but remember that trade means cheaper goods for the less well-off, and challenge US industries to improve.

Trump’s language, too, has too often been amateurish, divisive — and downright coarse.

But what else to expect from someone who’s never been a professional politician and reflects common-man passions?

Indeed, his political incorrectness is one of his great attractions — it proves he’s not one of “them.” He’s challenging the victim culture that has turned into a victimizing culture.

In the general election, we’d expect Trump to stay true to his voters — while reaching out to those he hasn’t won yet.

Trump is now an imperfect messenger carrying a vital message. But he reflects the best of “New York values” — and offers the best hope for all Americans who rightly feel betrayed by the political class.

He has the potential — the skills, the know-how, the values — to live up to his campaign slogan: to make America great again.

For those reasons, The Post today endorses Donald Trump in the GOP primary.