Embattled city Comptroller John Liu’s former press secretary is poised to testify that she sought illegal “straw donations” for his mayoral campaign from her family and friends, prosecutors revealed in court this morning.

Sharon Lee would be forced to admit the alleged wrongdoing under terms of an “immunity order” that would keep her safe from criminal charges, Manhattan federal prosecutor Justin Anderson said.

But the judge who’s needed to sign off on the deal appeared skeptical that the proposed testimony will be admissible in court.

Lee — since promoted to a higher post in the Comptroller’s Office — allegedly promised to reimburse donations to Liu’s campaign to help meet a goal of raising $1 million during the contribution cycle that ended in July 2011.

Anderson said Lee made the offers during phone calls that “took place either inside or just outside” the Queens apartment of Jia “Jenny” Hou, Liu’s campaign treasurer at the time.

Hou and a key Liu fund-raiser, Xing Wu “Oliver” Pan, face trial next week on charges that they schemed to defraud the city of campaign matching contributions by funneling illegal donations into Liu’s war chest.

Lee’s role in the alleged scam came to light after Hou’s lawyers quietly asked the judge to block her testimony on grounds that it’s not relevant to the charges against Hou and Pan.

In court today, defense lawyer Sheryl Reich said that while one person Lee contacted made a donation, there was no reimbursement and Lee “never discussed this with Ms. Hou.”

Anderson noted that Lee’s calls were apparently made the same day that Hou allegedly solicited a straw donation from a former boyfriend, and that Lee’s testimony would provide evidence “not just against Ms. Hou,” but also of a larger “scheme and conspiracy.”

He conceded, however, that Lee isn’t expected to say who “instructed” her to make the calls.

After Judge Richard Sullivan questioned how Lee’s testimony prove a conspiracy with Hou if there wasn’t a “coordinated effort” between them, Anderson said it would allow jurors to “infer” that there was a secret agreement in place.