I want to create a new command for the nodes like the standard edit and delete In drupal you have the standard commands edit and delete which you access typing :

node/99/edit
node/99/delete


I want to create some other commands like :

node/99/approve
node/99/test
...


Where do I hook to access the command and execute some code ?
You need to use hook_menu() to define the path, coupled with the MENU_LOCAL_TASK type, e.g.

function MYMODULE_menu() {
  $items['node/%node/approve'] = array(
    'title' =&gt; 'Approve',
    'type' =&gt; MENU_LOCAL_TASK,
    'access arguments' =&gt; array('my custom args'),
    'page callback' =&gt; 'MYMODULE_approve_node_page',
    'page arguments' =&gt; array(1),
    'weight' =&gt; -1 // Controls the display order for the tab
  );

  return $items;
}


Then you just implement a callback function, which has the node passed as a parameter, and build up your page output:

function MYMODULE_approve_node_page($node) {
  // Do something with $node...
  $build = array(
    '#markup' =&gt; node_view($node, 'teaser')
  );

  return $build;
}


Once you clear Drupal's caches you should see the new tab appear alongside the View/Edit tabs on a node page, but only for those users who have the permission you define in your access arguments.