How does one merit the Divine spirit (or “Ru’ach Hakodesh”)? By “Dveikus”, or keeping in mind the Torah’s divine source while studying, avoiding anger at all costs, and other things.
Rabbi Yaacov Addes explains matters in these two, newly translated books: