projects/chatcontrol/skills/rules-engine/SKILL.md
Troubleshooting rule matching, replace vs rewrite, groups, and rule processing order
npx skillsauth add kangarko/ai-support rules-engineInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Rules.Verbose: true in settings.yml for match logsthen abort stop processing remaining rulesignore string isn't excluding the input#-prefixed lines are COMMENTS — inactive at runtime. In .rs files, any line whose first non-whitespace character is # is a comment. The shipped default rule files (command.rs, chat.rs, private.rs, signs.rs, etc.) deliberately ship many example rules pre-commented as opt-in templates (/helpop, /nick alias, /op blocker, /gm blocker, etc.). Users must remove the leading # from every line of the rule (the #match, #then, #require, #ignore, #name, #strip, #dont, #group lines) and run /chc reload to activate. Before telling a user a default rule 'just works', open the file and verify the rule's match/then lines are NOT prefixed with #. Same applies to commented-out keys in YAML configs.then replace vs then rewrite — replace replaces only the MATCHED portion. rewrite replaces the ENTIRE message. Users often use replace expecting full-message replacement@prolong * asterisk length matching — generates asterisks matching the length of the matched text. Not intuitiveignore type — type filtering must be done at the rule levelignore discord operator — prevents rules from applying to Discord-sourced messagesrequire script runs on Nashorn and cannot reach third-party plugin classes. Nashorn resolves Java.type("...") (and bare class refs) through the thread context classloader that was active when the engine was created, which on Foundation is ChatControl's own Bukkit PluginClassLoader. That loader only delegates to other plugins listed in ChatControl's plugin.yml under depend / softdepend / loadbefore. Third-party plugin APIs (com.gmail.nossr50.api.PartyAPI, com.palmergames.bukkit.towny.TownyAPI, me.clip.placeholderapi.PlaceholderAPI, me.angeschossen.lands.api.LandsIntegration, anything from another plugin) are not in that list, so any script referencing them throws ClassNotFoundException regardless of whether the target plugin is installed. NEVER suggest a require script rule that calls a third-party plugin API as a workaround. Safe references inside scripts: player (the implicit sender variable), the java.* standard library, org.bukkit.* core API, and ChatControl's own shaded classes. For per-plugin checks (party membership, faction, town, claim, etc.) ChatControl already exposes them as channel Party: types or as built-in operators. If neither covers the use case, the answer is "this needs a code change", not a workaround script.development
Troubleshooting snowman protection, Psycho hostile snowmen, and mob transformation
data-ai
Troubleshooting snow particles, terrain generation, weather control, and performance issues
tools
Troubleshooting Winter commands and platform compatibility
content-media
Troubleshooting Gift, Dated, and Timed chest issues