When working with small nails or in tight quarters (or both!) keep your fingers out of the line of fire with the help of a hair accessory. A bobby pin is perfect because it can grip even the smallest nails and it provides plenty of distance between your fingers and the hammer.
Just place the nail inside the bobby pin; then hold the bobby pin where you need the nail and hammer away. Once the nail is started, you can remove the bobby pin and continue hammering.
This hint also works with an index card. Simply press the nail through a corner of the card and hold it where you need it. Start hammering and then tear the card off of the nail.