Example of mission modification?

Is it fairly simple, or is there a module/example, that may demonstrate a mission being fetched, and modified - for example, by inserting another command before each MAV_CMD_NAV_WAYPOINT ?

I think that MAVProxy may be the best tool for that.