Want to build a company as dynamic and dominant as Facebook? According to Mark Zuckerberg, the way to do that is to take the way you think about hiring and turn it upside down.

During a public Q&A session in Barcelona Wednesday morning, the Facebook founder and CEO, when asked about how he attracts top talent, revealed the simple but counterintuitive rule of thumb he uses to keep so-so candidates from slipping through his filter. 

"I would only hire someone to work directly for me if I would work for that person," Zuckerberg said. "It's been a pretty good heuristic for me." He name-checked Sheryl Sandberg, Facebook's COO, as a perfect example of someone he'd be happy to report to "if Facebook disappeared and I had to find something else to do." 

Every organization needs a deliberate strategy for screening out less-than-stellar candidates, because most companies, especially ones that are growing, have more work they need done than they have people to do it, he said. "Maybe you could compromise on quality today and get a little more work done over the next six months," but companies that do so will live to regret it.

Hence Zuckerberg's only-hire-someone-you'd-work-for law. "This rule has served me pretty well," he said. "I think as long as you have that as your rule for picking the people you work with, you're not going to go wrong."