We quote the Shevet Mishor: "We can explain that Yaakov chose the word שמרתי, 'I guarded the mitzvos' instead of קיימתי, 'I kept the mitzvos', because Yaakov thought that Eisav wouldn't believe him when he tells him that he kept all 613 mitzvos. Eisav would say, 'How can one live in Lavan's house and not be influenced by his ways?' Therefore, Yaakov hinted to Eisav the technique he used to be protected from aveiros. He explained that he would erect safeguards and boundaries around each mitzvah and obligation. If he will be tempted to transgress an aveira ch”v, he will only transgress the boundary, and not the mitzvah itself. This is the meaning of שמרתי מצות ג"תרי, 'I guarded the 613 mitzvos.' He meant that he erected safeguards. He said שמרתי, which is from the word משמרת, as it states (Vayikra 18:30) ushmartem et mishmarti, and Chazal (Yevamos 21) say that this means, 'Make safeguards for the Torah.' In this manner, I didn't learn from his evil ways."
Reb Yehudah Tzadka zt'l told a mashal, using the concept of a חשוד חפץ, a suspicious item. (This occurs when someone leaves a box, suitcase, bag, etc. on the street, and it is suspected that perhaps it contains explosives and was left there by a terrorist.) The police block off the streets around the threat, and everyone has to stand very far away... in case there is a bomb there. This is an example of how distant we must keep ourselves from aveiros, or even a possible aveirah.
A hint to this is in Rashi (32:5) on the pasuk im Lavan garti, "I have lived with Lavan." Rashi writes that גַּרְתִּי is gematria ג"תרי. Yaakov was telling Eisav, "I lived with the rasha Lavan, and I kept the Taryag mitzvos, and I didn't learn from his bad ways." Yaakov was humble. Why did he say this? He was telling Eisav, "Listen, my brother: Even now, when I am making peace with you, I will not tarnish my neshamah and my kedushah for your sake. When I was in Lavan's house, I maintained my kedushah, and I didn't learn from his bad ways. This is because I am not a regular person. I will never copy your ways."
This is a lesson in the path of vigbah libo, to have gaavah d'kedushah, to have an inner pride, and to refuse to lower oneself to resemble the lower ways of others.
Another hint to this is the pasuk (33:18) vayavo Yaakov shalem ir Shechem vayichan et penei ha'ir, "Yaakov arrived intact at the city of Shechem... and he encamped the face of the city." The Netziv says that penei ha'ir "face of the city" means that he dwelled outside of the city. He didn't live within the city because the people of Shechem were corrupt and sinful. Yaakov Avinu preferred to live alone, rather than to become chalilah influenced by the goyim.
Yaakov Avinu said (32:5-6) im Lavan garti... vayehi li shor vachamor, "I lived with Lavan... I have acquired oxen and donkeys...". A man once said to the Brisker Rav that Yaakov was explaining to Eisav how he was able to maintain his kedushah and to perform the 613 mitzvos, even when he lived with Lavan. It was because he considered Lavan and his friends to be like shor vachamor, animals. No one desires to copy the ways of animals, and he, too, didn't want to copy the ways of Lavan and his friends. The Brisker Rav praised the vort (adding that although this isn't the meaning of the pasuk, the advice is correct. Just as one wouldn't want to emulate the ways of animals, one shouldn't desire to emulate the ways of resha'im).