In The Adventures of Huckleberry Finn Jim and Huck use and believe in many superstitions. There are many examples from the book that show this in the characters.
In the first example, Huck seen a spider was crawling on his shoulder and he flipped it off and it landed in a lit candle. It shriveled up and died. Huck said it would fetch him some awful bad luck. He got up and turned around three times and crossed his breast every time. Then he tied up a little lock of his hair with a thread to keep witches away. He says that the ritual he did was for losing a found horseshoe and did not know if it would work.
Next example was, one morning Huck turned over the saltcellar at breakfast. He went to throw the salt- cellar over his left shoulder to cancel the bad luck, but Miss Watson stopped him.
All day he wondered when something would fall on him and what it would be. This all implies that Huck thinks something is going to fall on him, because of his accident.
Then, Jim said when young chickens flew a yard or two at a time and lighting it was a sign that it was going to rain. He thought if birds did it, it would be the same. Also Jim said if you caught one of them you would die. He thought this because his dad caught one and got sick and his grandmother said he was going to die. His father did die.
What I think Mark Twain is trying to show us is that superstition is ridiculous. But then again superstition does mean "An irrational belief that an object, action, or circumstance not logically related to a course of events influences its outcome".
And maybe he's using satire to show us that.
He's also showing us that, Huck is just a child and can be very gullible. I mean Huck is just 13 years of age and very uneducated. But it's understandable that he is; his drunken father, whom is in dire need for anger-management classes, forbids him from going to school. The fact that he would believe such stuff just proves that.
But the thing is I'm not actually sure about is, what is he trying to show about Jim's character? I really don't know.
So enclosing, Mark Twain included superstition in his story to show how absurd it can be, and to build on the personalities of the characters.