You are a developer working on the MegaLinter project.
Implement the requested changes. If a prior /design conversation exists, follow that specification. Otherwise, derive the implementation plan from the user's request and the existing codebase — explore with Glob/Grep before writing code.
Read .claude/rules/ for the conventions of the area you're touching:
descriptors.md— YAML descriptor schema and property coveragepython-style.md— Python conventionsdocumentation.md— Zensical markdown rulesgenerated-files.md— what NOT to edittesting.md— test structure and fixtures
Process
- Understand what to implement. If
/designproduced a spec, follow it. Otherwise grep for relevant code and form a clear plan before writing. - Pick the right specialist (prefer delegation when the work fits):
- Authoring/editing descriptors → use the
descriptor-expertagent. - Brand-new linter → follow
/add-linter. - Linter version bump → follow
/update-linter-version. - New flavor →
/add-flavor. New reporter →/add-reporter. - CVE / vulnerability →
/fix-security-issue.
- Authoring/editing descriptors → use the
- Descriptor changes:
- Edit
megalinter/descriptors/<lang>.megalinter-descriptor.yml. - Maximize property coverage — see the catalog in
.claude/agents/descriptor-expert.md. - Always renovate-compatible pin:
install: dockerfile: - |- # renovate: datasource=pypi depName=tool-name ARG PIP_TOOL_VERSION=1.2.3 pip: - tool-name==${PIP_TOOL_VERSION} - For new linters, search the internet to gather: rules URL, configuration URL, inline-disable URL, ignore-file URL, SPDX license, IDE extensions, SARIF support, latest version, supported platforms.
- Edit
- Python changes (
megalinter/):- PEP 8 + type hints where possible.
- No docstrings on classes/methods.
- Imports at the top only — no inline / conditional /
try/except ImportError. - Config:
megalinter.config.get(request_id, "VAR", default)— neveros.environ. - Logging:
loggingmodule — neverprint(). - Custom linter classes extend
megalinter.Linterand stay minimal. Override only what YAML can't express. - Reporters extend
megalinter.reporters.Reporterwithmanage_activation()andproduce_report(). - No defensive error handling for internal paths; validate only at system boundaries.
- Test fixtures: for any change affecting detection or error parsing, add/update files in
.automation/test/<test_folder>/. Good file lints clean; bad file triggerscli_lint_errors_regex. - Never edit generated files:
linters/*/Dockerfile,flavors/*/Dockerfile,flavors/*/action.yml,flavors/*/flavor.json.megalinter/tests/test_megalinter/linters/*_test.pyfiles with theautomatically @generated by .automation/build.pyheader.docs/descriptors/*.- Schemas under
megalinter/descriptors/schemas/. - Change the source (descriptor YAML or
.automation/build.py) instead.
- Build: after descriptor or build-logic changes, run
make megalinter-build. Delegate to thebuild-runneragent if it gets complex. Never runmake megalinter-build-with-doc— docs are owned by auto-update workflows; running it in a PR causes merge conflicts. - Dependencies: after editing
pyproject.toml, runuv lock. Prefer descriptorinstall:blocks for linter-specific runtime deps over editing the coreDockerfile. - CHANGELOG: add a one-line user-facing entry under
## [beta] (master)in repo-rootCHANGELOG.md. Write it for end users per.claude/rules/changelog.md— lead with the benefit or required action, no implementation details in user-facing sections. Internal-only changes (refactors, test suite, repo CI, build tooling) go under the Dev or CI sections, where technical detail is fine. Skip for:- Routine linter version bumps (auto-upgrade workflow owns those).
- CVE-ignore entries.
- Documentation: improve descriptor metadata (
linter_text,linter_rules_url,ide,examples) so the auto-generateddocs/descriptors/*pages improve. Zensical: blank line after every heading, blank line before/after every list.
Continue iterating until the change is complete. Do not stop to ask whether to continue mid-task.
Important
- Do not add abstractions, fallbacks, feature flags, or backwards-compatibility shims the change doesn't need.
- Do not leave half-finished implementations or
// removedplaceholder comments. - Default to no comments — add one only when the WHY is non-obvious.
- Linters are NOT installed locally. Final validation must happen inside Docker — that's the
/testskill's job.
$ARGUMENTS