We study a family of graph clustering problems where each cluster has to satisfy a certain local requirement. Formally, let µ be a function on the subsets of vertices of a graph G. In the (µ, p, q)-PARTITION problem, the task is to find a partition of the vertices where each cluster C satisfies the requirements that (1) at most q edges leave C and (2) µ(C) ≤ p. Our first result shows that if µ is an arbitrary polynomial-time computable monotone function, then (µ, p, q)PARTITION can be solved in time nO(q) , i.e., it is polynomial-time solvable for every fixed q. We study in detail three concrete functions µ (number of nonedges in the cluster, maximum degree of nonedges in the cluster, number of vertices in the cluster), which correspond to natural clustering problems. For these functions, we show that (µ, p, q)-PARTITION can be solved in time 2O(p) · nO(1) and in randomized time 2O(q) · nO(1) , i.e., the problem is fixed-parameter tractable parameterized by p or by q.