Salaam ‘Alaykum.If you merely imagine giving someone or some people something(s) of yours (without actually being serious) but you have not offered and do not want to (offer or even give it in the first place), are you legislatively obliged to go ahead with it and actually give it, even if it was just a mere imagination or you changed your mind, or is it permissible for you to continue to keep it (for yourself)? Because my local mosque is planning to build a library and I looked at my little library and merely imagined if the many books of Sunnah that I have were in the library of that mosque. And on a later occasion, I was reading a book and imagined reading it to someone and then giving it to him. Do I have to give all my books away based on this or is this thought of mine just waswasah (since I am suffering from waswasah quite badly)? I do not want to give my books away. I have been purchasing and collecting books since a very young age and for a very long time but I do not know why I imagined or thought such a thing, because I would never give away my books since I need them more.I know that this may sound like an extremely strange question but there have been many times where I found out Islamic rulings that I never thought would exist, so that as is why I just want to confirm for my own reassurance. Jazaakum-Allaah Khayran
All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
The cure of whispers is to repel them and not to pay attention to them. You are not obliged to give someone your books just because you imagine that you did. As a matter of fact, if you intend to give out part of your wealth as charity, you are not obliged to carry it out, because charities and gifts are things which one gives out with his free will and is not obliged to fulfill what he intends just because he intended to give it or spend it, let alone imagining giving it out.
Therefore, you should repel these whispers and not give in to them.
Allah knows best.
You can search for fatwa through many choices