Detection of dense communities has recently attracted increasing attention within network science and various metrics for detection of such communities have been proposed. The most popular metric - modularity - is based on the rule that the links within communities are denser than external links among communities. However, the principle of this metric suffers from ambiguity, and is based on a narrow intuition of what it means to form a "community". Instead we propose that the defining characteristic of a community is that links are more predictable within a community rather than between communities. In this letter, based on the effect of communities on link prediction, we propose a novel metric for community detection based directly on this property. We find that our metric is more robust than traditional modularity measures for each specific algorithm. Finally, we provide a measure of the improvement offered by our metric.