Hafetz Haim Halachot
Halacha 83 / 215

Hilchos Lashon Hara chapter 5, section 3 4

The yetzer hara (evil inclination) tries to convince a person that this is not lashon hara. A person should think this way:

If they found out that someone told people they are not smart, how upset and angry they would be! "Why did he think it right to spread this about me?" They would decide that the speaker is mean and a baal lashon hara (a person who speaks lashon hara). But when they want to do the same to someone else, suddenly it does not seem like a sin at all.

In truth, this kind of lashon hara is worse than other kinds. Sometimes people speak lashon hara out of zeal for the truth, but this kind comes only from a bad heart. Also, other lashon hara is not always believed, but this kind is believed quickly.

All this is true even if they only said the person is not smart in worldly matters. And certainly if they said about someone the town sees as a Torah scholar that they are not so wise and only know a little Torah, which lowers their standing. This is surely lashon hara, even if it is true, because the goal is not a real purpose, only to put the other person down in the listeners' ears. And it may cause the person harm.

For example, saying about the town rav that they are not a Torah scholar and only know the few halachic rulings needed to be a rav. This breaks the Torah prohibition of lashon hara, because it completely lowers the rav's honor, and also hurts the rav's income, because they might be fired. It also lowers the honor of the Torah and the keeping of its mitzvot, since people will not listen to the rav's rebuke.

Or saying about a new chatan (groom) in town that he is not learned in Torah. It will cause him harm and pain when the bride's family hears about it.

Also, saying about a craftsman that they are not a great expert in their field is lashon hara, if the intent is to put them down. If the intent is for a real purpose, this will be explained in Rechilus, chapter 9.