If you have asked God for His Spirit and you walk in that Spirit you are righteous because of Him.
all of the works that you do are His works and not yours. If in deed you are displaying the power of His Spirit as His witness of you.
John 10
25 Jesus answered them, "I told you, and you do not believe. The works that I do in My Father's name, they bear witness of Me.
37 If I do not do the works of My Father, do not believe Me;
1 Corinthians 2
4 And my speech and my preaching were not with persuasive words of human wisdom, but in demonstration of the Spirit and of power,
5 that your faith should not be in the wisdom of men but in the power of God.
Galatians 5
16 I say then: Walk in the Spirit, and you shall not fulfill the lust of the flesh.
17 For the flesh lusts against the Spirit, and the Spirit against the flesh; and these are contrary to one another, so that you do not do the things that you wish.
18 But if you are led by the Spirit, you are not under the law.
19 Now the works of the flesh are evident, which are: adultery, fornication, uncleanness, lewdness,
20 idolatry, sorcery, hatred, contentions, jealousies, outbursts of wrath, selfish ambitions, dissensions, heresies,
21 envy, murders, drunkenness, revelries, and the like; of which I tell you beforehand, just as I also told you in time past, that those who practice such things will not inherit the kingdom of God.
all of the works that you do are His works and not yours. If in deed you are displaying the power of His Spirit as His witness of you.
John 10
25 Jesus answered them, "I told you, and you do not believe. The works that I do in My Father's name, they bear witness of Me.
37 If I do not do the works of My Father, do not believe Me;
1 Corinthians 2
4 And my speech and my preaching were not with persuasive words of human wisdom, but in demonstration of the Spirit and of power,
5 that your faith should not be in the wisdom of men but in the power of God.
Galatians 5
16 I say then: Walk in the Spirit, and you shall not fulfill the lust of the flesh.
17 For the flesh lusts against the Spirit, and the Spirit against the flesh; and these are contrary to one another, so that you do not do the things that you wish.
18 But if you are led by the Spirit, you are not under the law.
19 Now the works of the flesh are evident, which are: adultery, fornication, uncleanness, lewdness,
20 idolatry, sorcery, hatred, contentions, jealousies, outbursts of wrath, selfish ambitions, dissensions, heresies,
21 envy, murders, drunkenness, revelries, and the like; of which I tell you beforehand, just as I also told you in time past, that those who practice such things will not inherit the kingdom of God.