A short section of heavy wall tubing (round or rectangular) can make up the frame/body of a small puller, by adding a slot at one side, and a tapped hole located 180 degrees from the slot. I've seen small round frames that have a flat cut from the OD where the slot is located to allow the "jaws" (now tapered) to fit behind a gear with very little clearance space behind it.
A locking shaft collar (setscrew type) will make a sturdy frame, and already has a tapped hole.
Add a screw to fit the tapped hole.. bazinga, a small gear puller/miniature screw press.
Filing/grinding the tip of the screw, or better yet, reducing the diameter of it to slightly smaller than the motor shaft size in a lathe, and the gear will pull off almost effortlessly. If the fabricated frame is durable, it may be worthwhile to make more screws with other tip sizes for other purposes.