Stanley S. Harris, a judge of the D.C. Court of Appeals for 10 years, was sworn in yesterday as the U.S. attorney for the District of Columbia.

U.S. District Court Chief Judge John Lewis Smith Jr. administered the oath of office to Harris, 53, who succeeds Charles F.C. Ruff. Harris was selected by President Reagan after a six-month search to replace Ruff, who was appointed in 1979, during the Carter administration.

Harris, a native Washingtonian, was in private law practice for 17 years until he was named to the D.C. Superior Court in 1971 by then-President Nixon. A year later, Harris was appointed to the local appeals court bench where he has been viewed as a powerful member of that court's conservative wing.

Associate Attorney General Rudolph W. Giuliani, representing Attorney General William French Smith, presented Harris with his official presidential appointment to the Washington federal prosecutor's office, which Giuliani described as the premiere U.S. Attorney's office in the country.

Harris, whose father Stanley R. (Bucky) Harris led the old Washington Senators to the 1924 World Series, will supervise 150 lawyers in the prosecutor's office. The U.S. attorney's office handles the vast majority of criminal cases in the District as well as civil litigation involving the federal government.

Following the brief ceremony in the federal courthouse, Harris accepted congratulations from local and federal court judges, members of his new staff and local officials, including Mayor Marion Barry and D.C. City Council member David A. Clarke (Ward l).