We consider collaborative systems where users make contributions across multiple available projects and are rewarded for their contributions in individual projects according to a local rule of sharing the value produced by contributors to the given project. This serves as a model of online social computing systems such as online Q&A forums where users invest their efforts in producing online content and receive in return credits in terms of attention or social status, or momentary rewards. The central question that we study is how the value produced should be split among contributors so that individual incentives are approximately aligned with that of the system as a whole. We formulate a game-theoretic framework that allows for quite some generality with respect to the nature of contributions (e.g. supplements vs. complements) and the production costs. We find that optimal social welfare can be well approximated by simple local sharing rules where users are approximately rewarded in proportion to their marginal contributions. The framework allows us to identify the main factors that contribute to social inefficiency, including the nature of contributions and production costs, and we quantify the social inefficiency for a number of interesting cases. Our work provides insights and guidelines for the design of incentives when eliciting contributions in online services.