Abstract
We formulate diagrammatic rules for many-body perturbation theory which uses Kohn-Sham Green's functions as basic propagators. The diagram technique allows one to study the properties of the dynamic nonlocal exchange-correlation (xc) kernel fxc. We show that the spatial nonlocality of fxc is strongly frequency dependent. In particular, in extended systems the nonlocality range diverges at the excitation energies. This divergency is related to the discontinuity of the xc potential.