EAST BERLIN (AP) _ The two Germanys are increasingly preoccupied with the skeletons in their closets just three weeks before they move into the same house.

East Germany's interior minister said in an interview that both nations are still spying on each other, and West German lawmakers are split over a plan to grant amnesty to former East German spies.

A top West German official was quoted today as saying 3,800 East German spies are still active in West Germany, with many eluding detection and some going to work for the Soviet KGB.

Meanwhile, activists and politicians are trying to keep secret files maintained by the East German intelligence service from being turned over to the West German intelligence service.

The hand-wringing over espionage has been increasing as the Oct. 3 date of German unification moves closer. German media generate stories daily about double agents, infiltrations and the notorious deeds of East Germany's former Communist secret police.

The two nations that were once the front line of the Cold War also comprised perhaps the biggest arena for East-West espionage.

East German Interior Minister Peter-Michael Diestel raised the debate another notch Sunday when he was quoted as saying that West Germany still has moles in East German ministries.

Diestel also said there are ''quite a lot'' of East German spies in Bonn, the West German capital, and that it was time for both countries to ''switch off their surveillance.''

Lutz Stavenhagen, who coordinates anti-espionage policy for Chancellor Helmut Kohl, denied that West Germany was still spying on East Germany, the Cologne newspaper ''Express'' reported today.

But Stavenhagen said the Soviet Union had been trying to recruit East German intelligence agents working in West Germany. He characterized most of the estimated 3,800 agents as unimportant, according to the paper.

Diestel, meanwhile, has come under renewed fire by East German activists for keeping scores of former Communist secret police agents on his payroll.

Some of the activists who helped oust the Communist government last year have occupied the former headquarters of the East German secret police.

They are demanding that former agents be purged from the democratic government and that ordinary East Germans get to see the files that were kept on them by the once-feared domestic intelligence unit.

They also are demanding that the records not be turned over to the West German intelligence agency.

''The one thing we don't need is the records going from one secret agency to another secret agency,'' said Hans Schenke, one of about 22 activists who have been occupying the headquarters of the secret police since Tuesday.

Two weeks ago, the East German Parliament threatened to reject a treaty laying the foundation for German unity unless West Germany allowed the files to remain in what is now East Germany. The all-German parliament that takes over after unification will decide what should be done with them.

In West Germany, political parties are feuding over a plan to grant amnesty to many of the East German spies in West Germany.

Lawmakers in the past several days have been debating a proposal by the West German Justice Ministry that would grant amnesty as long as the operatives were not involved in murder, blackmail or other nefarious activities.

But politicians have been unable to decide how broad the plan should be, whether it should include West Germans charged with treason or West German peace disarmanent activists who may have been East German secret police operatives.