Your plan will work. Don’t drive rebar into the dirt though, hang it from the forms with tie wire. All the steel should be 2″ from dirt. You probably don’t need any vertical bars at all.
Depending on the size of the building you may need an actual footing in the ground. Wind load can be substantial, an 8×20 wall (side of a garage) will be under 1800 pounds of load in a 50mph wind. You’ll pick up a bit more depending on roof pitch.