Jesus helps us know:
27 "But I say to you who hear, love your enemies, do good to those who hate you, 28 bless those who curse you, pray for those who mistreat you. 29 "Whoever hits you on the cheek, offer him the other also; and whoever takes away your coat, do not withhold your shirt from him either. 30 "Give to everyone who asks of you, and whoever takes away what is yours, do not demand it back. 31 "Treat others the same way you want them to treat you. 32 "If you love those who love you, what credit is that to you? For even sinners love those who love them. 33 "If you do good to those who do good to you, what credit is that to you? For even sinners do the same. 34 "If you lend to those from whom you expect to receive, what credit is that to you? Even sinners lend to sinners in order to receive back the same amount. 35 "But love your enemies, and do good, and lend, expecting nothing in return..." (Luke 6:27-35 NASB)
It's easy to be the do-gooder atheist/religionist. It's quite another to love others the way Jesus did/does. The distinction seems to center around how we deal with our enemies--those who've wronged us.
This all sounds good, but who does it?
There are many "eye for an eye" Christians.
Are they not saved?
How many people reading this who claim to be Christians would actually give the shirt off their back to somebody?
How many would give $100.00 to someone and never look to get it back?
It seems that your description of the good works that James is talking about is something that most Christians would never do.
Therefore, I say he is talking about something else.
In James 2: 18b; he says "Show me your faith without deeds, and I will show you my faith by my deeds".
Now in the same paragraph in verse 19, he says, "You believe that there is one God. Good! Even Demons believe that---and shudder".
Since these verses are put together, I ask, "how do they tie in together"?
If you are talking about doing good things to your neighbor, then it doesn't seem to be relevant.
But if you are talking about the work of God...
John 6:29;
"Jesus answered, the work of God is this: to believe in the one he has sent".
If James is talking about this, then it all makes sense.
Tell me, who has the power, the one giving a thousand dollars in church to feed the poor, or the one out in the streets proclaiming the Gospel to everyone passing by?
Who has the power, the one praising Jesus all day long or the one sitting there trying to figure out if they've done all the right things for the week?
The power is Jesus.
We can do all the good works we want, but the power is in Jesus, nothing else.
Believing in Jesus and proclaiming it to the world is the good works that we are called to do.