From reLint
Authors and edits reLint rules in .relint.yml configs for regex-based linting. Use to create new lint rules, modify existing ones, or add rules from the Cookbook.
How this skill is triggered — by the user, by Claude, or both
Slash command
/relint:write-ruleThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
You help the user write and maintain reLint rules. reLint rules are regular-expression-based linters defined in a YAML config file (default `.relint.yml`).
You help the user write and maintain reLint rules. reLint rules are regular-expression-based linters defined in a YAML config file (default .relint.yml).
For the full rule schema, pattern behavior, and YAML gotchas, read reference.md in this skill directory.
Each config is a YAML list of rules. Each rule supports:
| Key | Required | Default | Purpose |
|---|---|---|---|
name | yes | — | Rule name shown in output. |
pattern | yes | — | Regex matched against entire file content. |
hint | no | null | Message shown on match. Supports Markdown. |
filePattern | no | .* | Regex matched against the full file path. |
error | no | true | true = hard error; false = warning only. |
.relint.yml in the project root. If it doesn't exist, create it (initialize as a list). If the user names another file, use -c when validating.pattern that matches the undesirable code. Be specific to avoid false positives. Add a clear hint explaining the fix, and a filePattern to scope it.pattern and filePattern in single quotes when they contain YAML-significant characters. Use the literal block scalar | for multi-line hints.\n or [\s\S] to match multiline constructs.(?i) for case-insensitive; place at the start of the pattern..*\.py for Python files; .*.py would also match xypy..*\/management\/commands\/.*\.py.uvx --with "relint[regex]" relint.- name: <short, descriptive rule name> # by @<author>
pattern: '<regular expression>'
hint: |
<Markdown explanation of the issue and how to fix it>
filePattern: .*\.<ext>
error: true # set false for a warning
Real-world rules to inspire and adapt. The full collection lives in COOKBOOK.md at the repo root.
- name: Do not import datetime or date directly # by @codingjoe
pattern: '(from datetime import|from django.utils.timezone import)'
filePattern: .*\.py
hint: |
To differentiate between naive and timezone-aware dates,
please use the following imports:
* 'from django.utils import timezone'
* 'import datetime'
- name: No logger in management commands # by @codingjoe
pattern: (logger|import logging)
hint: Please write to self.stdout or self.stderr in favor of using a logger.
filePattern: \/management\/commands\/.*\.py
- name: IO is lava – Avoid the 'db' fixture # by @codingjoe
pattern: "def test_[^(]+\\([^)]*db[^)]*\\):"
hint: Please use the "django_db" marker instead.
filePattern: .*\.py
- name: no inline CSS # by @codingjoe
pattern: 'style=\"[^\"]*;[^\"]+\"'
hint: |
Please do not use more than one inline style attribute.
You may use a CSS class instead.
filePattern: .*\.(html|vue|jsx|tsx)
# This rule requires the `regex` extra — run via `uvx --with "relint[regex]" relint`.
- name: no line longer than 120 characters in a line (excluding comments) # by @yangcht
pattern: '(?<!^[ \u00A0\u1680\u2000-\u200A\u202F\u205F\u3000]*//.*)(?<!/\*(?:(?!\*/)[\s\S\r])*?)\b(.{120,})\b'
hint: |
Please do not use more than 120 characters in codes except for comments.
filePattern: .*\.(C|cc|cxx|cpp|c++|cppm)
filePattern is matched against the full path, not the basename.! or containing : ).npx claudepluginhub codingjoe/claude-plugins --plugin relintLints files against user-defined regular expression rules in a YAML config. Supports git-diff linting, pre-commit hooks, and CI annotation output.
Reference for ESLint, Ruff, Pylint, RuboCop, Stylelint, and Clippy rule names, AST selectors, and config details when authoring enforce() rules.
Authors, modifies, or removes lint rules in `.bully.yml` config. Always tests a rule against a fixture before writing it.