Rajtík's blog

← Back to home

AI tools 6 min read

Anti-slop in Czech is not a blacklist

Why a list of banned phrases fails in Czech and what I built instead: the pis-cesky plugin for Claude Code and proofreading by an agent that does not know the brief.

I had an article about spot electricity prices generated and the headline said: "Duck curve: profil dne, který slunce překreslilo" ("Duck curve: the profile of a day that the sun redrew"). Grammatically flawless. But it is not a Czech sentence, it is an English sentence assembled out of Czech words.

That has bugged me for a long time, so I wrote a Claude Code plugin for it. It is called pis-cesky.

Why a list of banned phrases does not work in Czech

GitHub is full of anti-slop skills and almost all of them rest on a blacklist: "delve into", "in today's fast-paced world", "it's important to note". In English that makes sense. A person rarely writes such phrases, the model churns them out, so you can simply strike them.

A Czech version of such a list (usually machine-translated from the English one) runs into three things.

First: "hraje klíčovou roli" ("plays a key role") or "v neposlední řadě" ("last but not least") existed in Czech long before ChatGPT and in an annual report they sit exactly where they belong. The signal is not the presence of a phrase but how it is used.

Second: a cliché used at a distance is not slop. When someone writes "lze směle označit za game changer" ("can boldly be called a game changer") and knows what they are doing, that is style. A blacklist knocks it down unfairly.

And third, for English somebody has counted what the model writes differently from a person - Buffer analyzed 52 million posts, Wikipedia keeps an overview of typical signs of generated text. Nobody has done such an analysis for Czech, and Czech repositories just copy each other.

I do not ban words, I set the writer's position

So the skill does not say which words not to use. It determines who is writing the text and from where - whether someone stands behind the sentence or filler is just being piled up. On top of that it guards the mechanics of the Czech sentence.

In practice it is a handful of rules where you can check whether the model followed them. A sentence stands on the verb, not on nouns - the verb itself calls for cases, prepositions and word order. New information goes at the end ("Reverb umí databázový driver", not "Databázový driver je novinkou Reverbu"). The text must contain at least one fact that cannot be googled, only lived. And the text does not end with a summary: not one of the 74 technical texts I derived the rules from has a closing recap.

The sources are human texts published before November 2022, that is, before generated text started being used routinely. The technical style rests on blog.nette.org, blog.root.cz and nettech.cz - 74 articles, about 79 thousand words. The official style rests on Supreme Administrative Court decisions, Constitutional Court rulings, public authorities' replies under the freedom of information act and ministry methodologies - 68 documents, around 180 thousand words.

Proofreading that does not know the brief

The most useful part of the skill came later. A text written on the first try always has errors, and the author does not see them in their own text because they know their intent. So the skill can call a proofreader: a separate agent that receives only the text. No brief, no conversation. It reads it the way the reader will.

It catches things I would not expect from a language check. In the test set it found that the claim "the private passkey never leaves the device" contradicts the passage about syncing through the cloud. Elsewhere it uncovered that two percentages from the same survey stand on inconsistent bases - one counts consumers, the other everyone asked, businesses included.

It costs roughly 30 thousand tokens per text, so do not run it on notes and commit messages. To keep the price from growing needlessly, the mechanics stay outside the model: dashes, paired brackets and spaces around punctuation are handled deterministically by nastroje/mechanika.py for zero tokens, and the proofreader may touch the language data at most three times.

That data is optional - VALLEX 4.5 with the valency frames of 2,772 verbs and a frequency database of word combinations that I built myself from Czech Wikipedia. It takes about 250 MB, is built locally and lives outside the plugin installation, so an update does not wipe it. Without it everything still works, the proofreader just has nowhere to check whether a given combination is actually used.

What it is not

It is not a proofreader of your text. If you give it a finished article, it applies the rules, but it has no defined limit on how far it may go - a text that is all filler gets rewritten beyond recognition. It is not a translator: a translation must not lose any claim, even a badly written one, whereas the skill strikes filler. And it is not a detector, it cannot tell whether a text was written by a person or a model.

Installation takes two commands:

/plugin marketplace add rajtik76/pis-cesky
/plugin install pis-cesky@pis-cesky

There are two things I have not solved yet. The rule about a cliché used at a distance the model nods along to, but it cannot apply it - "I know I am writing this phrase" is an instruction with no content for it. And I do not know how to measure the result properly. Not with an AI text detector, the goal is not to pass as human but to be readable. For now I measure it by how many times my hand drifts to the keyboard while reading.

Whoever wants to see the difference without installing: the priklady/ folder holds three topics written twice - once with the skill, once without, same brief, same model.

In closing

I admit it: this whole article was generated with Claude Code and my new skill /pis-cesky. The whole thing cost 165k tokens (110k for the article written in Opus and 2 passes of Opus and Sonnet = 55k). The basis was my GitHub repository and a brief on what the article should be about.

And you know what, I did not have to make a single manual fix in the article after the proofreading because of the Czech! So I am happy with the skill so far, but I am only at the beginning of the road. For those of you who feel I cheated you of something by having the article generated by AI, I read the whole thing several times and wrote this last paragraph myself.