Your skill-gain is the highest when your success chance is 50%. A lower or higher success chance lowers the amount of skill gained when succeeding. The further away from 50% success chance you are, the lower the skill gain.
Improving actions will usually give more skill then than creating actions.
You barely get any skill, if any, for failing an action.