Just wondering if there needs to be any sanitization here:
/**
* Implements hook_ajax_render_alter().
*/
function my_module_ajax_render_alter(&$commands) {
if (isset($_POST['_triggering_element_name'])) {
$commands[] = array(
'command' => 'myCustomCommand',
'data' => $_POST['_triggering_element_name'],
);
}
}