When people try to undermine justification sola fide as it is taught in Romans with James chapter 2, all of the explanation you need can be found in the Formula of Concord, Article III.
The question answered by James 2:20 is not “How is a man justified?” but rather “How do you see that a man is justified?” And the answer is: the same way you see that a tree is good. If someone is a Christian, you will see the effects (good works), and thus be able to induce the cause (faith). And relax! This recognition is a gospel thing, not a law thing—like predestination.
Now, if you simply see someone’s good works, you cannot for that reason alone conclude that he is a Christian. Why not? Because without the confession of faith in Christ, “good works” are not the fruit of faith, but of the opinio legis, flowing from either fear or Pharisaism.
With that said, it is always a genuinely uplifting experience to suspect that someone is a Christian because of their kindness (cf. Galatians 5:22-23), and then learn that your suspicion was correct. Dostoevsky talks about the “physiognomy” of a man revealing something of his soul. It’s certainly not a science, nor is it really even an art; i.e., there’s no way to get from “I was delighted to learn that my co-worker is indeed a Christian, as I suspected!” to “I’m a certified fruit inspector.” No; rather, it is an unlooked-for blessing when you recognize a brother or sister in Christ whom you had never met before. It’s a mystery, a bit of je ne sais quoi. But when it does happen, it certainly does warm the heart.
+ + +
Formula of Concord, Solid Declaration, Art. III: “Of The Righteousness of Faith before God”, 42-43
42] Many disputations also are usefully and well explained by means of this true distinction, of which the Apology treats in reference to the passage James 2:20. For when we speak of faith, how it justifies, the doctrine of St. Paul is that faith alone, without works, justifies (Romans 3:28), inasmuch as it applies and appropriates to us the merit of Christ, as has been said. But if the question is, wherein and whereby a Christian can perceive and distinguish, either in himself or in others, a true living faith from a feigned and dead faith, (since many idle, secure Christians imagine for themselves a delusion in place of faith, while they nevertheless have no true faith), the Apology gives this answer: James calls that dead faith where good works and fruits of the Spirit of every kind do not follow. And to this effect the Latin edition of the Apology says:
Iacobus recte negat, nos tali fide iustificari, quae est sine operibus, hoc est, quae mortua est.
That is: “St. James teaches correctly when he denies that we are justified by such a faith as is without works, which is dead faith.”
43] But James speaks, as the Apology says, concerning the works of those who have already been
justified through Christ, reconciled with God, and obtained forgiveness of sins through Christ. But if the question is, whereby and whence faith has this, and what appertains to this that it justifies and saves, it is false and incorrect to say:
Fidem non posse iustificare sine operibus; vel fidem, quatenus caritatem, qua formatur, coniunctam habet, iustificare; vel fidei, ut iustificet, necessariam esse praesentiam bonorum operum; vel bona opera esse causam sine qua non, quae per particulas exclusivas ex articulo iustificationis non excludantur.
That is: That faith cannot justify without works; or that faith justifies or makes righteous, inasmuch as it has love with it, for the sake of which love this is ascribed to faith [it has love with it, by which it is formed]; or that the presence of works with faith is necessary if otherwise man is to be justified thereby before God; or that the presence of good works in the article of justification, or for justification, is needful, so that good works are a cause without which man cannot be justified, and that they are not excluded from the article of justification by the particulae exclusivae: absque operibus etc., that is, when St. Paul says: “without works.” For faith makes righteous only inasmuch as and because, as a means and instrument, it lays hold of, and accepts, the grace of God and the merit of Christ in the promise of the Gospel.