That's true, and in those cases, a more generic "we had other qualified candidates" letter/email would be fine.
If unskilled candidate X gets "other candidates had more specific skillz" while uncultured candidate Y gets "sorry, you suck for unspecified reasons", it sounds like a lawsuit risk.
If unskilled candidate X gets "other candidates had more specific skillz" while uncultured candidate Y gets "sorry, you suck for unspecified reasons", it sounds like a lawsuit risk.