"Who is wise and understanding among you? Let him show it by his good life, by deeds done in the humility that comes from wisdom." James 3:13
Humility is a natural by-product of wisdom because wisdom knows who God is and it knows who we are. Humility grows in those who see things as they really are. Do your good works result in pride or humility? If in pride, you are doing them to earn favor from God which isn't the gospel, it's legalism. If in humanity, you're doing them because of the amazing grace you've experienced. We do our deeds in humility because we have no other reason to do them.