Rules for oxidation states
1. Free atoms (0 charge) are 0
2. The overall charge of a compound equals the sum of oxidation states of its constituent elements.
3. Fluorine is -1 if it is bonded to anything other than itself, always.
4. Hydrogen is always +1 or -1 if it is bonded to anything other than itself.
5. Oxygen is almost always -2 if it is bonded to anything other than itself. Peroxides and superoxides are exceptions.
6. Group I elements are +1, and Group II elements are +2.
You can see that there is no rule for chlorine in a compound. But rules 2, 5, and 6 can be used to figure out the oxidation state of chlorine.