President Donald Trump smiles as he speaks before a lunch...

President Donald Trump smiles as he speaks before a lunch with Senate Republicans in the Roosevelt Room of the White House, Tuesday, Dec. 5, 2017. Credit: AP

Under President Donald Trump’s style of management by public pillory, the FBI is getting its turn.

Once again an appointee of the president is walking back, spinning up, or breaking from Trump’s barbs against an institution he heads.

Trump wailed on Twitter over the weekend that the FBI’s standing is the “worst in history” and its reputation in “tatters,” though this will purportedly change.

So in a message to 35,000 agents and support staff, FBI Director Christopher Wray said he has been “inspired by example after example of professionalism and dedication to justice demonstrated around the bureau.

“We find ourselves under the microscope each and every day and rightfully so . . . Keep calm and tackle hard.”

Trump’s main motive for attack was really James Comey, Wray’s fired predecessor.

But Trump is the first president in recent memory to habitually denounce federal institutions and the people who run them, even when on his behalf. Sometimes it is as if he sees them as outside forces, like the legislature or the news media.

Trump has also delivered withering public criticism of Wray’s higher-up, Attorney General Jeff Sessions.

After a full season of “lock-her-up” talk about Hillary Clinton for crimes suspected or imagined, Sessions went before the Senate for confirmation last February.

“This country does not punish its political enemies,” he said. But Trump has continually cried out since for action against his defeated Democratic foe.

No agency got the same sideswiping as the CIA. Even before taking office, Trump complained: “Intelligence agencies should never have allowed this fake news to ‘leak’ into the public.

“One last shot at me. Are we living in Nazi Germany?”

Permanent bureaucracies take on lives of their own, their personnel having priorities that may not match the declared goals of any elected executive. But Trump and his inner circle have applied the more conspiratorial term, “deep state.”

Trump repeatedly has waffled on whether Russia sought to cause discord in U.S. elections last year and complained about new sanctions even after he signed them.

As if working for a different president, however, UN Ambassador Nikki Haley said in October that another nation interfering in U.S. politics “is warfare.”

“I find it fascinating because the Russians, God bless ‘em, they’re saying, ‘Why are Americans anti-Russian?’ And why have we done the sanctions? Well, don’t interfere in our elections and we won’t be anti-Russian.”

Haley hasn’t faced the kind of open personal scorn from Trump she drew when, as South Carolina’s GOP governor, she criticized him before ultimately endorsing him.

Secretary of State Rex Tillerson isn’t so shielded. Reports emanated from the White House last week that Tillerson — with whom Trump differed regarding North Korea and other crises — would soon be bumped and replaced.

When Trump nominee Neil Gorsuch faced confirmation for the Supreme Court in March, he was asked about the president’s efforts to degrade a “so-called judge” who ruled against the administration’s travel ban.

“When anyone criticizes the honesty or integrity of the motives of a federal judge, well, I find that disheartening. I find that demoralizing, because I know the truth,” Gorsuch said.

He was asked if “anyone” included the president.

“Anyone is anyone,” Gorsuch said.