I've 30 years in the software consulting business. Every once in a while, a client will ask me to 'clone' myself so that some college graduate could 'take over'. I tell the client 'cloning' doesn't work, but that if the college graduate has any specific questions, I'll answer them. And, at the same time, I give them two weeks notice. When the contract is done, it's done. Never overstay your welcome. The site/job environment will turn quickly hostile and you don't want to be there when it does.
Many times, I'll get a callback from the client, saying they are stuck, and could I come back for a day to unstick the college graduate. I typically decline, as my business model makes its money from long term contracts. Ok, they say, how about two weeks? I say ok but give them a rate that's double as there's an opportunity cost associated with not being available when the next client calls.