James Woolsey. Photo: David Hume Kennerly/Getty Images

Shortly after Donald Trump’s victory, former State Department official and “Never Trump” Republican Eliot A. Cohen called on young conservatives to serve in the new administration — while keeping undated letters of resignation at the ready.

Five days — and one interaction with the Trump transition team — later, Cohen withdrew that advice.

“The tenor of the Trump team, from everything I see, read and hear, is such that, for a garden-variety Republican policy specialist, service in the early phase of the administration would carry a high risk of compromising one’s integrity and reputation,” Cohen wrote in the Washington Post. “The president-elect is surrounding himself with mediocrities whose chief qualification seems to be unquestioning loyalty.”

The last 24 hours have produced fresh evidence for Cohen’s thesis.

Until Thursday night, James Woolsey Jr. was one of the best credentialed members of Trump’s national security team. Woolsey is a former CIA director, veteran of four presidential administrations, and one of America’s leading intelligence experts.

And he has spent much of the past couple months as a senior adviser whose advice was never solicited.

“I’m not really functioning as an adviser anymore,” Woolsey told CNN, shortly after announcing his resignation from Trump’s transition team. “When I’m on the [television] screen, everybody announces that I’m a former CIA director and that I’m a Trump adviser and I’m really not anymore.”

In recent weeks, Woolsey had been boxed out of intelligence discussions between Trump and his national security adviser-designate Michael Flynn, and was taken aback by reports that the president-elect was planning to “pare back” and “restructure” the intelligence agency that he had once directed.

Woolsey, like the vast majority of Americans, was also, reportedly, unnerved by Trump’s Twitter habits. (A considerable number of the president-elect’s recent tweets have denigrated the intelligence agency that Woolsey once ran.)

Woolsey isn’t the only one who’s finding the job of “relatively sane national security adviser to Donald Trump” to be a challenging one.

Trump’s pick for secretary of Defense, retired general James N. Mattis, boasts a lengthy résumé of military service and a broad base of support on both sides of the aisle. But those virtues haven’t bought him all that much influence on Trump’s transition team.

The incoming administration is struggling to staff its Pentagon, as the president-elect’s team has refused to allow Mattis to hire “Never Trump” Republicans, the Washington Post reports. And that’s no small constraint — Trump spent most of his campaign painting the entire foreign policy Establishment as fools who have failed the American people, time and time again.

Whatever the merits of this assessment, it did not make the mogul the go-to choice for people with a lot of experience in national security. And that’s made it difficult for Mattis to find staffers who both meet his standards and please his higher-ups.

The conflict between Mattis and the transition team grew heated after the general learned from the news media that Trump had chosen Vincent Viola — an army veteran turned billionaire (can’t have too many of those, apparently) — for secretary of the Army.

“Mattis was furious,” one source close to the transition told the Post. “It made him suspicious of the transition team, and things devolved from there.”

Meanwhile, Trump seems to have given Michael Flynn more room to maneuver in staffing the National Security Council, where he has selected a series of intelligence officers he knows personally.

It’s too early to say with any certainty who among Trump’s motley crew of national-security advisers will have the most influence. But early signs suggest that Flynn has the firmest grip on the steering wheel. The former director of the Defense Intelligence Agency enjoys the distinctions of being one of Trump’s earliest supporters in the defense community, and one of the president-elect’s closest advisers, in the literal sense of the word — while Mattis will work out of the Pentagon, Flynn’s office will be right down the hall from Trump’s.

If Flynn does enjoy pride of place among Trump’s foreign-policy advisers, then one of the most powerful men in the world will be a conspiracy theorist who believes that “fear of Muslims is rational,” Hillary Clinton may have been involved in child sex trafficking, and the Mexican border is strewn with Arab-language signs that guide Islamists into our country.