Split the damaged piece by driving a chisel into the top of the piece with a hammer, then remove the wood fragments.
Insert the hooked tip of a nail puller underneath the piece directly above the repair area, and hook the puller around one nail. Note that the handle of the puller features a flat surface at the top of the handle. Strike the flat surface with the hammer to pull the nail out of the roof. Anticipate removing two or three nails here.
Trim the replacement cedar piece to fit between the two pieces adjoining the repair area with a saw. Leave approximately 3/8 inch of clearance between the sides of the new piece and the adjoining shakes to allow room for the new piece to expand naturally when exposed to temperature fluctuations.
Slide the new piece underneath the piece above the repair area until the bottom of the replacement piece extends approximately one inch beyond the bottom of the neighboring pieces.
Drive two nails into the top of the exposed portion of the replacement piece at a 45-degree angle with the hammer.
Position a block of wood against the bottom of the replacement piece, then tap the block toward the piece until the bottom edge of the piece aligns with the bottom edge of the adjoining pieces. Tapping the new piece into place will bend the nails and hide them underneath the above piece.