Drupal 7 utilizes contextual links many places. But it still uses tabs on nodes. I wanted my theme to change those tabs to contextual links, so the layout was not altered for the administrative user. I had no clue how to do that, so I asked in the forum, and some helpful people answered. It turned out I needed to find the correct hooks.
hook_menu_local_tasks() and hook_menu_local_task()
So I added this code to template.php in my theme to make the tabs contextual instead:
I used the code for this theme, that I am using for vih.dk. I am still struggling a bit with the css for the contextual links (especially in IE, but who is not).
Please feel free to use the comments for suggestions.