Try copying and pasting back to KiCad the rules from your first post and you see what I mean. The rules don’t work anymore because this forum software messed with some characters. When writing a post you can format your text. Use “preformatted text” for sections of code etc. Then it’s kept intact. It’s also easier to read.
Look carefully at the quote characters there… I once copied shell commands from a post and spent an hour debugging, only because I didn’t know the forum changes the text.
you have not put in quotes the rule name. This is for all of them (rule CourtYard => (rule “CourtYard”
as @eelik is explaining, there is unfortunately three quote-like characters on a keyboard but not all of them are real quotes from the perspective of DRC rules
` is different from ’ is different from "
Thus cross-check exactly what character is use. Its equivelent of using ; or ; in a C-code file. one is a semi-colon, the other is a question mark in Greek (U+037E)
Checks the total skew for the nets that match the rule condition, that is, the difference between the length of each net and the average of all the lengths of each net that is matched by the rule. If the absolute value of the difference between that average and the length of any one net is above the constraint max value, an error will be generated.
If there are no spaces in the name, technically you do not need quotes per normal s-expression rules. KiCad does quote all string values anyway for clarity in the formats it writes out (like kicad_pcb) and to make third-party parsing and round-tripping a little easier. When KiCad reads it in, there is technically no ambiguity (or difference).
It’s a bit hard to guess when you don’t provide any other details, for example a minimal project or at least screenshots of the design in the area, but at a guess, the pair is actually called something like /DIFF1, not DIFF1. Or your nets don’t follow the pattern DIFF1_P/N.
For the class names (which is a string you choose) they would need a slash if you named with a slash (IDK why you’d do that, but I think nothing will stop you:
For net names, e.g. in A.NetName = /DIFF1_P, I think you will still need a slash if the net name has a slash (and KiCad may define that based on the hierarchy)
To put a finer point on it, if you use a local label with the name mynet in the root sheet of your schematic, the resulting net name is /mynet (it is local to the / sheet)