The Contortionist Walkthrough

Take the blanket and watch.
Wear both.
Walk to the bars.
Bend yourself through the bars.
Walk to Mary's cell.
Play cards with her.
Talk to Mary, and she'll give you another blanket.
Walk further down the hall.
Use Bend right away to trick the grabber into releasing you.
Look at the grabber's cell to spot his razor.
Use Item, then Mary's blanket to collect the razor.
Walk further down the hall.
Talk to the magician and participate in his trick.
Walk back to your cell's bars.
Bend to reenter your cell.
Walk to your cell proper, away from the bars.
Use Item, Mary's blanket, to rig the cot.
Walk to the bars.
Bend to reach the hallway again.
Walk to the magician's cell again.
Walk to the vent behind you.
Use Item, the razor, to loosen the screws on the vent cover.
Open the vent.
Bend here, and enter the ventilation shaft feet first.
Choose to wait for the guards to do a round.
Immediately Shut the vent.
Open the vent.
Take the guard's pistol.
Shut the vent again.
Use Hear three times consecutively to wait for the guard to leave.
Shut the vent cover so it will look untouched.
Walk further down the hall.
Use Item, tranquilizer pistol, on Matt.
Bend to enter his cell.
Take Matt's toenail clippers.
Use Take again to drag Matt to his cot.
Bend to leave his cell.
Walk back to your cell's bars.
Bend to reenter your cell.
Walk into your cell, away from the bars.
Take the shaving mirror and toothbrush.
Open the tranquilizer pistol to get the clip.
Walk to the bars.
Bend to leave your cell.
Walk to Oswald's cell.
Give him the clip.
Walk further down the hall.
Look into Bruce's cell to spot the makeup kit.
Talk to Bruce.
Drop your blanket to reveal your ugliness.
Give Bruce your mirror, and he'll give you the makeup kit.
Walk further down the hall.
Open the makeup kit.
Use Item, your toothbrush, to apply powder.
Use Item, your powdered toothbrush, to powder the keypad.
Give Bruce back the makeup kit.
Walk back to your cell's bars.
Wear your blanket.
Bend to reenter your cell.
Talk to Mary, and Play cards with her until the guard does a round.
Bend to leave your cell.
Walk down the hall to Bruce's bars.
Talk to Bruce to learn the length of the keypad sequence.
Walk down the hall to the steel door.
Look at the keypad.
Type in the second number listed, then the first, then the third, and click ENTER.
Open the steel door.
Walk through it.
Look at the control panel.
Type in 135 (or any combination of those digits) and click OPEN.
Use Item, Tranquilizer pistol, to shoot the guard.
Take the guard's uniform.
Wear the guard's uniform.
Walk out to the hallway.
Take the manifesto.
Wear the wishbone medallion.
Open the vent.
Drop everything except the cards, clippers, manifesto, and medallion.
Bend here, and enter the ventilation shaft head first.
Wriggle towards the light.
Use Item, toenail clippers, on the mesh screen.
Walk to freedom.

This procedure will lead to the most positive ending. You can give the pack of cards and ammo clip to other inmates for some interesting outcomes. Leave your toothbrush behind and cut your hair at the steel door to get an alternate description of the world outside. The command Hear will provide hints, so you don't need to depend on Plan too much. Using Plan less than 6 times will reveal how Oswald's trick works.