frontend-layering-specificity-debug

frontend-layering-specificity-debug is a skill for Claude Code, Codex from JinNing6/Noosphere. It costs 69 tokens per session (666 once invoked), scanned A, original, Apache-2.0.

A troubleshooting workflow for frontend controls and React Three Fiber/Drei labels, which are HTML elements displayed inside 3D scenes.

In plain words
What is it for?
It reproduces the issue, checks computed styles and element overlap, identifies conflicting CSS rules, and applies fixes for typography, wrapping, stacking, and interaction.
Why use it?
It finds why buttons or links ignore their intended text sizing, and why 3D labels appear above drawers, dialogs, or navigation despite their z-index.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/jinning6/noosphere/frontend-layering-specificity-debug
Any agent
npx skills add JinNing6/Noosphere --skill frontend-layering-specificity-debug
Clone the repo
git clone --depth 1 https://github.com/JinNing6/Noosphere

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for frontend-layering-specificity-debug

README.md
[![agentmods](https://agentmods.dev/badge/skills/jinning6/noosphere/frontend-layering-specificity-debug.svg)](https://agentmods.dev/skills/jinning6/noosphere/frontend-layering-specificity-debug)
Your own site
<a href="https://agentmods.dev/skills/jinning6/noosphere/frontend-layering-specificity-debug"><img src="https://agentmods.dev/badge/skills/jinning6/noosphere/frontend-layering-specificity-debug.svg" alt="Measured on agentmods" height="20"></a>
Per session 69 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 666 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00069 $0.00666
Opus 5 $0.00034 $0.00333
Sonnet 5 $0.00014 $0.00133
Haiku 4.5 $0.00007 $0.00067

Measured 5d ago against content hash 1c3675899430, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

frontend-layering-specificity-debug scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

shared_skills/active/frontend-layering-specificity-debug/SKILL.md · 60 lines

How it starts

The opening of the file, as written. The whole thing — 60 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Frontend Layering And Specificity Debug

Diagnose Before Styling

  1. Reproduce at the reported viewport and interaction state.
  2. Record bounding boxes plus computed font-size, line-height, width, height, and z-index.
  3. Compare equivalent element types. A <button> and an <a> that share a component class but render differently usually indicate a selector or user-agent boundary.
  4. Enumerate matched CSS rules instead of inferring from source order alone.
  5. Use document.elementFromPoint() at the overlap to identify the element that actually paints or receives input.

Fix Typography Specificity

  • Treat shorthand declarations such as font: inherit as resetting font-size, font-weight, and line-height together.
  • Check specificity as well as order. .app button overrides .button even when .button appears later.
  • In scoped resets, prefer font-family: inherit and explicit inherited properties. Keep component-level font-size and line-height authoritative.
  • Add white-space: nowrap only to stable command controls; use responsive label collapse when the toolbar cannot fit.
  • Verify computed styles on real <button>, <a>, <input>, and <select> elements after the fix.

Fix Projected 3D Labels

  • Remember that Drei <Html> is projected DOM, not canvas pixels. Its default zIndexRange is extremely high and can paint over an otherwise opaque drawer.
  • Assign a bounded range such as zIndexRange={[8, 1]} for scene labels, then keep application chrome above it.
  • Do not keep increasing drawer z-index without identifying the projected label range and stacking context.
  • Reserve real canvas width for persistent desktop drawers when labels or selected nodes would otherwise sit underneath them.
  • Use semantic zoom: show detailed labels only for hover, selection, a focused domain, or an actual non-empty search match.

Regression Checks

Run desktop, compressed desktop, and mobile checks:

const style = getComputedStyle(control)
expect(style.fontSize).toBe('13px')
expect(document.body.scrollWidth).toBe(document.documentElement.clientWidth)

Read the full file on GitHub · 60 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 60 lines · 69 tokens per session scan A 1c3675899430

Subscribe to this mod's changes

frontend-layering-specificity-debug is a skill published in the GitHub repository JinNing6/Noosphere (18 stars, last pushed 5d ago), licensed Apache-2.0. It adds 69 tokens to every session and 666 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories