Soil settling is a primary cause of cracks in a concrete slab. Soil compaction increases the density of the soil, making it less prone to moisture and settling. To compact soil correctly for a concrete slab may involve numerous passes with a tamping machine and testing the soil's density before pouring the concrete.
Use a steel-tined rake to rake the soil level. Remove any rocks that may be in the soil. Add more clean fill dirt to any areas that are low, or remove high spots with your shovel.
Spray down the slab area with water. Don't spray so much water that puddles form, but you do want the soil to have an even, dark brown coloring. Aim your hose spray into the air, about 5 inches over the surface of the soil as you spray, rather then spraying the water directly into the soil.
Compact the soil with a mechanical compactor for large areas or a hand tamp for small ones. Work in a "row" pattern, as if you were mowing a lawn, compacting the soil from one side of the forms to the other and starting a new row next to the old. If you are using a mechanical compactor, follow the manufacturer's instructions for operating the machine. If you are using a hand tamp, walk in short half-steps. With each step, raise the tamp so the cast iron end is waist high and slam it down into the ground. Make sure that each strike of the tamp overlaps the print in the soil from the last. You want the entire surface of the soil to be smooth and dense; you should be able to walk over it without leaving noticeable prints.
Test the soil density with a testing machine, as per the instructions included with it. Drive the test spike into the ground to the proper depth with a hammer to get the best results. If you do not have access to a density machine, you can test it by hand. If you the soil passes the density test, you are ready to install your rebar or mesh and pour your concrete. If the soil fails, repeat the compacting process and retest the density.