Shadow && cavity shader (CC 3.5.1)

Has anyone done this effect, and if so, could you give an example:

In CC it looks like this:

Thank you!