I needed to make something to hold a pen that has a
spring-loaded up-and-down motion. I decided to modify
one of the air-operated cylinders that the hand already
fit. I took it apart, removed the "O" rings, and replaced the
spring with a lighter one.

The parts that make up an air-operated cylinder.

This is how the pen needs to attach

The cylinder extended.

The cylinder retracted.

I had to grind this down to fit inside the pen barrel.

Modified and original cyclinders.

The final hand/pen holder.

And the final hand/pen holder attached to the robot arm.