“For the word of God is quick, and powerful, and sharper than any twoedged sword, piercing even to the dividing asunder of soul and spirit, and of the joints and marrow, and is a discerner of the thoughts and intents of the heart.” Hebrews 4:12
“The sharp sword with two edges” refers to the word of God that Jesus speaks “Repent; or else I will come unto thee quickly, and will fight against them with the sword of my mouth” Revelation 2:16
“sword of my mouth” refers to the word of God (Hebrews 4:12)
The word of God is Jesus.
“In the beginning was the word and the word was God and the word was with God” (John 1:1).
There was never a time when Jesus did not exist and was not with God (John 17:5, 24).
The two edged sword refers to how harsh the unfiltered truth is when you hear it from Jesus. It is to say the truth cuts deep.
“piercing even to the dividing asunder of soul and spirit” refers to how Jesus, when looking at you, can separate who you are as a spirit, and what you think as a man.
“and the joints and marrow”
This refers to His ability to separate the things you do in the flesh instinctively, like a knee jerk reaction rather than anything you do that is well thought out beforehand.
“and is a discerner of the thoughts and intent of the heart” (Proverbs 24:12)
This refers to His ability to separate what you have thought about and what thoughts have made it into your heart, which you intend to act on, whether you had the opportunity to act on those thoughts or not, good or bad.
The phrase “Sword of the Spirit” is the Word of God itself. This is the tool Satan can’t fight against in any way, but you must know it and the context of it in order to use it effectively.
Satan knows the Bible too, but he is not filled with the Spirit, so he has an intellectual knowledge of the Bible, not a spiritual one. The reason Satan tries to steal the word, is to disarm you (Hebrews 4:12). You must use God’s word against the Devil, it is the only way. When you resist the Devil he will flee from you (James 4:7). God’s word flows from God through Jesus to man, as Jesus is the Word of God (John 1:1).