Just make a regular chocolate chip cookie batch, your very favorite kind. Then look at the weed you're gonna cook with and decide how many cookies you'd like it to make. So if you've got say a couple joint's worth, make maybe 3 or 4 cookies with it. Experiment with amounts. Maybe you've got just enough for one cookie.
Then to make sure all the THC is properly isomerised by heat (something I'm not sure would otherwise happen given the short cooking time and relatively low mid-cookie temperature), saut the weed in a bit of vegetable oil in a little pan or pot at a low-med temperature 'til it's nice, aromatic, getting just a bit crispy and darker but *not* to the point of toasted, brown, or god forbid, burnt in any way. Cool the oil/weed mixture down, then add however may cookies worth of dough to the pan, mix it all up to get all the weed and now-psychoactive green oil blended in, and then dollop out your special green cookies onto the baking sheet along with their paler non-psychedelic brethren and bake away!
Don't use too much oil to precook the weed, or the cookies will be too oily.
Variation: don't use any oil at all to precook the weed, just stir it around in a dry pan, being again very careful not to burn any. I'm not sure which works best in terms of THC utilization - with oil or without, but I feel a bit safer using some oil because the heat is more evenly distributed and there's less chance of burning.
This last technique, cooking the weed in a dry pan, is from the famous early 70's primer "A Child's Garden of Grass" and does work very well if you're careful not to burn, allowing you to add the isomerised toasted grass to almost anything. I particularly like sprinkling it on toast with butter and honey. Yummy!(special thanks to M-H.com).