[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7B1MHTKT4Q60J7ZWDXDMEZV":3,"skill-same:01M7B1MHTKT4Q60J7ZWDXDMEZV":51},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":29,"commitSha":30,"skillDirectory":31,"forksCount":14,"repositoryHtmlUrl":32,"repositoryHomepageUrl":6,"ownerHtmlUrl":33,"ownerBlogUrl":34,"ownerDescription":35,"updatedAt":36,"install":37,"resources":50},"01M7B1MHTKT4Q60J7ZWDXDMEZV","new-eslint-rule",null,"Scaffold a new lint rule in `@grafana\u002Feslint-plugin-design` — generates the rule implementation skeleton, RuleTester test file, per-rule markdown doc, and wires the rule into the plugin's barrel and `configs.recommended`. Use when adding a new deterministic check derived from `@grafana\u002Fdesign-catalog` (migration recipe, STYLING.md anti-pattern, USAGE.md anti-pattern). Does not write the visitor logic itself — that's authored by hand against the actual AST shape the rule needs to inspect.","torkelo\u002Fscenes2","torkelo","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F10999?v=4","01M7B1G6RRGVK2TZGTJ2813VJ4","Torkel Ödegaard","01M7B1G6SAYVTDC3NWMBPX16TB",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Ftorkelo\u002Fscenes2\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fnew-eslint-rule\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: new-eslint-rule\ndescription: Scaffold a new lint rule in `@grafana\u002Feslint-plugin-design` — generates the rule implementation skeleton, RuleTester test file, per-rule markdown doc, and wires the rule into the plugin's barrel and `configs.recommended`. Use when adding a new deterministic check derived from `@grafana\u002Fdesign-catalog` (migration recipe, STYLING.md anti-pattern, USAGE.md anti-pattern). Does not write the visitor logic itself — that's authored by hand against the actual AST shape the rule needs to inspect.\nallowed-tools: Read, Write, Edit, Glob, Grep, Bash\nargument-hint: \u003Crule-slug>\nmetadata:\n  generated: hatch@v1.2.0\n  source: .hatch\u002F_skills\u002Fnew-eslint-rule\u002FSKILL.md\n---\n\n# Scaffold a new lint rule\n\nCreate a new rule **`$ARGUMENTS[0]`** in `@grafana\u002Feslint-plugin-design`. The slug is the rule's canonical name — kebab-case, no `@grafana\u002Fdesign\u002F` prefix. Examples that match the existing convention: `no-bare-grafana-data-import`, `prefer-usage-md-cross-link`, `no-deprecated-icon-shim-import`.\n\n## Before starting\n\nRead these reference files to ensure the new rule matches current convention:\n\n- `packages\u002Feslint-plugin-design\u002Fsrc\u002Findex.ts` — plugin barrel; you'll add the new rule here.\n- `packages\u002Feslint-plugin-design\u002Fsrc\u002Futils\u002Fast-helpers.ts` — `createRule` helper, shared AST predicates (`isStyleFile`, `isInsideIife`, `getImportSourceForJsxName`, `getFilename`).\n- `packages\u002Feslint-plugin-design\u002Fsrc\u002Futils\u002Fcatalog-loaders.ts` — lazy-loaders for catalog data from `@grafana\u002Fdesign-catalog`. If the rule needs a list of canonical components, valid token names, or recipe slugs, source them from here rather than hard-coding.\n- An existing rule whose shape is close to the one you're building. List `packages\u002Feslint-plugin-design\u002Fsrc\u002Frules\u002F` — if a rule of the same AST category already exists, read it + its matching test + doc alongside so the new files match the convention. If no same-shape rule exists yet, use the shape guide below.\n\nShape guide:\n\n| Category                                 | AST entry point                         | Key utilities                                                                                                     | Typical fix                              |\n| ---------------------------------------- | --------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ---------------------------------------- |\n| Import-shape rules                       | `ImportDeclaration` \u002F `ImportSpecifier` | Track import bindings in a `Set\u003Cstring>`; visit `Identifier` references later                                     | Rewrite or remove import specifiers      |\n| JSX-shape rules                          | `JSXElement` \u002F `JSXAttribute`           | `getImportSourceForJsxName(context, name)` from `..\u002Futils\u002Fast-helpers.js` to gate on the source module            | Rewrite JSX attributes or children       |\n| Style-file gating rules                  | any node, gated on filename             | `isStyleFile(getFilename(context))` from `..\u002Futils\u002Fast-helpers.js`; `isInsideIife(node)` for `cssVariables` IIFEs | Often advisory (no auto-fix)             |\n| Call-expression rules                    | `CallExpression`                        | Gate on `callee.name` resolving to an import binding; inspect `arguments`                                         | Rewrite or remove arguments              |\n| Selector-key rules in object expressions | `ObjectExpression` \u002F `Property`         | Match the `key` of each `Property` against a selector pattern (Emotion `css({})` rule tree)                       | Advisory; rule-shape changes are bespoke |\n\n## Step 1 — Gather rule metadata\n\nIf the user hasn't already described the rule, ask:\n\n- **What does the rule catch?** One sentence on the anti-pattern. This becomes the rule's `meta.docs.description`.\n- **Severity in `recommended`** — `error` or `warn`. Errors block CI by convention; warnings surface as advisory annotations. Lean toward `error` for unambiguous anti-patterns sourced from a migration recipe; lean toward `warn` for \"should consider\" guidance.\n- **Auto-fix?** — `none`, `partial` (fix some violations, leave call sites), or `full` (every violation auto-fixable). Drives the rule's `meta.fixable` field and the doc's auto-fix section.\n- **AST entry point(s)** — which TSESTree node types the visitor inspects (`ImportDeclaration`, `JSXElement`, `CallExpression`, `Literal`, `ObjectExpression`, etc.). Drives the create function's return shape.\n- **Catalog source** — which `@grafana\u002Fdesign-catalog` entry motivates this rule. Usually one of:\n  - A migration-recipe slug (e.g. `usestyles2-to-getdesigntokens`).\n  - A `STYLING.md` section heading.\n  - A component USAGE.md anti-pattern.\n  - A `CLAUDE.md` paragraph.\n\n  The doc links back to this source so consumers can chase the rationale.\n\nDerive the camelCase rule name from the slug — `no-bare-grafana-data-import` → `noBareGrafanaDataImport`. This is the exported binding from the rule file and the import name in the barrel.\n\n## Step 2 — Generate the three rule files\n\nAll paths under `packages\u002Feslint-plugin-design\u002F`. Use `Write` for new files.\n\n### `src\u002Frules\u002F$ARGUMENTS[0].ts`\n\nSkeleton — fill in the description, messageIds, and `create` body once the rule's logic is clear.\n\n```ts\n\u002F**\n * \u003COne-paragraph rationale. Reference the catalogue source.>\n *\u002F\nimport type { TSESTree } from '@typescript-eslint\u002Futils';\n\nimport { createRule } from '..\u002Futils\u002Fast-helpers.js';\n\ntype MessageIds = '\u003CmessageId1>' \u002F* | '\u003CmessageId2>' *\u002F;\n\nexport const \u003CcamelCaseRuleName> = createRule\u003C[], MessageIds>({\n  name: '\u003Crule-slug>',\n  meta: {\n    type: 'problem', \u002F\u002F or 'suggestion'\n    docs: {\n      description: '\u003Cone-sentence description matching the user's brief>',\n    },\n    \u002F\u002F fixable: 'code',  \u002F\u002F uncomment if the rule provides any auto-fix\n    schema: [],\n    messages: {\n      '\u003CmessageId1>': '\u003Cviolation message — explain remediation>',\n    },\n  },\n  defaultOptions: [],\n  create(context) {\n    return {\n      \u002F\u002F \u003CAST entry point>(node: TSESTree.\u003CNodeType>) {\n      \u002F\u002F   if (\u002F* violation condition *\u002F) {\n      \u002F\u002F     context.report({ node, messageId: '\u003CmessageId1>' });\n      \u002F\u002F   }\n      \u002F\u002F },\n    };\n  },\n});\n```\n\nNotes:\n\n- `type: 'problem'` for unambiguous violations (e.g. `error` severity); `type: 'suggestion'` for advisory rules (e.g. `warn` severity). Drives ESLint's reported metadata.\n- Multiple `messageId`s if the rule reports distinct violations (e.g. an import-level violation and a call-site violation). Convention: one messageId per logical reason the rule fires.\n- If the rule uses shared helpers, import them from `..\u002Futils\u002Fast-helpers.js` (note the `.js` extension — required for ESM imports).\n- If the rule needs catalog data, import from `..\u002Futils\u002Fcatalog-loaders.js`.\n\n### `tests\u002Frules\u002F$ARGUMENTS[0].test.ts`\n\n```ts\nimport { \u003CcamelCaseRuleName> } from '..\u002F..\u002Fsrc\u002Frules\u002F$ARGUMENTS[0].js';\nimport { ruleTester } from '..\u002Frule-tester.js';\n\nruleTester.run('$ARGUMENTS[0]', \u003CcamelCaseRuleName>, {\n  valid: [\n    \u002F\u002F At least three real fixtures that should NOT trigger.\n    \u002F\u002F Include one obvious case (correct code) and at least one\n    \u002F\u002F false-positive guard (code that superficially looks like a\n    \u002F\u002F violation but isn't — wrong import source, wrong file name,\n    \u002F\u002F wrong AST shape).\n  ],\n  invalid: [\n    \u002F\u002F At least three fixtures that SHOULD trigger.\n    \u002F\u002F Each must exercise a distinct messageId or auto-fix path.\n    \u002F\u002F Shape:\n    \u002F\u002F {\n    \u002F\u002F   code: '\u003Csource>',\n    \u002F\u002F   output: '\u003Csource after --fix, or null if no fix>',\n    \u002F\u002F   errors: [{ messageId: '\u003CmessageId1>' }],\n    \u002F\u002F },\n  ],\n});\n```\n\nConvention: every `messageId` declared in the rule's meta is exercised by at least one fixture in `invalid`. Every auto-fix path has its output verified.\n\n### `docs\u002Frules\u002F$ARGUMENTS[0].md`\n\n```md\n# `$ARGUMENTS[0]`\n\n> **Severity in `recommended`:** \u003Cerror | warn>\n> **Auto-fix:** \u003Cnone | partial | full> — \u003Cone-line description of what's auto-fixed>\n\n## Summary\n\n\u003COne-sentence restatement of the rule for skim-readers.>\n\n## Motivation\n\n\u003COne or two paragraphs explaining the anti-pattern and why the canonical\nform is preferred. Link to the catalogue source at the end.>\n\nSourced from the [`\u003Crecipe-slug>`](..\u002F..\u002F..\u002Fdesign-catalog\u002Fsrc\u002Fresources\u002Fmigration-recipes.json) migration recipe.\n\n## Incorrect\n\n\\`\\`\\`ts\n\u002F\u002F minimal violating snippet\n\\`\\`\\`\n\n## Correct\n\n\\`\\`\\`ts\n\u002F\u002F canonical replacement\n\\`\\`\\`\n\n## Auto-fix\n\n\u003CDescribe what the auto-fix does and what it leaves manual. If the rule\nhas no auto-fix, replace this section with \"Not auto-fixable. \u003Cone-line\nreason>\".>\n\n## Options\n\n\u003CList `meta.schema` options if any. Otherwise: \"None.\">\n\n## References\n\n- [`migration-recipes.json` — `\u003Crecipe-slug>`](..\u002F..\u002F..\u002Fdesign-catalog\u002Fsrc\u002Fresources\u002Fmigration-recipes.json)\n- [Doc URL](https:\u002F\u002Fgithub.com\u002Fgrafana\u002Fdesign\u002Fblob\u002Fmain\u002Fpackages\u002Feslint-plugin-design\u002Fdocs\u002Frules\u002F$ARGUMENTS[0].md)\n```\n\nReplace the catalog-source reference (recipe slug, STYLING.md section, etc.) with whatever the rule is actually motivated by.\n\n## Step 3 — Wire the rule into the plugin barrel\n\nEdit `packages\u002Feslint-plugin-design\u002Fsrc\u002Findex.ts`:\n\n1. **Add the import** in the import block, keeping alphabetical order:\n\n   ```ts\n   import { \u003CcamelCaseRuleName> } from '.\u002Frules\u002F$ARGUMENTS[0].js';\n   ```\n\n2. **Add the rule to the `rules` object**, keyed by its slug, keeping alphabetical order:\n\n   ```ts\n   '$ARGUMENTS[0]': \u003CcamelCaseRuleName>,\n   ```\n\n3. **Add the rule to `configs.recommended.rules`** at the chosen severity, keeping alphabetical order:\n\n   ```ts\n   '@grafana\u002Fdesign\u002F$ARGUMENTS[0]': '\u003Cerror | warn>',\n   ```\n\nThe barrel is already type-checked, so a missed entry surfaces at build time.\n\n## Step 4 — Validate\n\nRun from the repo root:\n\n```bash\npnpm install                                                                # only if dependencies changed\npnpm --filter=@grafana\u002Feslint-plugin-design typecheck\npnpm --filter=@grafana\u002Feslint-plugin-design lint\npnpm --filter=@grafana\u002Feslint-plugin-design build\npnpm --filter=@grafana\u002Feslint-plugin-design test\npnpm prettier --write packages\u002Feslint-plugin-design\u002Fsrc\u002Frules\u002F$ARGUMENTS[0].ts packages\u002Feslint-plugin-design\u002Ftests\u002Frules\u002F$ARGUMENTS[0].test.ts packages\u002Feslint-plugin-design\u002Fdocs\u002Frules\u002F$ARGUMENTS[0].md\n```\n\nThe rule's RuleTester suite will fail until you write real fixtures — that's expected at this stage. Use the test runner's failure output as the prompt to flesh out the test cases.\n\n## Step 5 — Hand off\n\nThe scaffolding is done; the user (or the same session, with the rule's contract now clear) writes:\n\n- The visitor body inside `create(context)`.\n- The auto-fix closure if `fixable: 'code'`.\n- The real `valid` \u002F `invalid` fixtures in the test file.\n- The prose paragraphs (motivation, incorrect\u002Fcorrect examples, references) in the doc.\n\nWhen the rule is functionally complete, the conventional commit on this branch is:\n\n```\nfeat(eslint-plugin-design): add $ARGUMENTS[0] rule\n```\n\nThe scaffolded `src\u002Findex.ts` edit is part of the same commit so the plugin barrel and the new rule land together.\n\n## Rules of the road\n\n- **Slug is the contract.** The file name, the export name (camelCased), the `meta.name`, the messageId namespace, the doc URL — all derive from the slug. Pick it once at the start; don't rename mid-flow.\n- **Imports use `.js` extensions.** This package is ESM; the build emits `.js` files and TypeScript needs the explicit extension on intra-package imports.\n- **Anti-pattern source first.** A rule without a catalog \u002F docs source to point at is a rule reviewers will push back on. If the user can't name the source, that's a signal to either write the source first or reconsider the rule.\n- **Don't write the visitor logic for the user.** Scaffolding gives a working skeleton; the visitor needs the rule author's judgment about AST shapes, false-positive guards, and remediation strategy. Stop after the wire-up step.\n- **`error` vs `warn` aligns with severity, not opinion-strength.** Errors fail CI, warnings annotate. The choice is mostly about whether a violation is unambiguously wrong (error) or might be intentional in some cases (warn).\n","# Scaffold a new lint rule\n\nCreate a new rule **`$ARGUMENTS[0]`** in `@grafana\u002Feslint-plugin-design`. The slug is the rule's canonical name — kebab-case, no `@grafana\u002Fdesign\u002F` prefix. Examples that match the existing convention: `no-bare-grafana-data-import`, `prefer-usage-md-cross-link`, `no-deprecated-icon-shim-import`.\n\n## Before starting\n\nRead these reference files to ensure the new rule matches current convention:\n\n- `packages\u002Feslint-plugin-design\u002Fsrc\u002Findex.ts` — plugin barrel; you'll add the new rule here.\n- `packages\u002Feslint-plugin-design\u002Fsrc\u002Futils\u002Fast-helpers.ts` — `createRule` helper, shared AST predicates (`isStyleFile`, `isInsideIife`, `getImportSourceForJsxName`, `getFilename`).\n- `packages\u002Feslint-plugin-design\u002Fsrc\u002Futils\u002Fcatalog-loaders.ts` — lazy-loaders for catalog data from `@grafana\u002Fdesign-catalog`. If the rule needs a list of canonical components, valid token names, or recipe slugs, source them from here rather than hard-coding.\n- An existing rule whose shape is close to the one you're building. List `packages\u002Feslint-plugin-design\u002Fsrc\u002Frules\u002F` — if a rule of the same AST category already exists, read it + its matching test + doc alongside so the new files match the convention. If no same-shape rule exists yet, use the shape guide below.\n\nShape guide:\n\n| Category                                 | AST entry point                         | Key utilities                                                                                                     | Typical fix                              |\n| ---------------------------------------- | --------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ---------------------------------------- |\n| Import-shape rules                       | `ImportDeclaration` \u002F `ImportSpecifier` | Track import bindings in a `Set\u003Cstring>`; visit `Identifier` references later                                     | Rewrite or remove import specifiers      |\n| JSX-shape rules                          | `JSXElement` \u002F `JSXAttribute`           | `getImportSourceForJsxName(context, name)` from `..\u002Futils\u002Fast-helpers.js` to gate on the source module            | Rewrite JSX attributes or children       |\n| Style-file gating rules                  | any node, gated on filename             | `isStyleFile(getFilename(context))` from `..\u002Futils\u002Fast-helpers.js`; `isInsideIife(node)` for `cssVariables` IIFEs | Often advisory (no auto-fix)             |\n| Call-expression rules                    | `CallExpression`                        | Gate on `callee.name` resolving to an import binding; inspect `arguments`                                         | Rewrite or remove arguments              |\n| Selector-key rules in object expressions | `ObjectExpression` \u002F `Property`         | Match the `key` of each `Property` against a selector pattern (Emotion `css({})` rule tree)                       | Advisory; rule-shape changes are bespoke |\n\n## Step 1 — Gather rule metadata\n\nIf the user hasn't already described the rule, ask:\n\n- **What does the rule catch?** One sentence on the anti-pattern. This becomes the rule's `meta.docs.description`.\n- **Severity in `recommended`** — `error` or `warn`. Errors block CI by convention; warnings surface as advisory annotations. Lean toward `error` for unambiguous anti-patterns sourced from a migration recipe; lean toward `warn` for \"should consider\" guidance.\n- **Auto-fix?** — `none`, `partial` (fix some violations, leave call sites), or `full` (every violation auto-fixable). Drives the rule's `meta.fixable` field and the doc's auto-fix section.\n- **AST entry point(s)** — which TSESTree node types the visitor inspects (`ImportDeclaration`, `JSXElement`, `CallExpression`, `Literal`, `ObjectExpression`, etc.). Drives the create function's return shape.\n- **Catalog source** — which `@grafana\u002Fdesign-catalog` entry motivates this rule. Usually one of:\n  - A migration-recipe slug (e.g. `usestyles2-to-getdesigntokens`).\n  - A `STYLING.md` section heading.\n  - A component USAGE.md anti-pattern.\n  - A `CLAUDE.md` paragraph.\n\n  The doc links back to this source so consumers can chase the rationale.\n\nDerive the camelCase rule name from the slug — `no-bare-grafana-data-import` → `noBareGrafanaDataImport`. This is the exported binding from the rule file and the import name in the barrel.\n\n## Step 2 — Generate the three rule files\n\nAll paths under `packages\u002Feslint-plugin-design\u002F`. Use `Write` for new files.\n\n### `src\u002Frules\u002F$ARGUMENTS[0].ts`\n\nSkeleton — fill in the description, messageIds, and `create` body once the rule's logic is clear.\n\n```ts\n\u002F**\n * \u003COne-paragraph rationale. Reference the catalogue source.>\n *\u002F\nimport type { TSESTree } from '@typescript-eslint\u002Futils';\n\nimport { createRule } from '..\u002Futils\u002Fast-helpers.js';\n\ntype MessageIds = '\u003CmessageId1>' \u002F* | '\u003CmessageId2>' *\u002F;\n\nexport const \u003CcamelCaseRuleName> = createRule\u003C[], MessageIds>({\n  name: '\u003Crule-slug>',\n  meta: {\n    type: 'problem', \u002F\u002F or 'suggestion'\n    docs: {\n      description: '\u003Cone-sentence description matching the user's brief>',\n    },\n    \u002F\u002F fixable: 'code',  \u002F\u002F uncomment if the rule provides any auto-fix\n    schema: [],\n    messages: {\n      '\u003CmessageId1>': '\u003Cviolation message — explain remediation>',\n    },\n  },\n  defaultOptions: [],\n  create(context) {\n    return {\n      \u002F\u002F \u003CAST entry point>(node: TSESTree.\u003CNodeType>) {\n      \u002F\u002F   if (\u002F* violation condition *\u002F) {\n      \u002F\u002F     context.report({ node, messageId: '\u003CmessageId1>' });\n      \u002F\u002F   }\n      \u002F\u002F },\n    };\n  },\n});\n```\n\nNotes:\n\n- `type: 'problem'` for unambiguous violations (e.g. `error` severity); `type: 'suggestion'` for advisory rules (e.g. `warn` severity). Drives ESLint's reported metadata.\n- Multiple `messageId`s if the rule reports distinct violations (e.g. an import-level violation and a call-site violation). Convention: one messageId per logical reason the rule fires.\n- If the rule uses shared helpers, import them from `..\u002Futils\u002Fast-helpers.js` (note the `.js` extension — required for ESM imports).\n- If the rule needs catalog data, import from `..\u002Futils\u002Fcatalog-loaders.js`.\n\n### `tests\u002Frules\u002F$ARGUMENTS[0].test.ts`\n\n```ts\nimport { \u003CcamelCaseRuleName> } from '..\u002F..\u002Fsrc\u002Frules\u002F$ARGUMENTS[0].js';\nimport { ruleTester } from '..\u002Frule-tester.js';\n\nruleTester.run('$ARGUMENTS[0]', \u003CcamelCaseRuleName>, {\n  valid: [\n    \u002F\u002F At least three real fixtures that should NOT trigger.\n    \u002F\u002F Include one obvious case (correct code) and at least one\n    \u002F\u002F false-positive guard (code that superficially looks like a\n    \u002F\u002F violation but isn't — wrong import source, wrong file name,\n    \u002F\u002F wrong AST shape).\n  ],\n  invalid: [\n    \u002F\u002F At least three fixtures that SHOULD trigger.\n    \u002F\u002F Each must exercise a distinct messageId or auto-fix path.\n    \u002F\u002F Shape:\n    \u002F\u002F {\n    \u002F\u002F   code: '\u003Csource>',\n    \u002F\u002F   output: '\u003Csource after --fix, or null if no fix>',\n    \u002F\u002F   errors: [{ messageId: '\u003CmessageId1>' }],\n    \u002F\u002F },\n  ],\n});\n```\n\nConvention: every `messageId` declared in the rule's meta is exercised by at least one fixture in `invalid`. Every auto-fix path has its output verified.\n\n### `docs\u002Frules\u002F$ARGUMENTS[0].md`\n\n```md\n# `$ARGUMENTS[0]`\n\n> **Severity in `recommended`:** \u003Cerror | warn>\n> **Auto-fix:** \u003Cnone | partial | full> — \u003Cone-line description of what's auto-fixed>\n\n## Summary\n\n\u003COne-sentence restatement of the rule for skim-readers.>\n\n## Motivation\n\n\u003COne or two paragraphs explaining the anti-pattern and why the canonical\nform is preferred. Link to the catalogue source at the end.>\n\nSourced from the [`\u003Crecipe-slug>`](..\u002F..\u002F..\u002Fdesign-catalog\u002Fsrc\u002Fresources\u002Fmigration-recipes.json) migration recipe.\n\n## Incorrect\n\n\\`\\`\\`ts\n\u002F\u002F minimal violating snippet\n\\`\\`\\`\n\n## Correct\n\n\\`\\`\\`ts\n\u002F\u002F canonical replacement\n\\`\\`\\`\n\n## Auto-fix\n\n\u003CDescribe what the auto-fix does and what it leaves manual. If the rule\nhas no auto-fix, replace this section with \"Not auto-fixable. \u003Cone-line\nreason>\".>\n\n## Options\n\n\u003CList `meta.schema` options if any. Otherwise: \"None.\">\n\n## References\n\n- [`migration-recipes.json` — `\u003Crecipe-slug>`](..\u002F..\u002F..\u002Fdesign-catalog\u002Fsrc\u002Fresources\u002Fmigration-recipes.json)\n- [Doc URL](https:\u002F\u002Fgithub.com\u002Fgrafana\u002Fdesign\u002Fblob\u002Fmain\u002Fpackages\u002Feslint-plugin-design\u002Fdocs\u002Frules\u002F$ARGUMENTS[0].md)\n```\n\nReplace the catalog-source reference (recipe slug, STYLING.md section, etc.) with whatever the rule is actually motivated by.\n\n## Step 3 — Wire the rule into the plugin barrel\n\nEdit `packages\u002Feslint-plugin-design\u002Fsrc\u002Findex.ts`:\n\n1. **Add the import** in the import block, keeping alphabetical order:\n\n   ```ts\n   import { \u003CcamelCaseRuleName> } from '.\u002Frules\u002F$ARGUMENTS[0].js';\n   ```\n\n2. **Add the rule to the `rules` object**, keyed by its slug, keeping alphabetical order:\n\n   ```ts\n   '$ARGUMENTS[0]': \u003CcamelCaseRuleName>,\n   ```\n\n3. **Add the rule to `configs.recommended.rules`** at the chosen severity, keeping alphabetical order:\n\n   ```ts\n   '@grafana\u002Fdesign\u002F$ARGUMENTS[0]': '\u003Cerror | warn>',\n   ```\n\nThe barrel is already type-checked, so a missed entry surfaces at build time.\n\n## Step 4 — Validate\n\nRun from the repo root:\n\n```bash\npnpm install                                                                # only if dependencies changed\npnpm --filter=@grafana\u002Feslint-plugin-design typecheck\npnpm --filter=@grafana\u002Feslint-plugin-design lint\npnpm --filter=@grafana\u002Feslint-plugin-design build\npnpm --filter=@grafana\u002Feslint-plugin-design test\npnpm prettier --write packages\u002Feslint-plugin-design\u002Fsrc\u002Frules\u002F$ARGUMENTS[0].ts packages\u002Feslint-plugin-design\u002Ftests\u002Frules\u002F$ARGUMENTS[0].test.ts packages\u002Feslint-plugin-design\u002Fdocs\u002Frules\u002F$ARGUMENTS[0].md\n```\n\nThe rule's RuleTester suite will fail until you write real fixtures — that's expected at this stage. Use the test runner's failure output as the prompt to flesh out the test cases.\n\n## Step 5 — Hand off\n\nThe scaffolding is done; the user (or the same session, with the rule's contract now clear) writes:\n\n- The visitor body inside `create(context)`.\n- The auto-fix closure if `fixable: 'code'`.\n- The real `valid` \u002F `invalid` fixtures in the test file.\n- The prose paragraphs (motivation, incorrect\u002Fcorrect examples, references) in the doc.\n\nWhen the rule is functionally complete, the conventional commit on this branch is:\n\n```\nfeat(eslint-plugin-design): add $ARGUMENTS[0] rule\n```\n\nThe scaffolded `src\u002Findex.ts` edit is part of the same commit so the plugin barrel and the new rule land together.\n\n## Rules of the road\n\n- **Slug is the contract.** The file name, the export name (camelCased), the `meta.name`, the messageId namespace, the doc URL — all derive from the slug. Pick it once at the start; don't rename mid-flow.\n- **Imports use `.js` extensions.** This package is ESM; the build emits `.js` files and TypeScript needs the explicit extension on intra-package imports.\n- **Anti-pattern source first.** A rule without a catalog \u002F docs source to point at is a rule reviewers will push back on. If the user can't name the source, that's a signal to either write the source first or reconsider the rule.\n- **Don't write the visitor logic for the user.** Scaffolding gives a working skeleton; the visitor needs the rule author's judgment about AST shapes, false-positive guards, and remediation strategy. Stop after the wire-up step.\n- **`error` vs `warn` aligns with severity, not opinion-strength.** Errors fail CI, warnings annotate. The choice is mostly about whether a violation is unambiguously wrong (error) or might be intentional in some cases (warn).\n",{"name":5,"metadata":24,"description":7,"allowed-tools":27,"argument-hint":28},{"source":25,"generated":26},".hatch\u002F_skills\u002Fnew-eslint-rule\u002FSKILL.md","hatch@v1.2.0","Read, Write, Edit, Glob, Grep, Bash","\u003Crule-slug>","main","9b85ba995139627c15a6ef1cec1daec64659cf75",".claude\u002Fskills\u002Fnew-eslint-rule","https:\u002F\u002Fgithub.com\u002Ftorkelo\u002Fscenes2","https:\u002F\u002Fgithub.com\u002Ftorkelo","https:\u002F\u002Fgrafana.com","Grafana Labs Co-Founder, Grafana Creator & product manager & lead architect.  ","2026-11-14 19:30:54",{"source":8,"skillName":5,"commands":38,"prompt":48,"zipAvailable":49},[39,42,45],{"tool":40,"command":41},"npx","npx skills add torkelo\u002Fscenes2 --skill new-eslint-rule",{"tool":43,"command":44},"bunx","bunx skills add torkelo\u002Fscenes2 --skill new-eslint-rule",{"tool":46,"command":47},"pnpm","pnpm dlx skills add torkelo\u002Fscenes2 --skill new-eslint-rule","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Ftorkelo\u002Fscenes2\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fnew-eslint-rule\u002FSKILL.md",true,[],[52,59,66,71,76,83],{"skillNo":53,"name":54,"nameZh":6,"description":55,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":56,"categories":57,"keywords":58,"publishedAt":19},"01M7B1QT196EFM12F7737ZFBJ3","validate-plugin","validate a Grafana plugin using the official Grafana plugin validator","https:\u002F\u002Fgithub.com\u002Ftorkelo\u002Fscenes2\u002Fblob\u002Fmain\u002Fapps\u002Fdemo-app\u002F.codex\u002Fskills\u002Fvalidate-plugin\u002FSKILL.md",[],[],{"skillNo":60,"name":61,"nameZh":6,"description":62,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":63,"categories":64,"keywords":65,"publishedAt":19},"01M7B1QQGHG8JJ9MK4BY2V8879","build-plugin","build a Grafana plugin using the standard build process (frontend and backend if applicable)","https:\u002F\u002Fgithub.com\u002Ftorkelo\u002Fscenes2\u002Fblob\u002Fmain\u002Fapps\u002Fdemo-app\u002F.codex\u002Fskills\u002Fbuild-plugin\u002FSKILL.md",[],[],{"skillNo":67,"name":54,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":68,"categories":69,"keywords":70,"publishedAt":19},"01M7B1QPP9RN7E1KNMRK9D8V6M","https:\u002F\u002Fgithub.com\u002Ftorkelo\u002Fscenes2\u002Fblob\u002Fmain\u002Fapps\u002Fdemo-app\u002F.claude\u002Fskills\u002Fvalidate-plugin\u002FSKILL.md",[],[],{"skillNo":72,"name":61,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":19},"01M7B1QN3V9SQ7H6WXNZDMQ57Q","https:\u002F\u002Fgithub.com\u002Ftorkelo\u002Fscenes2\u002Fblob\u002Fmain\u002Fapps\u002Fdemo-app\u002F.claude\u002Fskills\u002Fbuild-plugin\u002FSKILL.md",[],[],{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":19},"01M7B1QJEW06858M7GC4EM46B5","stop-slop","Remove AI writing patterns from prose. Use when drafting, editing, or reviewing text to eliminate predictable AI tells.","https:\u002F\u002Fgithub.com\u002Ftorkelo\u002Fscenes2\u002Fblob\u002Fmain\u002F.hatch\u002F_skills\u002Fstop-slop\u002FSKILL.md",[],[],{"skillNo":84,"name":85,"nameZh":6,"description":86,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":19},"01M7B1QGEPPZQQNRJRXTQVZAKC","snag-fixer","Lightweight agent for quick fixes, tweaks, and small improvements. Optimized for single-task focused work without bloating context. Used by snag workflow for sequential fix processing.","https:\u002F\u002Fgithub.com\u002Ftorkelo\u002Fscenes2\u002Fblob\u002Fmain\u002F.hatch\u002F_skills\u002Fsnag-fixer\u002FSKILL.md",[],[]]