Any act of obedience to Gods command is a work, a good work. Believing on Christ is a commandment of God, so therefore a good work 1 Jn 3:23
And this is his commandment, That we should believe on the name of his Son Jesus Christ, and love one another, as he gave us commandment.
And they said, Believe on the Lord Jesus Christ, and thou shalt be saved, and thy house.
The word believe here is the greek word pisteuō and in this instance its an imperative which means:
The imperative mood corresponds to the English imperative, and expresses a command to the hearer to perform a certain action by the order and authority of the one commanding. Thus, Jesus' phrase, "Repent ye, and believe the gospel" (Mk.1:15) is not at all an "invitation," but an absolute command requiring full obedience on the part of all hearers.
So believing here would be a good work performed by the Jailor if he obeyed the imperative !
And if his act of obeying this command caused God to save him, then he was saved because of a god work he performed !
Absolutely ! If a person claims one gets saved by his own act of obedience to any command whatsoever, that's tantamount to teaching Righteousness by the Law, making Christ's death meaningless.
So the Gospel command to Believe on the Lord Jesus Christ, a Fruit of the Spirit Gal. 5:22, is exclusively directed to the regenerate [Spiritually Alive] to be obeyed: But not offered to all without exception, as taught by those who promote a false gospel of works the Apostle Paul warned about Gal. 1:8.