How can I add a special classes to all block of custom kind?
It's no problem to add classes in a block preprocess hook:

use Drupal\Component\Utility\Html;

  function mytheme_preprocess_block(&amp;$variables) {
    $variables['attributes']['class'][] = Html::getClass('block-id-' . $variables['elements']['#id']);
    $variables['attributes']['class'][] = Html::getClass('block-plugin-' . $variables['elements']['#base_plugin_id']);
    $variables['attributes']['class'][] = Html::getClass('block-provider-' . $variables['elements']['#configuration']['provider']);
  }


This example simply adds the available information to all blocks. You can start with this and narrow it down to what you want.