Construction of a quark spin operator