lint
Skill4 starsChanged 57 days agoMITView on GitHub
Action skill — runs the project's static-analysis toolchain, applies safe auto-fixes, and reports residual violations as ranked findings. Unlike review (read-only, architecture-focused), this skill modifies files to green the CI gate. - Probe tools via {ctx.tools}. Skip any tool not present. NEVER install anything. - Fixers run ONLY after the Phase-2 approval gate. No file is touched until the user explicitly types "proceed" (or an equivalent confirmation). - Safe transforms only. phpcbf and php-cs-fixer are the only auto-applied fixers. They…
29 other projects use a version of this.
Adopted by
Most recently taken up by
- HurricaHjz/second-yourselftheir own version, first seen Oct 1, 2026
- MetamusicX/zissa-wikitheir own version, first seen Sep 26, 2026
- wikilayer/skillstheir own version, first seen Sep 16, 2026
- elastic/docs-buildertheir own version, first seen Sep 15, 2026
- ARCASSystems/FounderOStheir own version, first seen Sep 12, 2026
- kovrichard/catalysttheir own version, first seen Sep 6, 2026
Used with
Projects with it also use query, ingest and 5 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
ArtemXTechSkillquery
Query data from this vault. USE WHEN user asks about projects, clients, tasks, daily notes. Use grep to extract frontmatter - do NOT read full files.
Also in 10 projects that use this
raven-souravSkillingest
Also in 13 projects that use this
seongjaeryuSkillsave
Complete and save your current thinking to Bindly
Also in 4 projects that use this
ffsshhttiikkSkillgraph
Graph data structures
Also in 3 projects that use this
DockerSkillresearch
Research a documentation topic — locate affected files, understand the problem, identify what to change. Use when investigating an issue, a question, or a topic before writing a fix. Triggers on: "research issue 1234", "investigate what needs changing for #500", "what files are affected by #200", "where is X documented", "is our docs page about Y accurate", "look into how we document Z".
Also in 5 projects that use this
VercelSkillsetup
Set up Vercel CLI and project configuration. Use when the user says "set up Vercel", "configure Vercel", "link to Vercel", or "vercel init".
Also in 3 projects that use this
Other versions29 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 29
- kovrichard/catalyst★ 469same name
- platformplatform/PlatformPlatform★ 440same name
- oasm-platform/open-asm★ 204same name
- romarayt/raytsystem-public-os★ 150same name
- HurricaHjz/second-yourself★ 105same name
- johnfkoo951/cmds-llm-wiki★ 90same name
- MetamusicX/zissa-wiki★ 58same name
- ratacat/claude-skills★ 56same name
- owenliang60-ship-it/knowledge-mgmt★ 37same name
- sturlese/hippocampus★ 29same name
19 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository35 other files it gives its agents.
- a11y-auditSkill
- admin-formSkill
- admin-listingSkill
- auditSkill
- breeze-adaptSkill
- breeze-compatSkill
- breeze-themeSkill
- cli-commandSkill
- contextSkill
- data-migrationSkill
- debugSkill
- deploySkill
- docsSkill
- eav-attributeSkill
- extension-pointSkill
- featureSkill
- fixSkill
- frontendSkill
- graphqlSkill
- i18nSkill
- indexerSkill
- marketplaceSkill
- message-queueSkill
- module-createSkill
- perf-auditSkill
- releaseSkill
- remediateSkill
- reviewSkill
- securitySkill
- system-configSkill
- test-generateSkill
- triageSkill
- upgradeSkill
- webapiSkill
- widgetSkill
The file
We split this skill into the rules it gives an agent
8 rules. 0 are common, 2 are distinctive, and 6 are very specific to this project.
0
Common
Most of the 23 edited versions we read keep these.
2
Distinctive
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Distinctive: line 21
Fixers run ONLY after the Phase-2 approval gate: No file is touched until the user explicitly types "proceed" (or an equivalent …
- Distinctive: line 29
Re-run after fixing: After applying fixes, the analysis gate re-runs and reports the residual (manual-only) violations.
- Very specific: line 31
NEVER edit
vendor/: All fixers exclude the vendor/ directory unconditionally. - Very specific: line 37
Output budget: Follow context/references/output-budget.md — targeted reads, summary-first test/lint output, long logs to files.
- Very specific: line 67
Run every available tool in read-only / dry-run mode using ${CLAUDE_SKILL_DIR}/scripts/run-analysis.sh.
- Very specific: line 98
Run ${CLAUDE_SKILL_DIR}/scripts/apply-fixes.sh with the approved scope.
- Very specific: line 103
Never touches files outside the approved scope.
- Very specific: line 128
Run build-findings.sh with DOCS_ROOT=<output_root> (the resolved --docs-root value, or .docs by default) so both artifacts land under …
“Common” is measured: kept by at least 6 in 10 of the 23 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Magento 2 Static Analysis
Action skill — runs the project's static-analysis toolchain, applies safe auto-fixes,
and reports residual violations as ranked findings. Unlike review
(read-only, architecture-focused), this skill modifies files to green the CI gate.
Core Rules
- Probe tools via
{ctx.tools}. Skip any tool not present. NEVER install anything. - Fixers run ONLY after the Phase-2 approval gate. No file is touched until the user explicitly types "proceed" (or an equivalent confirmation).
- Safe transforms only.
phpcbfandphp-cs-fixerare the only auto-applied fixers. They are purely mechanical and cannot change observable behaviour. - Rector is PROPOSED, not auto-applied. Rector runs in
--dry-runmode during Phase 2 (detection only). Its findings are listed for manual review; the skill never applies rector transforms automatically. The developer applies any desired rector changes manually after reviewing the proposals. - Re-run after fixing. After applying fixes, the analysis gate re-runs and reports the residual (manual-only) violations.
- NEVER edit
vendor/. All fixers exclude thevendor/directory unconditionally. - Severity shared scale. See
context/references/severity.md. - Findings schema shared. See
context/references/findings-schema.md(outputKind = quality). - Coding standard. The enforcement gate is
--standard=Magento2phpcs. Seecontext/references/php-coding-style.mdfor the full style rules. - Output budget. Follow
context/references/output-budget.md— targeted reads, summary-first test/lint output, long logs to files.
Workflow
Phase 0 — Context Resolution
Invoke context. Capture {ctx} — especially {ctx.tools} (which tools are
available) and {ctx.runner} (Docker vs bare PHP prefix). Abort with a clear error if
no PHP environment is found (runner_kind is null).
Phase 1 — Scope
Determine which files to analyse. Three modes:
| Mode | Trigger |
| Module | --module=Acme_OrderExport or a bare module name / path |
| Diff | --diff [<ref>] (default origin/main) — analyse only changed files |
| Explicit files | One or more file paths passed directly |
For module scope, resolve the absolute path via {ctx.magento_root}/app/code/{Vendor}/{Module}.
Exclude vendor/, generated/, var/, pub/static/ unconditionally — anchored at the scan
target (<target>/vendor/*, …), never as free-floating */var/* globs. PHP_CodeSniffer and PHPMD
match exclude patterns against each file's full real path, so */var/* excludes everything under a
container's /var/www/… install root and */vendor/* everything in a Composer-installed module:
the scanners check 0 files and the pass reads as clean. scripts/exclude-lib.sh builds the list
for both run-analysis.sh and apply-fixes.sh.
Phase 2 — Analysis Pass + Fix Plan (GATE)
Run every available tool in read-only / dry-run mode using
${CLAUDE_SKILL_DIR}/scripts/run-analysis.sh. Aggregate violations into a findings
JSON array.
The pass also runs the surface-invariant rules (category: surface) — cross-file
completeness checks that need no external tool, so they run even where phpcs/phpstan are
absent. They catch the class of defect the tool-driven scanners structurally cannot: a surface
whose files are each individually valid but incomplete as a set (a queue topic with no
publisher, a grid collection without the SearchResult bridge, an ACL id re-declared under the
wrong parent — an admin lockout). Every rule came from a real bug report; see
references/surface-invariants.md. None of them are auto-fixable — each needs a decision about
which file to add or which type to change.
Present the fix plan to the user showing:
- Total violations found per tool
- Which violations are auto-fixable (phpcbf, php-cs-fixer, safe rector rules)
- Which violations are manual-only (phpstan level errors, phpmd, risky rector, and every
surfacefinding) - Estimated residual count after auto-fix
- Any
scanner_errorsentry — a scanner that degraded checked nothing, which is not the same as finding nothing. Surface rules that could not be decided report there by name. - The
toolsstatus of each scanner —executed,unavailable,skippedordegraded. Only anexecutedscanner stands behind a zero count; phpcs isdegradedwhen its report lists 0 files for a target that has PHP files.
WAIT for the user to type "proceed" before changing any file. This gate is mandatory. A write skill that touches files without explicit approval is a defect.
Phase 3 — Apply Safe Fixes
Run ${CLAUDE_SKILL_DIR}/scripts/apply-fixes.sh with the approved scope. The script:
- Runs
phpcbf --standard=Magento2over the scope (auto-fixes PHPCS style violations). - Runs
php-cs-fixer fixwith safe rules if the tool is available. - Captures before/after violation counts.
- Never touches files outside the approved scope; never touches
vendor/.
Rector is NOT run by apply-fixes.sh. Rector proposals from Phase 2 are manual-only; the developer applies them after reviewing each proposed transform.
Phase 4 — Verify
Re-run ${CLAUDE_SKILL_DIR}/scripts/run-analysis.sh on the same scope. Report:
- Residual violation count (manual-only findings that remain after auto-fix)
- Delta: violations resolved by auto-fix vs still open
- Confirmation that no new violations were introduced by the fixers
- Confirmation that
vendor/was not touched
Phase 5 — Report
Write three artifacts:
- Markdown — narrative report saved to
{output_root}/quality/{Vendor}_{Module}-quality-{YYYY-MM-DD}.md(module scope; site/diff scope:quality-{scope}-{YYYY-MM-DD}.md). Sections: scope summary, auto-fix summary (before/after counts), residual findings by severity/tool, proposed risky rector rules (manual action needed), skipped tools. - JSON + SARIF — built by
${CLAUDE_SKILL_DIR}/scripts/build-findings.shusingOUTPUT_KIND=quality. Residual findings only (auto-fixed violations are excluded). Runbuild-findings.shwithDOCS_ROOT=<output_root>(the resolved--docs-rootvalue, or.docsby default) so both artifacts land under{output_root}/quality/.
Reference Files
references/tool-matrix.md— which tool detects vs fixes what; run command for each.references/surface-invariants.md— the cross-file completeness rule pack (SI-01…SI-12): what each rule asserts, the bug report it came from, and the two false-positive classes to avoid when adding one.references/autofix-safety.md— safe vs review-required transforms.references/ci-integration.md— running as a CI gate; SARIF upload;--diffPR gating.context/references/findings-schema.md— finding shape,outputKind=quality.context/references/severity.md— shared severity scale.context/references/php-coding-style.md— the Magento2 coding standard rules.
Scripts
${CLAUDE_SKILL_DIR}/scripts/run-analysis.sh— orchestrates read-only tool passes; outputs findings JSON array.${CLAUDE_SKILL_DIR}/scripts/surface-invariants.sh— the tool-free cross-file completeness rules; module scope only (each rule reasons about one module's file set, so a site/diff run must invoke it per changed module). Run byrun-analysis.sh; standalone-callable.${CLAUDE_SKILL_DIR}/scripts/apply-fixes.sh— runs safe fixers (phpcbf, php-cs-fixer only); never touchesvendor/. Rector is never auto-applied.${CLAUDE_SKILL_DIR}/scripts/exclude-lib.sh— sourced byrun-analysis.shandapply-fixes.sh; builds thevendor/,generated/,var/,pub/static/exclude list anchored at the target's realpath as the runner sees it.${CLAUDE_SKILL_DIR}/scripts/build-findings.sh— assembles residual findings into the shared JSON+SARIF format using theemit-findings.shpipeline (emit-json.sh / emit-sarif.sh) owned by thecontexthub.
Inputs
/lint [--module=<Vendor>_<Module>] [--diff [<ref>]] [--scope=module|site] [--docs-root=<path>] [<files>...]Tool environment
| Var | Purpose |
PHPSTAN_CONFIG | Config passed as -c. Auto-discovered nearest-first: {TARGET_PATH}/phpstan.neon, then phpstan-devpath.neon/phpstan.neon beside the target's parent, then the Magento root, then the cwd. Without a config phpstan loads no bootstrap and no autoloader, so every framework class reads as unknown — the pass then emits confident false positives that are indistinguishable from real ones. When nothing is found the run still happens, with a warning in scanner_errors. |
PHPSTAN_MEMORY_LIMIT | Default 2G. php.ini's usual 128M makes phpstan crash on a Magento codebase and return an empty, apparently-clean result. |
RECTOR_FORCE | 1 runs rector even on a pairing known to be broken. |
Rector 1.x is skipped on PHP ≥ 8.5. It emits ReflectionProperty::setAccessible() deprecations
plus a stack trace for essentially every rule — measured at 495 MB of stderr on one module — and
never emits parseable JSON, so the pass contributes nothing while appearing to have run. Rector
^2.5 runs clean on 8.5 (verified: valid JSON, zero bytes of stderr) and is not skipped, so the
guard is on the pairing rather than the PHP version. Note that adopting Rector 2.x requires
phpstan/phpstan ^2.2, so it implies the PHPStan 2.x migration — not a standalone bump.
Outputs
Module scope (basename uses the underscore module name, e.g. Acme_OrderExport):
{output_root}/quality/{Vendor}_{Module}-quality-{date}.md # Markdown narrative (LLM, Phase 5)
{output_root}/quality/{Vendor}_{Module}-quality-{date}.json # JSON findings (build-findings.sh)
{output_root}/quality/{Vendor}_{Module}-quality-{date}.sarif # SARIF (build-findings.sh)Site/diff scope:
{output_root}/quality/quality-{scope}-{date}.md
{output_root}/quality/quality-{scope}-{date}.json
{output_root}/quality/quality-{scope}-{date}.sarif{output_root} defaults to .docs ({ctx.docs_root}); see the --docs-root/DOCS_ROOT
recipe in context/references/artifact-layout.md.
Output root (--docs-root)
This skill accepts --docs-root=<path> (see
context/references/artifact-layout.md). When set, run the emitter with
DOCS_ROOT=<path> so artifacts land under <path>/quality/; otherwise they default
to {ctx.docs_root}/quality/. Orchestrators such as feature
pass this to collect a run's artifacts under one folder.
Related Skills
| Skill | Relationship |
review | Architecture/quality review WITHOUT fixing — use when you want findings, not fixes |
context | Supplies {ctx.tools}, {ctx.runner}, {ctx.magento_root} |
fix | For defects found during analysis that require RCA rather than a style fix |
security | Deeper security scan beyond coding-standard enforcement |
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

