@lyse@lyse.isobeef.org simplified it a little bit. Using only *bot* will bring collateral damage I want to avoid (there are, still some “good” bots):
@aibots {
header_regexp User-Agent (?i)(GPTBot|ChatGPT|OAI-Search|anthropic|Claude|Google-Extended|FacebookBot|CCBot|Perplexity|Applebot-Extended|cohere|Omgili|Bytespider)
}
abort @aibots