Comment Open sourcing your private toolset would help (Score 1) 480
Before signing contract open source your private code library/snippets which you intend to use under BSD license and put into well known repository like Github or sourceforge. BSD license just to calm down your employer/client, that all modifications will remain their sole property, and what they get is some debugged and cleaned code for free, without strings attached. After that whenever question of authorship arise you can point on the traces of BSD code and date of submission into repository, and also demand from employer/client to add BSD copyright note with your name to their code.