It’s hard to imagine former congressman Barney Frank saying something shocking. After all, we’ve come to expect bluntness — frankness, if you will — from the Massachusetts Democrat.

But he drew a few audible gasps recently when he declared he wanted Massachusetts Gov. Deval Patrick to name him to temporarily fill the Senate seat that will be vacated when Sen. John Kerry becomes secretary of state. “Coach, put me in,” he pleaded last month during an appearance on MSNBC.

Such public campaigning for the Senate seat flouts the ironclad rules governing the behavior of those seeking political appointments and nominations. Chief among the code of conduct for would-be candidates for plum jobs is the edict “Thou shalt not appear to want the job.”

The key word there is “appear.”

“It’s like how people courted in the Victorian era, where you’re doing everything possible — in public — to show you’re not interested, while feverishly working behind the scenes to make it happen,” said Chris Lehane, a political consultant and former aide in the Bill Clinton White House.

Gov. Patrick and Congressman Barney Frank chat on Jan. 5. (Boston Globe/Getty Images)

And since plenty of jobs remain up for grabs in President Obama’s second term — from Cabinet secretaries to deputy undersecretaries to ambassadorships to spots on lowly advisory boards — the Loop figured it’s a good time to go over the rules of the road.

First, get those skeletons out of the closet pronto, says Tom Korologos , who shepherded many a nominee of Presidents Ronald Reagan and George Bush I through the thorny thicket to confirmation. It may sound risky, but if anyone from the White House or a surrogate comes sniffing around, immediately disclose anything in your past that might prove embarrassing to the president (or whoever is doing the appointing), he instructs. “As sure as God made little green apples, it’s all going to come out,” he said.

Then, once you’re on a list, it’s your public behavior that counts. Discretion isn’t just the better part of valor, experts say — it’s the whole thing. Lehane says it’s best to avoid talking to the press altogether (though it pains the Loop to pass on this advice).

Watch what you say, even to your friends. And watch what your spouse says. Don’t talk about getting the job.

And nix your own opinions. Cancel any public speaking engagements, or other events, that might put you at odds with your would-be new boss. Use any others to help out. It can’t hurt to run any upcoming TV appearances or speeches by the White House and ask if there’s anything you might emphasize that would be helpful to the president, Lehane advises. “Say you’re planning to describe him as a ‘unique combination of Abraham Lincoln, FDR and Mother Teresa,’ and to please let you know if they think you’ve understated it.” Subtle stuff.

The trick is to enlist friends to do your dirty work. They can make calls to the president or to senior-level staff with whom they might have relationships, or to senators, if the job requires that chamber’s okay.

But play it cool, especially in this administration, cautions one former Clinton and current Obama appointee. Letting pals do the talking is the way to go, because even a whiff of publicly craving a spot is a no-go, the appointee says.

After all, the president is still known as “no-drama Obama.”

Kerry sets the table

Sen. John Kerry and wife Teresa Heinz Kerry — the ketchup heiress — have agreed to divest holdings in nearly 100 companies, including oil and weapons companies and Cenovus Energy, a Canadian company that would benefit from the proposed Keystone XL pipeline, the Boston Globe reported Wednesday.

The agreement with the State Department’s ethics office is to guard against possible conflicts of interest if, as expected, the Massachusetts Democrat is confirmed as secretary. (The department must approve or reject the pipeline because it crosses an international boundary.)

As secretary of state, Kerry would, of course, have much more to do with U.S. foreign policy than he does as a simple chairman of the Senate Foreign Relations Committee.

Meanwhile, Kerry not only did not chair the Benghazi hearing Wednesday with Secretary of State Hillary Rodham Clinton, he did not even attend it. Kerry’s confirmation hearing is set for Thursday.

On the AfPak front

Marc Grossman , former U.S. special representative for Afghanistan and Pakistan, is back at his job as a vice chairman of the Cohen Group, the powerhouse consulting firm.

Grossman, a career diplomat, former ambassador to Turkey and undersecretary of state for political affairs, returned to Foggy Bottom to take the AfPak job 22 months ago, shortly after diplomat Richard Holbrooke’s death in December 2010.

Grossman’s departure, and the earlier departures of some of the initial team’s superstars, such as Vali Nasr and Rina Amiri , doesn’t mean the interagency team is disappearing, we were told.

Grossman’s deputy, David Pearce, a former ambassador to Algeria who spent a year in Afghanistan as deputy to then-Ambassador Ryan Crocker, has taken over as acting special rep.

We’re hearing that secretary-designate John Kerry is likely to keep the special-rep position going until the transition in Afghanistan in December 2014.

With Emily Heil

The blog: Twitter: @InTheLoopWP.