/relint:write-rulefrom reLint
Authors and edits reLint regex-based linting rules in a .relint.yml config. Helps create, modify, and validate rules with guidance on patterns, file scoping, and YAML quoting.
Ships in reLint. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
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 : ).What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
2 skills in this plugin
relint@codingjoe is listed by codingjoe/claude-plugins — review the source before installing
npx claudepluginhub codingjoe/claude-plugins --plugin relintOther plugins' skills for the same job