WASHINGTON — When a new White House chief of staff takes over, the smart ones check in with James A. Baker III, the only man to have occupied the office two different times for two different presidents and who is widely considered to be the gold standard.

Mr. Baker has plenty of advice from running the White House during Ronald Reagan’s first term and again at the end of George Bush’s presidency, but it usually boils down to this: “You can focus on the ‘chief,’ or you can focus on the ‘of staff.’ Those who have focused on the ‘of staff’ have done pretty well.”

On Monday, as John F. Kelly takes over Mr. Baker’s old corner office with the fireplace and patio, he assumes probably the hardest job in Washington other than president. Any chief of staff must find the tricky balance between serving the president and managing the building, between being an adviser and being a boss — tasks all the more challenging in President Trump’s faction-filled White House.

Mr. Baker’s advice is aimed at those who become too full of themselves, acting as a quasi prime minister, as his successor Donald T. Regan did before making the fateful mistake of hanging up the phone on Nancy Reagan. Reince Priebus, tossed aside by Mr. Trump on Friday after six months, faster than any chief has been pushed out before, may have gone too far the other direction. He never fully gained control over the West Wing, presumably because he was never empowered to do so.