When working on IT projects through a staffing agency, the recruiter will usually have a prepared contract on a standard template. Assuming you researched the employment agency before working with them to ensure they're ethical and experienced, it's safe to say the contract will have the best interest of all parties in mind (although it never hurts to have a contract reviewed by a legal professional before signing it).
Throughout your career as an independent contractor, you may run into situations where you have to create your own contract template for your business. Or perhaps, you'll want to look a little closer at a contract when working with a new staffing agency. Regardless, this infographic from Ayers provides some basic steps to writing a contract, including sections that should be in it. As already noted, you should always seek advice from a lawyer; however, this can serve as a good starting point.