President Donald J. Trump stops to talk to reporters and members of the media as he walks from the Oval Office to board Marine One on the South Lawn of the White House on Thursday, Sept 12, 2019 in Washington, DC.

President Donald Trump's behavior can be so erratic that most top administration officials have pre-written resignation letters ready to submit, an anonymous author claiming to be a senior official in the Trump administration says in a book scheduled to be published this month.

To complicate matters, the president's decision-making abilities are getting worse with time, according to excerpts of "A Warning" that were obtained and read Thursday night on MSNBC's "The Rachel Maddow Show."

The author, described only as "a senior Trump administration official," is the same person who wrote an op-ed in The New York Times last year headlined, "I am part of the resistance inside the Trump administration." The column said "many of the senior officials in his own administration are working diligently from within to frustrate parts of his agenda and his worst inclinations."

In the book excerpts, the author describes near-daily "five-alarm fire drill" that leads senior officials to cancel plans and race to the White House to intercept Trump before he can enact his latest "wacky or destructive idea."

"Staff throw up the Bat-Signal, calling a snap meeting or a teleconference. 'He's about to do something,' one warns the group, explaining what the president is about to announce.

More from NBC News:

Justice Department seeks info on 'Anonymous' author of soon-to-be-published insider book

Trump wants whistleblower to do what he wouldn't: Answer questions in person

Poll: Half of voters have already decided against Trump in 2020

"'He can't do this. We'll all look like idiots, and he'll get murdered for it in the press,' another exclaims.

"'Yeah, well, I'm telling you he's going to do it unless someone gets to him fast,' the first warns. 'Can you cancel your afternoon?'"

As Trump's presidency has progressed, his officials have been given increasingly less notice of the president's decisions, says the author, who writes: "He's less inclined to preview his decisions today."

The author writes that even Trump's own family isn't immune to his whims.

"It isn't beneath him to attack his own family members, too. 'Jared, you don't know what you're talking about, okay? I mean seriously. You don't know," the book quotes him as saying.

"Seeing this type of behavior was both educating and jarring to the burgeoning Steady State. It was a visceral lesson that we weren't just appointees of the president," according to the excerpts. "We were glorified government babysitters."

Trump has called the writer "gutless" and has questioned whether the person really exists.