Regarding priors, see this.
Regarding generated quantities, you can see the code that I’m using here. We are working making it easier to do so.
I hope this helps!