A former staffer to ex-Defense Secretary James Mattis James Norman MattisBiden courts veterans amid fallout from Trump military controversies Trump says he wanted to take out Syria's Assad but Mattis opposed it Gary Cohn: 'I haven't made up my mind' on vote for president in November MORE called President Trump Donald John TrumpFederal prosecutor speaks out, says Barr 'has brought shame' on Justice Dept. Former Pence aide: White House staffers discussed Trump refusing to leave office Progressive group buys domain name of Trump's No. 1 Supreme Court pick MORE’s approach to foreign policy “not helpful,” saying the president is “shooting himself in the foot” by going on Twitter.

“President Trump is basically putting his revolver out of his holster and shooting himself in the foot,” retired Navy Cmdr. Guy Snodgrass, who served as Mattis's speechwriter and communications director, told Hill.TV on Monday.

“You’ve been working with your allies and partners to fulfill some of this policy directives and then suddenly a tweet comes out that undermines months and months and months of planning," he added. “That is not helpful to the American public. It’s also not helpful to our nation or to his own policies he’s trying to enact.”

Snodgrass didn’t point to a specific example, but Trump has repeatedly taken to Twitter to weigh in on a number of pressing foreign policy issues over the course of his presidency.

Over the summer, he tweeted amid escalating tensions with Iran that an attack on "anything American" would be "met with great and overwhelming force." The threat appears to have been in response to Iranian President Hassan Rouhani calling the White House "mentally retarded" in the wake of fresh sanctions targeting the leader.

Snodgrass is currently on tour promoting his new tell-all memoir, "Holding The Line: Inside Trump's Pentagon with Secretary Mattis.”

A White House spokesperson didn't immediately respond to Hill.TV's request for comment.

—Tess Bonn