SAN FRANCISCO — When Tim Miller, a longtime Republican political operative, moved to the Bay Area last year to set up a public relations shop, he brought with him tradecraft more typical of Washington than Silicon Valley.

He was well versed in opposition research — the pursuit of damaging intelligence about a political enemy. He had ties to online media provocateurs. And, above all, he understood the value of secrecy.

Mr. Miller had arrived at the right moment with his company, Definers Public Affairs. With customers and lawmakers questioning the avowed good intentions and power of tech’s biggest companies, Facebook and others were on the defensive.

Definers quickly found plenty of business, from start-ups like Lyft, Lime and Juul to giants like Facebook and Qualcomm, the influential chip company that was in a nasty legal fight with Apple over royalties, according to five people with direct knowledge of Mr. Miller’s work who declined to be named because of confidentiality agreements.