{"data":{"slug":"github-thedaviddias-front-end-checklist-skills-improve-rule-4cfe8330a5f4","title":"Improve a Front-End Checklist Rule","summary":"Enhance the quality of Front-End Checklist rule MDX files by fixing stub prompts, adding code examples, and improving structure for better AI integration.","url":"https:\/\/skillshunter.net\/skills\/github-thedaviddias-front-end-checklist-skills-improve-rule-4cfe8330a5f4","json_url":"https:\/\/skillshunter.net\/api\/public\/v1\/skills\/github-thedaviddias-front-end-checklist-skills-improve-rule-4cfe8330a5f4","markdown_url":"https:\/\/skillshunter.net\/skills\/github-thedaviddias-front-end-checklist-skills-improve-rule-4cfe8330a5f4.md","download_url":"https:\/\/skillshunter.net\/skills\/github-thedaviddias-front-end-checklist-skills-improve-rule-4cfe8330a5f4\/download","category":{"slug":"content-editorial","name":"Content & Editorial"},"editor_note":"Before starting, run the quality scorer and structure validator using the provided commands to identify failing dimensions and structural issues. Ensure all prompts are specific and actionable, and include `aiContext` for clarity on when the rule applies.","instructions":"---\nname: improve-rule\ndescription: \"Use when reviewing or improving a Front-End Checklist rule MDX file to raise its quality score, fix stub prompts, add missing fields, or enrich content with real code examples.\"\nmetadata:\n  category: meta\n  source: frontendchecklist.io\n  url: https:\/\/frontendchecklist.io\n---\n\n# Improve a Front-End Checklist Rule\n\nThis skill helps you review and improve the quality of rule MDX files in the Front-End Checklist project. Use it to fix stub content, write better AI prompts, and enrich rules so they score well against the quality rubric.\n\n## Quality Dimensions\n\nEvery rule is scored across these dimensions (see `references\/scoring-rubric.md` for full details):\n\n| Dimension | Max | What \"good\" looks like |\n|-----------|-----|------------------------|\n| `prompts.check` | 10 | Specific audit instruction, not generic |\n| `prompts.fix` | 10 | Actionable fix steps with CSS\/HTML\/JS specifics |\n| `prompts.explain` | 10 | Explains the *why*, not just restates the title |\n| `tldr` | 5 | 3+ concise bullets, each a standalone takeaway |\n| `whyItMatters` | 5 | 1\u20132 sentences, concrete user impact |\n| `aiContext` | 5 | \"Applies to\u2026\" \u2014 when should an agent use this? |\n| `relatedRules` | 5 | 2+ slug + reason pairs |\n| `codeExamples` | 10 | 3+ \u2705\/\u274c annotated blocks in the body |\n| `bodyDepth` | 10 | 300+ words, not a stub |\n| `resources` | 5 | External links (MDN, WCAG, articles) |\n| `prompts.codeReview` | 5 | Code review workflow prompt (optional) |\n\n**Base score: 100 with additional conditional V2 points. Target: \u2265 50 (passing).**\n\n## Stub Prompts \u2014 What to Avoid\n\nThese patterns are automatically detected as low-quality:\n- \"Verify if the project adheres to: [Rule Title]\"\n- \"Update the codebase to align with: [Rule Title]\"\n- \"Explain the importance of [Rule Title]\"\n\nReplace them with specific, actionable instructions that name the exact HTML attributes, CSS properties, or JavaScript patterns involved.\n\n## Check\n\nRun the quality scorer on a specific rule to see its current score:\n```bash\npnpm score:rules packages\/content\/rules\/en\/{category}\/{slug}.mdx\n```\n\nThen open the MDX file and identify which dimensions are failing.\n\nRun the structure validator as well:\n```bash\npnpm validate:rule-structure packages\/content\/rules\/en\/{category}\/{slug}.mdx\n```\n\nThe rule body must follow this order:\n- intro paragraph before any H2\n- `## Code Example` or `## Code Examples`\n- `## Why It Matters`\n- optional guidance sections\n- final `## Verification`\n\nRule Contract V2 adds conditional sections:\n- `## Exceptions` for false positives, caveats, or valid exceptions\n- `### Automated Checks` and `### Manual Checks` inside `## Verification` when both matter\n- `## Browser Support`, `## Support Notes`, or `## Standards` when compatibility or compliance changes implementation decisions\n\nUse the repo browser policy plus package-backed compatibility data for browser-support notes. Do not guess support ranges from memory.\n\n## Fix\n\nWhen improving a rule:\n\n1. **Fix stub prompts first** \u2014 they have the highest point value (30 pts combined)\n   - `check`: name the exact attributes\/patterns to audit\n   - `fix`: give step-by-step remediation with code snippets\n   - `explain`: explain the user impact, not just the technical detail\n\n2. **Add `aiContext`** \u2014 one sentence: \"Applies to any HTML page with [X]\" or \"Use when reviewing [Y] in [Z] context\"\n\n3. **Add\/expand `tldr`** \u2014 3 bullets minimum, each ending with a concrete rule of thumb\n\n4. **Enrich body content** \u2014 add \u2705 good example and \u274c bad example code blocks for each concept\n\n5. **Add `relatedRules`** \u2014 link 2+ rules with a reason explaining the connection\n\n6. **Add `resources`** \u2014 MDN docs, WCAG success criteria, relevant articles\n\n7. **Fix structure lint issues** \u2014 rename final `Testing`\/`Checklist`-style headings to `## Verification`, keep optional guidance between `Why It Matters` and `Verification`, and never place H2 sections after `Verification`\n\n8. **Add contract clarity where needed** \u2014 use `Exceptions`, verification split, and standards\/support notes only when the rule type actually benefits from them\n\n## Explain\n\nThe quality score is a proxy for how useful the rule is to both human developers and AI agents.\n\n- A rule with stub prompts gives Claude generic instructions \u2014 the AI can't provide targeted help\n- A rule without code examples is hard to learn from\n- A rule without `aiContext` won't trigger at the right moment when used as a Claude Code skill\n- A rule without `relatedRules` is an island \u2014 agents can't traverse the knowledge graph\n\nHigh-quality rules become high-quality skills that Claude can use proactively and precisely.\n\n## Code Review\n\nWhen reviewing a PR that adds or modifies rule MDX files, check:\n- No stub prompts (grep for \"Verify if the project adheres to\")\n- At least 3 `tldr` bullets\n- `whyItMatters` is specific (mentions user impact, not just \"improves quality\")\n- Body has at least one \u2705 and one \u274c code example\n- `## Verification` is the final H2 and `## Why It Matters` appears before it\n- `pnpm validate:rule-structure {file}` passes\n- Score is \u2265 50: `pnpm score:rules {file}`\n\n---\n\nSee `references\/scoring-rubric.md` for the full scoring specification.\nRule page: https:\/\/frontendchecklist.io\n","use_cases":["Fix generic prompts like 'Verify if the project adheres to: [Rule Title]' with specific instructions","Add code examples with \u2705 and \u274c annotations to illustrate good and bad practices","Improve scoring by adding `tldr` bullets and `whyItMatters` explanations"],"limitations":[],"compatibility":[],"setup_tip":null,"sample_input":null,"sample_output":null,"source_url":"https:\/\/github.com\/thedaviddias\/Front-End-Checklist\/blob\/e8d14d049010e2ce25afcd5e8609dfcbbe63e47e\/skills\/improve-rule\/SKILL.md","source_commit":"e8d14d049010e2ce25afcd5e8609dfcbbe63e47e","license":null,"version":null,"listing_approved_at":"2026-11-23","created_at":"2026-11-22T16:36:04.000000Z","updated_at":"2026-11-23T04:55:22.000000Z","seo_title":"Improve Front-End Checklist Rule Quality","seo_description":"Enhance Front-End Checklist rule MDX files with actionable prompts, code examples, and structured content for better AI integration and quality scoring.","seo_keywords":["improve front-end checklist rule","fix front-end checklist prompts","enhance front-end checklist code examples","optimize front-end checklist scoring","structure front-end checklist rule"]}}