James is not talking about keeping the commandments here. James is talking about actions that convey a person's belief system. For instance, Jesus tells us that if we want God to forgive us, then we need to forgive others. And when I forgive others in this way, my act to forgive exemplifies my belief in the gospel, namely, that I am a sinner in need of forgiveness.
What you are saying sounds right at first, but it only holds part of the truth and leaves out what both James and Jesus clearly teach.
James is not speaking about simple actions that only show what someone believes. He is speaking about a life that obeys God, and he makes that clear by pointing directly to the commandments themselves.
James says, “For whosoever shall keep the whole law, and yet stumble in one point, he is become guilty of all. For he that said, Do not commit adultery, said also, Do not kill… So speak ye, and so do, as men that are to be judged by a law of liberty.” (James 2:10–12 ASV). Here he is not talking about general actions or expressions of belief. He is pointing to God’s law and showing that our lives are judged by it.
Then he says, “Even so faith, if it have not works, is dead in itself.” (James 2:17 ASV). This is not about faith lacking visible expression only, but about faith that does not obey.
A faith that does not follow God is a dead faith.
He continues with Abraham and says, “Was not Abraham our father justified by works…? Thou seest that faith wrought with his works, and by works was faith made perfect.” (James 2:21–22 ASV). Abraham did not simply show what he believed. He obeyed what God told him to do, and through that obedience his faith was made complete.
When we listen to Jesus, the meaning becomes even clearer. He never separated belief from obedience. He said, “If ye love me, ye will keep my commandments.” (John 14:15 ASV). He also said, “If thou wouldest enter into life, keep the commandments.” (Matthew 19:17 ASV). And again, “Not every one that saith unto me, Lord, Lord, shall enter into the kingdom of heaven; but he that doeth the will of my Father.” (Matthew 7:21 ASV). These words are simple and direct.
To believe Him is to follow Him, and to follow Him is to obey.
The example of forgiveness actually confirms this. Jesus said, “For if ye forgive men their trespasses, your heavenly Father will also forgive you. But if ye forgive not men… neither will your Father forgive your trespasses.” (Matthew 6:14–15 ASV). Forgiving others is not just an action that shows belief. It is something Jesus commanded, and obeying it is required.
So, James is not separating works from the commandments. He is showing that true faith lives in obedience to God. Faith and works are not two different paths. Faith believes God, and works follow Him. When someone truly believes, they do what He says. When they do not, their faith is empty.
You cannot remove the commandments and still keep the meaning of James. Without obedience, works become just human actions. But with Jesus, works become obedience to His words, and that is the path that leads to life.