How do I know if an “idea” is from me or from the Holy Spirit?

Discernment is the key.

Pray for discernment, Psalm 119:125:

125 I am your servant; give me discernment
that I may understand your statutes.

Spending alone time with God, privately praying and studying God’s Word will draw us closer to God. The closer to God we are, the more we will be able to discern between His voice and other voices because the more of Him and His word will abide in us. The more we are transformed by the entire renewal of our minds (Romans 12) by speaking with God and studying His word – memorizing it, meditating on it and studying it the more we will discern between truth and untruth, between motives laced in lies and God’s clear commands.

Also, the more we obey God when we do discern His commandments the more we will be able to clearly hear Him the next time and discern between our doubts, our sinful motives and His perfect voice.

When in doubt remember that God will never tell you do something that contradicts His word so judge and test your own heart under the authority of God’s Word. Be honest – check your motives objectively and invite the wise counsel of a Godly role model to speak into your life. Test the motives by remembering who God is and who He is not. God is not confusion, He is not fear, He is not manipulation, He is not vanity/pride and He is not unloving or malicious in any way. God IS peace, He is love, He is hope, He is good, He is gentle, He is kind, He is patient, He is humble and gentle.

1 John 1:1-6 Tells us how we can discern between a spirit of truth and a spirit of falsehood:

1 Dear friends, do not believe every spirit, but test the spirits to see whether they are from God, because many false prophets have gone out into the world. 2 This is how you can recognize the Spirit of God: Every spirit that acknowledges that Jesus Christ has come in the flesh is from God, 3but every spirit that does not acknowledge Jesus is not from God. This is the spirit of the antichrist, which you have heard is coming and even now is already in the world.

4 You, dear children, are from God and have overcome them, because the one who is in you is greater than the one who is in the world. 5 They are from the world and therefore speak from the viewpoint of the world, and the world listens to them. 6 We are from God, and whoever knows God listens to us; but whoever is not from God does not listen to us. This is how we recognize the Spirit of truth and the spirit of falsehood.