When David wrote 2 Sam 23:3-7, he said in v.2, “The Spirit of the Lord spake by me, and his word was in my tongue”.
The second part of the verse is easy to understand and apply. David wrote, “His word was in my tongue”. Any time you quote a verse of scripture, the word of the Lord is in your tongue. You are saying what God said.
You just want to be sure to quote the verse or verses correctly and doctrinally. The way to do this is found in Prov 22:17-21.
In 2 Sam 23, you know that the word of the Lord was in David’s tongue because what he said is recorded in the Bible, which is the word of God.
The first part of the verse instructs us further. The Spirit of the Lord spoke by David and he can speak by you. The Holy Spirit can use what we say to speak to others the thing he wants said but doesn’t have the “voice” to speak audibly.
The Holy Spirit does this when we witness, for example. Sometimes, he’ll give you an illustration. Jesus used illustrations frequently. Or he’ll give you an insight and the words to convey it.
We visited with a couple on the sea wall whose daughter had died. It turns out that she was a Christian and they were Catholic. They were distressed because they had left their daughter’s ashes on their mantle at home in San Antonio. They were not with her while they were here.
The Holy Spirit led the conversation, telling them that if they never ever wanted to be separated from their daughter again, they could be saved like she is and be together with her in heaven, 2 Cor 5:8, Eph 2:6. Thus, no matter where they were in relation to her ashes, they would always be with her in relation to her spirit and soul. They trusted Jesus to save them right there. With tears and great relief they rejoiced that they would be with their daughter and Jesus for ever, from then on. The Lord spake by me.
Sometimes the Holy Spirit will give you a thought and words to go with that thought. When you speak those words to the person who needs to hear them and they receive them, they may tell you later, “when you said _____, what you said just hit me like a ton of bricks”.
To be used by the Holy Spirit this way, listen to the person speaking to you and listen for the Spirit to “speak” to you. You want to confidently be able to say, “the Lord spake by me”.
I’m reminded when David told Nathan that he wanted to build a house for the ark, Nathan said, “Go, do all that is in thine heart; for the Lord is with thee”, 2 Sam 7:3. That’s just what Nathan thought to say. But that’s not what the Lord wanted him to say.
It came to pass that night that God gave Nathan something else to say to David. Thy seed “shall build an house for my name”, 2 Sam 7:13. This was the Spirit of the Lord speaking by Nathan.
Also, follow 1 Pet 4:11 as the guiding verse to allow the Spirit to speak by you and put the right words in your mouth. “If any man speak, let him speak as the oracles of God…”. When you speak as the oracles of God, you can truly say, “the Lord spake by me”.