Ghostwriting and UGC Creator Contracts: Ownership, Credit and NDAs

How to structure ghostwriting and UGC creator contracts: work for hire limits, the IP assignment backstop, credit clauses and NDA provisions that hold up.