audit-tv-focus
Audit a component or screen for TV D-pad focus completeness, Magic Remote compatibility, and navigation correctness. Use when the user wants to verify a component is TV-ready.
- License 许可
- MIT
- 最近更新
- 2026-11-12
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- audit-tv-focus
- tags
- [ "smarttv", "focus", "audit", "react", "accessibility" ]
- type
- skill
- agents
- [ "claude", "codex", "cursor", "gemini", "copilot" ]
- author
- Aliendreamer
- version
- 0.1.0
- description
- Audit a component or screen for TV D-pad focus completeness, Magic Remote compatibility, and navigation correctness. Use when the user wants to verify a component is TV-ready.
- user-invocable
- true
- disable-model-invocation
- false
03 SKILL.md 正文
TV Focus Audit
Audit a component or screen for TV focus and navigation correctness.
Input: Path to a component file, directory, or screen name. If omitted, ask.
Steps
-
Resolve the target
If no path provided, use AskUserQuestion to ask:
"Which component or screen do you want to audit? Provide a file path or screen name."
Read all relevant files: the component, its CSS/Tailwind classes, and any hooks it uses for navigation.
-
Run static analysis checks
Read the target files and check for each item below. Track findings per category.
A. Focusability
- [ ] All interactive elements have
tabIndexor are natively focusable (<button>,<a>) - [ ] No interactive element uses
tabIndex={-1}without a programmatic focus strategy - [ ] Non-interactive elements (divs, spans) used as buttons have
tabIndex={0}+role - [ ]
role="button"/role="link"present where semantic HTML is not used
B. D-pad Navigation
- [ ]
onKeyDown(or equivalent) handlesArrowUp,ArrowDown,ArrowLeft,ArrowRight - [ ]
Enterkey triggers the same action as click/tap - [ ]
Backspace/ back button is handled where navigation back is expected - [ ] Focus never gets trapped in a dead end (modal/overlay has explicit close)
- [ ] Focus restores to correct element after modal/overlay closes
C. Focus Visibility
- [ ]
:focusCSS styles are defined (not removed withoutline: nonewithout replacement) - [ ] Focus indicator meets contrast requirements (visible on all backgrounds)
- [ ] No
:focus-visibleused (not supported in Chromium 70 - use:focusinstead)
D. Hover-only Interactions
- [ ] No functionality is gated behind
:hoveronly - [ ] All hover effects have a
:focusequivalent
E. LG Magic Remote Compatibility
- [ ] If pointer events (
pointermove,pointerdown,click) are used: D-pad fallback exists - [ ] Input mode detection present if both hover and focus styles are used
- [ ]
cursor: pointernot assumed to always be visible - [ ]
:hoverstyles used only as enhancement, not sole interaction method
F. Focus Management Patterns
- [ ] Initial focus is set explicitly on screen/modal mount
- [ ] Focus order follows visual layout (logical reading order)
- [ ] Large lists use focus virtualization or windowing to avoid DOM overload
- [ ] All interactive elements have
-
Check for known anti-patterns
Flag any of these directly:
onClickwithoutonKeyDownEnter handler on a non-button elementoutline: noneoroutline: 0without a replacement focus style:focus-visible(unsupported in Chromium 70)- Hover-gated functionality with no focus equivalent
document.activeElementchecks without null guardssetTimeoutused for focus management without clear reason (fragile)
-
Report findings
Format:
## TV Focus Audit: <component name> ### Summary - Total issues: N (X critical, Y warnings, Z suggestions) ### Critical Issues (must fix) - [file:line] Description of issue + how to fix ### Warnings (should fix) - [file:line] Description ### Suggestions (nice to have) - Description ### Passed Checks - A. Focusability: all OK - C. Focus Visibility: all OK ... -
Offer to fix
After the report, ask:
"Want me to fix the critical issues?"
If yes: fix only the reported issues, do not refactor surrounding code.
Guardrails
- Only read files, never modify unless user confirms fixes
- Flag but do not auto-fix warnings - always ask
- Do not add features beyond what's needed to pass the checks
- LG Magic Remote section: only flag if pointer events are already in use - don't force Magic Remote support where it wasn't planned
04 同仓库更多 Skills
setup-git-credentials
Use when the user wants Git to stop using a PAT in the remote URL or a plain-text credential store, wants Git Credential Manager (GCM) with OAuth for GitHub, GitLab or Azure DevOps on Ubuntu/Debian or WSL2, or sees 'cannot persist Microsoft authentication token cache securely' / 'using plain-text fallback token cache'. Asks whether this is WSL, which Git hosts and which parts to set up, checks what is already done, sets git config itself after confirmation and hands every sudo or interactive step (apt, gpg, pass init, secret-tool, first sign-in) to the user. Bundles gcm-keyring-session.sh to start or reuse a D-Bus + GNOME Keyring session without systemd. Trigger terms - git credentials, PAT in URL, token in remote, git credential manager, gcm, github auth, gitlab auth, azure devops auth, pass, gpg store, secret service, gnome keyring, msal token cache, wsl git auth.
setup-flow
Use when onboarding a repository or agent to the standard development workflow — installs the required skills from the ai.skills store, installs or updates a MANDATORY workflow block in the agent's instruction file (CLAUDE.md, AGENTS.md, GEMINI.md, Copilot or Cursor rules), AND configures .claude/settings.json with Serena MCP, sandbox, permissions, hooks, and plugins. Hooks are wired to the context-hooks kit, which speaks once per session instead of injecting text on every turn; re-running replaces earlier inline hooks rather than adding to them. Also writes .vscode/settings.json to hide the empty shell dotfiles an agent sandbox leaves in the repo root. Use when setting up a new repo, switching agents, or refreshing the workflow rules.
developer-flow
Use when starting, implementing, or completing any feature, change, or fix in any software project — at feature start, before writing code, and before claiming a change is done, fixed, working, or green. A strict ordered flow with a gate per phase; stack-agnostic and repo-agnostic (OpenSpec optional, gates discovered).
daily-log-check
Use to check whether everyone on duty filed their Azure DevOps time-log Tasks for a given day, per platform — reports tickets, hours and activities per person against the headcount you give. Fires on "did everyone log yesterday", "check web 4 mobile 3", "who is missing for 8.09", "daily log check". Read-only. Org and project come from configuration.
daily-activity-log
Use at end of day to file the Azure DevOps time-log Tasks — one closed Task per Activity worked that day, Original Estimate in decimal hours, parented to the current sprint's Feature. Fires on "log my day", "fill my tasks", "close my daily tasks", "I had 2h meetings and 4h development". Org and project come from configuration.
conventional-commits
Write commit messages that follow the Conventional Commits specification so tooling can derive versions and changelogs.