/frontend:frontend-best-practicesfrom frontend
Modifies existing frontend components without regressions by adding-not-modifying, surfaces conflicting constraints before coding, and debugs visual issues autonomously via Chrome DevTools.
Ships in frontend. 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.
None: SKILL.md is the whole skill.
Methodology for modifying existing frontend code without regressions, surfacing constraint conflicts upfront, and debugging visual issues autonomously.
These are the three habits that turn long, iterative frontend sessions into focused 3-step exchanges.
Components already deployed in production are functional and validated. Before modifying any existing CSS selector, padding, color, or rule that is already applied somewhere:
grep all upstream usages and quantify the impact (how many templates, which projects, who maintains them)// ❌ Modifies the existing rule used by every Badge in production
.badge {
padding: 4px 12px; // was: 6px 12px → may break alignment elsewhere
background-color: $primary; // was: $default-200 → changes every existing badge
}
// ✅ Adds a new variant, existing badges unchanged
.badge {
/* ... existing rules untouched ... */
}
&[class*="badge-outline"] {
background-color: $default-100;
border: 1px solid $default-300;
}
&.badge-outline-primary { color: $primary; }
If you need a deviation in just one place (a design system demo, a one-off layout), use a scoped wrapper class rather than altering a shared component:
<div class="my-feature-area">
<SharedComponent />
</div>
.my-feature-area .shared-component-internal { /* scoped override */ }
The shared component stays untouched. The override is contained.
When the user states multiple constraints, verify their physical compatibility first. A common failure mode is to start coding the first interpretation and iterate when the others break — this can burn 4-6 round-trips on the same property.
The user says:
These are physically incompatible: if the stripe is at x = 10 and the body text is also at x = 10 (preserved alignment), there cannot be an 8px gap between them.
Write back to the user explicitly:
Your 3 constraints conflict:
- (1) implies body text at x = 10
- (2) implies stripe at x = 10
- (1) + (2) means stripe and text overlap → (3) cannot be satisfied
Which takes priority? Or do you accept shifting body text to x = 20 (breaks 1) to satisfy 2 + 3?
This single message saves typically 4-5 iterations. The user picks the priority and you implement once.
Whenever a request includes:
→ Pause, write the constraint matrix, and ask which wins.
If the user reports a visual issue ("the marker is too small", "the text is misaligned", "the color is off"):
chrome-devtools MCP (mcp__chrome-devtools__evaluate_script) to retrieve getBoundingClientRect(), getComputedStyle(), and DOM structure of the element AND its siblings/parentdisplay: flex on a td breaks row height inheritance, an inherited font-size overrides yours, a :has() selector cascades wider than expected, etc.) BEFORE proposing a fix() => {
const el = document.querySelector('.marker');
const parent = el.closest('td');
const sibling = parent?.nextElementSibling;
return {
el: {
height: el.getBoundingClientRect().height,
display: getComputedStyle(el).display,
alignSelf: getComputedStyle(el).alignSelf,
},
parent: {
height: parent.getBoundingClientRect().height,
display: getComputedStyle(parent).display,
verticalAlign: getComputedStyle(parent).verticalAlign,
},
sibling: sibling ? {
height: sibling.getBoundingClientRect().height,
display: getComputedStyle(sibling).display,
} : null,
};
}
The output tells you exactly what's happening — no guessing, no asking. You become autonomous: measure, diagnose, propose.
For any visual bug, default to inspecting:
Only ask when:
In every other case, inspect first.
Frontend modification incoming
│
├─→ Existing component? ── Yes ──→ Can I ADD instead of MODIFY?
│ │
│ └─→ No → grep usages, quantify impact
│
├─→ Multiple constraints? ── Yes ──→ Compatible? → No → lift to user
│
└─→ Visual bug? ── Yes ──→ Inspect via DevTools MCP first → diagnose → propose
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub fabiensalles/claude-marketplace --plugin frontend3 skills in this plugin
/frontend-clean-architectureACTIVATE when creating or modifying frontend features in projects with domain/infrastructure layered architecture. ACTIVATE for 'frontend architecture', 'domain layer', 'hexagonal frontend', 'features/ folder', 'repository interface', 'mapper'. Covers: features/{feature-name}/domain + infrastructure structure, strict dependency direction (domain never imports infrastructure), domain models/repositories/services/referentials, API repositories, mappers, hooks as orchestrators. DO NOT use for: projects without this architecture (ask user first), general React patterns (see frontend-component-patterns)./frontend-component-patternsACTIVATE when creating or refactoring React components, splitting large components, extracting hooks, or deciding Container vs Presentation. ACTIVATE for 'component split', 'Container/Presentation', 'extract hook', 'god component', 'prop drilling'. Covers: Container vs Presentation criteria, when to extract custom hooks (3+ related states), when to split markup (150+ lines), when to move logic to domain service, form section props convention, spotlight/opacity pattern. DO NOT use for: projects not using Container/Presentation (ask first), general React hooks API.Other plugins' skills for the same job