In making a cookie dough I forgot to add the salt. Is there a way to still add the salt?
At this point, I recommend skipping it. In the long run, it's not likely to "ruin" your cookies. It's usually just there for a bit of flavor enhancement, not likely for any chemical reason. There may be some slight difference in the importance of the salt depending on the type of cookie you're making, though. Something like a sugar cookie or chocolate chip isn't likely to need it much. A peanut butter cookie, though, the salt does a lot for the flavoring but if you use salted peanuts/peanut butter, there's probably already a good amount of salt in the ingredients, so you'll still probably be OK.

Mixing the salt with the flour is an important step in making sure it's distributed evenly. Once the dough is complete, getting the salt mixed in well would likely overwork the dough and give you tough cookies and even then, you may end up with salty pockets and some parts that are unsalted.