focus-states

focus-states is a skill for Claude Code from dylantarre/design-system-skills. It costs 45 tokens per session (1,729 once invoked), scanned A, original, MIT.

A guide for making the element currently selected by keyboard navigation visibly stand out. WCAG is an accessibility standard for making websites usable by more people, including people who use keyboards.

In plain words
What is it for?
Use it to create or repair focus styles such as outlines, glows, underlines, or combined indicators, with keyboard-testing guidance.
Why use it?
It addresses focus rings that are missing, too faint, or hidden, so keyboard users can tell where they are.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the design-system-skills plugin — 29 skills shipped together

Good fit Use it to create or repair focus styles such as outlines, glows, underlines, or combined indicators, with keyboard-testing guidance.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/dylantarre/design-system-skills/focus-states
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.

Any agent
npx skills add dylantarre/design-system-skills --skill focus-states
Clone the repo
git clone --depth 1 https://github.com/dylantarre/design-system-skills

Made for: Claude Code.

Or install design-system-skills, the plugin that ships this one along with the rest of its 29 skills.

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 focus-states

README.md
[![agentmods](https://agentmods.dev/badge/skills/dylantarre/design-system-skills/focus-states/github.svg)](https://agentmods.dev/skills/dylantarre/design-system-skills/focus-states)
Your own site
<a href="https://agentmods.dev/skills/dylantarre/design-system-skills/focus-states"><img src="https://agentmods.dev/badge/skills/dylantarre/design-system-skills/focus-states/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for focus-states

Your own site · 80×15
<a href="https://agentmods.dev/skills/dylantarre/design-system-skills/focus-states"><img src="https://agentmods.dev/badge/skills/dylantarre/design-system-skills/focus-states.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 45 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,729 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00045 $0.01729
Opus 5 $0.00023 $0.00864
Sonnet 5 $0.00009 $0.00346
Haiku 4.5 $0.00005 $0.00173

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

Security

Grade A, and why

focus-states 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 12d 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.

skills/accessibility/focus-states/SKILL.md · 260 lines

How it starts

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

Focus States Generator

Overview

Generate accessible, visible focus indicators for interactive elements. Creates focus styles that meet WCAG 2.4.7 (Focus Visible) and 2.4.11 (Focus Appearance) requirements while maintaining visual design consistency.

When to Use

  • Setting up focus styles for a design system
  • Ensuring keyboard navigation is visible
  • Creating custom focus rings that match brand
  • Fixing "invisible" focus states in existing UI

Quick Reference: WCAG Requirements

Criterion Requirement Level
2.4.7 Focus Visible Focus indicator must be visible AA
2.4.11 Focus Appearance 2px+ perimeter, 3:1 contrast AAA
2.4.12 Focus Not Obscured Focus not hidden by other content AA

The Process

  1. Get brand colors: Primary color and background colors
  2. Ask style preference:
    • Ring (outline around element)
    • Glow (soft shadow-based)
    • Underline (for text links)
    • Hybrid (ring + offset)
  3. Ask visibility approach: Always visible or focus-visible only?
  4. Generate: Create focus tokens and utility classes
  5. Test guidance: Provide keyboard testing checklist

Focus Style Options

Style Character Best For
Ring Clean, defined Buttons, inputs, cards
Glow Soft, modern Dark themes, premium UI
Underline Minimal Text links, nav items
Offset High contrast When ring blends with element
Inset Subtle Contained elements

Output Formats

CSS Custom Properties + Utilities:

:root {
  /* Focus tokens */
  --focus-ring-color: #2563eb;
  --focus-ring-width: 2px;
  --focus-ring-offset: 2px;
  --focus-ring-style: solid;

  /* Computed focus ring */
  --focus-ring: var(--focus-ring-width) var(--focus-ring-style) var(--focus-ring-color);
  --focus-ring-offset-shadow: 0 0 0 var(--focus-ring-offset) var(--color-background);
  --focus-ring-shadow: 0 0 0 calc(var(--focus-ring-offset) + var(--focus-ring-width)) var(--focus-ring-color);
}

/* Base focus reset */
*:focus {
  outline: none;
}

/* Focus-visible for keyboard only */
*:focus-visible {
  outline: var(--focus-ring);
  outline-offset: var(--focus-ring-offset);
}

/* Alternative: box-shadow approach (more styling control) */
.focus-ring:focus-visible {
  outline: none;
  box-shadow:
    var(--focus-ring-offset-shadow),
    var(--focus-ring-shadow);
}

Read the full file on GitHub · 260 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. 12d ago First seen · 260 lines · 45 tokens per session scan A ccafd24e5c02

Subscribe to this mod's changes

focus-states is a skill published in the GitHub repository dylantarre/design-system-skills (43 stars, last pushed 8mo ago), licensed MIT. It adds 45 tokens to every session and 1,729 once invoked, about $0.0002 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

chakra-ui-builder

Build responsive, accessible UI components and layouts using Chakra UI v3, install or configure Chakra UI in new and existing projects, and design scalable themes using tokens, semantic tokens, recipes, and slot recipes. Use this skill whenever a user asks to build, create, or generate any UI component, page, form…

chakra-ui/chakra-ui · 214 tokens

visual-ralph

Visual Ralph orchestration for frontend UI from generated references, static references, or live URL targets, using $ultragoal with built-in visual verdict and pixel-diff evidence until the implementation matches and leaves a reproducible design system.

Yeachan-Heo/oh-my-codex · 52 tokens

frontend-visual-qa

Audits already-rendered web, landing-page, HTML deck/slide, browser tool/game, dashboard/admin, design-system, and desktop UIs using real-browser or native-app journeys, inspected screenshots, DOM geometry, responsive or projection viewports, and a bundled Playwright sweep. Use after UI implementation to find…

daymade/claude-code-skills · 145 tokens

prototype-web

A clickable, high-fidelity web product prototype with navigation, a hero section, feature cards, steps, social proof, and optional pricing. It is designed to resemble a finished landing page while remaining a prototype.

nexu-io/html-anything · 24 tokens

waitlist-page

A simple waitlist page for collecting email addresses from people interested in a new product or early-access release.

nexu-io/html-anything · 25 tokens

refactoring-ui

Audit and fix visual hierarchy, spacing, color, and depth in web UIs. Use when the user mentions "my UI looks off" (or amateur/unprofessional), "fix the design", "Tailwind styling", "color palette", "visual hierarchy", "design system", "spacing scale", or "component styling". Also trigger when building consistent…

wondelai/skills · 132 tokens