How to not to attach to the vinaya? I feel very guilty when I break the vinaya / shila. Now it became a couse for suffering. Some times I feel very bad about people who not follows vinaya.
How do I get out of this ? How to follow vinaya without attaching to it ?
We can derive some clues about how to deal with kukkuca, if we look at its characteristics:


It is a mental factor (cetasika)
It is one of the five hindrances (nivarana) during meditation
It is originating from aversion (dosa)


https://www.wisdomlib.org/definition/kukkucca

Seeing as it is considered a cetasika, we can try to still it during meditation, and proceed to investigate them mindfully as with any mental factor.


  And what is lack of food for the arising of unarisen restlessness &amp; anxiety, or for the growth &amp; increase of restlessness &amp; anxiety once it has arisen? There is stillness of awareness. To foster appropriate attention to that: This is lack of food for the arising of unarisen restlessness &amp; anxiety, or for the growth &amp; increase of restlessness &amp; anxiety once it has arisen.


The fact that it is based in aversion, means that we can dilute the karmic effect of the aversion by practicing metta bhavana, not least towards those who struggle with the precepts/vinayas.


  And what is lack of food for the arising of unarisen ill will, or for the growth &amp; increase of ill will once it has arisen? There is awareness-release [through goodwill, compassion, empathetic joy, or equanimity]. To foster appropriate attention to that: This is lack of food for the arising of unarisen ill will, or for the growth &amp; increase of ill will once it has arisen.


https://www.dhammatalks.org/suttas/SN/SN46_51.html