Psalm 51:11-12 Do not cast me away from Your presence, and do not take Your Holy Spirit from me. Restore to me the joy of Your salvation, and uphold me by Your generous Spirit.
Just like any born again Christian, David was anointed and had the Holy Spirit. The Holy Spirit was given to priesthood, prophets and Israelites (Jews) during the anointing.
Isa 63:10-11 But they rebelled and grieved His Holy Spirit; so He turned Himself against them as an enemy, and He fought against them. Then he remembered the days of old, Moses and his people, saying: "Where is He who brought them up out of the sea with the shepherd of His flock? Where is He who put His Holy Spirit within them?
Some Gifts of the Holy Spirit
1. Gifts of prophecy
1Sam 19:20 Then Saul sent messengers to take David. And when they saw the group of prophets prophesying, and Samuel standing as leader over them, the Spirit of God came upon the messengers of Saul, and they also prophesied.
All three groups of messengers (Jews) who were filled with the Spirit of God prophesied.
Act 19:5 -6 When they heard this, they were baptized in the name of the Lord Jesus. And when Paul had laid hands on them, the Holy Spirit came upon them, and they spoke with tongues and prophesied.
2. Gifts of Signs and Wonders
Judg 14:6 And the Spirit of the Lord came mightily upon him, and he tore the lion apart as one would have torn apart a young goat, though he had nothing in his hand. But he did not tell his father or his mother what he had done.
Many sign and wonders were also performed by Moses in the Exodus of the Israelites from Egypt.
Act 5:12 And through the hands of the apostles many signs and wonders were done among the people. And they were all with one accord in Solomon's Porch.
3. Gifts for various Ministries
Exo 31:3-5 And I have filled him with the Spirit of God, in wisdom, in understanding, in knowledge, and in all manner of workmanship, to design artistic works, to work in gold, in silver, in bronze, in cutting jewels for setting, in carving wood, and to work in all manner of workmanship.
Spiritual gifts were given to help to build the Temple of God and today in the various ministries in churches.
1Cor 12:28 And God has appointed these in the church: first apostles, second prophets, third teachers, after that miracles, then gifts of healings, helps, administrations, varieties of tongues.
Saul prophesied in nakedness
1Sam 19:23-24 So he went there to Naioth in Ramah. Then the Spirit of God was upon him also, and he went on and prophesied until he came to Naioth in Ramah. And he also stripped off his clothes and prophesied before Samuel in like manner, and lay down naked all that day and all that night. Therefore they say, "Is Saul also among the prophets?"
Though Saul was rejected by God because of his many sins (1Sam 15), still he could prophesy, but in complete nakedness.
Nakedness is used by God to reveal the sinful life of King Saul
Just like God exposing King Saul's wickedness, He will also reveal the nakedness (bad fruit - covetous, carnal, worldly, adulterous, gays, proud, selfish, lies, etc.) of these false teachers, false prophet today.
Spirit of Truth
Since the kings, prophets and priests in the OT were anointed with the Holy Spirit, yet they were unable to refrain from sins. So our Lord, out of His abundant Grace, give His obedient Christians, the Spirit of truth to help them overcome temptations and the freedom from worldly bondages.