I recently wanted to have a quicker way to unpublish my nodes in one of my Drupal project with Contextual Links.
This mini code snippet will show you how to create a custom module to add links to the contextual shortcut (as seen in screenshot).
The code will also have a custom access check to only show the link for certain content type and custom permission.