Nannies often see a family at its best — and worst.

And at the click of a social media account, they could unveil anything, from a photo of a screaming toddler to a tale of sparring spouses. Or worse.

Nondisclosure agreements used to be celebrity territory, but now some parents are folding confidentiality clauses into work agreements.

"In this day and age of social media, many families opt to include a nondisclosure [agreement]," said Michelle LaRowe at eNannySource.com and author of "Nanny to the Rescue!"

These days, unpleasant news is increasingly being made public, including affairs and indiscriminate behavior. And social media make leaks of whereabouts, finances and personal drama easier than ever.

Fran Walfish, a child and family psychotherapist, said confidentiality is normally slotted into agreements in Beverly Hills, Calif., where she practices.

The "stratospherically wealthy" and celebrities are most likely to use them, she said, pre-empting tell-alls about marital issues or revealing to paparazzi where a child might attend ballet class.

"They don't want anyone to know, for instance, if the family owns several properties or their own private jet," said Walfish, author of "The Self-Aware Parent."

But whether or not there's a Monet hanging over the fireplace, any family would be wise to exercise caution, she added, when it comes to someone who has the power to post where a child is.

"[Child] predators long for that information," Walfish said.

In fact, because of social media's reach, LaRowe said, more families are embracing restrictive language in work agreements, which the eNannySource website suggests all parents use. The website's list of items to consider in a work agreement suggests a directive not to use family photos or names in social media.

"Sometimes families opt to simply include a simple statement that prohibits the nanny from posting pictures or discussing the family whom they work for," LaRowe said.

Experts urge some type of written agreement, at minimum detailing responsibilities.

"We recommend that all families have a nanny contract that outlines everything from a work schedule and job responsibilities to confidentiality and compensation," said Katie Bugbee, senior managing editor of Care.com.

In the 2015 Nanny Compensation Survey from New York organization Park Slope Parents, 38 percent of parents said they included a confidentiality clause. In a sample work agreement on its site, a paragraph notes, "The employee may see or hear (or otherwise discover) information about our family. All information related to our family (household, financial, career) is expected to be kept confidential."

Parents might worry that such language feels cold or intimidating. But experts said that having things in writing is best for both parties.

"Creating a nanny contract minimizes miscommunication and makes disputes easier to solve amicably when they do pop up," Bugbee said.

For parents, Walfish suggests that a conversation with a caretaker include phrases like, "We are a private family, and what happens within our family we want you to keep private and not share with outsiders."

And they can add, "We would appreciate it if you never post photographs of our kids or families, or comment on the location or whereabouts or doings of our family members."

A family law attorney can help mold written language, Walfish added. And if a nanny posts a picture on social media of a child, she noted, "That, to me, is grounds for immediate firing.

"If someone did something that thoughtless and stupid, it's not thinking about the potential consequences of the child," Walfish said. "It's a symptom of poor judgment."