Agent skill

Adding Keyboard Shortcuts

by lobehub in lobehub/lobehub

Walks through adding a keyboard shortcut to LobeHub: the id type, default registration, translation text, the hook and an optional tooltip, plus scope and conflict advice.

Custom licenceAuto-check passedFrontend & Design

Install Adding Keyboard Shortcuts

skills CLI
$ npx skills add lobehub/lobehub --skill hotkey -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install lobehub/lobehub hotkey --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/lobehub/lobehub.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/hotkey .claude/skills/hotkey && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
hotkey
GitHub stars
83k
Token cost
~647 tokens
SKILL.md length
150 words
Files
1
Skills in repo
50
Repo updated
First seen
Licence
Custom licence

At a glance

Walks through adding a keyboard shortcut to LobeHub: the id type, default registration, translation text, the hook and an optional tooltip, plus scope and conflict advice.

  • Works in 5 steps: Update Hotkey Constant → Register Default Hotkey → Add i18n Translation → …
  • Adding a new keyboard shortcut to the app
  • SKILL.md covers Steps to Add a New Hotkey, Best Practices and Troubleshooting
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

The skill lists five steps for adding a hotkey. First add the new id to the HotkeyId union in the shared types package, which HotkeyEnum is typed against. Then register the default in the constants package by adding an entry to HotkeyEnum and HOTKEYS_REGISTRATION, using the KeyEnum and combineKeys defined in that file. Next add a title and description translation in the locales package, create and register a hook in the chat scope file that calls useHotkeyById, and optionally show the shortcut in a Tooltip using the user store's hotkey selector.

Best practices are to choose global or chat scope by function, place the shortcut in the right group such as System, Layout or Conversation, check for conflicts with system and browser shortcuts, use KeyEnum.Mod instead of hardcoded Ctrl or Cmd, and write a clear title and description. A troubleshooting list covers a hotkey that does nothing, where you check scope and the RegisterHotkeys hook, one missing from settings, where you check HOTKEYS_REGISTRATION, and conflicts, which the HotkeyInput component warns about.

When your agent uses it

  • Adding a new keyboard shortcut to the app
  • Debugging a shortcut that does not fire or is missing from settings
  • Choosing a shortcut scope and checking for key conflicts

Example prompts

  • “Add a save-topic shortcut and register it in the chat scope.”
  • “My new hotkey does nothing on the settings page. Check its scope and registration.”
  • “Show the shortcut in the tooltip of the new-topic button.”

Requirements

  • A checkout of the LobeHub repository

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. Update Hotkey Constant
  2. Register Default Hotkey
  3. Add i18n Translation
  4. Create and Register Hook
  5. Add Tooltip (Optional)

What it can do on your machine

Read from SKILL.md and the folder at commit 6aaeeee. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are typescript).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Adding Keyboard Shortcuts loads about 647 tokens when it runs. Until then it costs about 27 tokens; SKILL.md has 150 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~27
When it runs · the whole SKILL.md, loaded when a task matches
~647

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

Its licence (Custom licence) doesn't allow us to republish the file, so here is its outline and opening line. It has 150 words (~647 tokens).

“In packages/types/src/hotkey.ts, add the new id to the HotkeyId union — it's the source of truth HotkeyEnum is typed against:”

— opening of SKILL.md by lobehub, Custom licence
name
hotkey
user-invocable
false

Read the full SKILL.md on GitHub

Files

Just SKILL.md in .agents/skills/hotkey of lobehub/lobehub.

Open the folder on GitHubat commit 6aaeeee

Compare with similar skills

Adding Keyboard Shortcuts next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Adding Keyboard Shortcuts compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Adding Keyboard Shortcuts this skilllobehub/lobehub83k—~647Automated safety check: PassCustom licence
React Frontend Development Guidelinesdiet103/claude-code-infrastructure-showcase10k2 repos~2.9kAutomated safety check: PassMIT
Create Docsvictorgarciaesgi/nuxt-typed-router4132 repos~2.8kAutomated safety check: PassMIT
Tabler Bootstrap Component Rulestabler/tabler42k—~2.2kAutomated safety check: PassMIT
Building With Lobe UIlobehub/lobe-ui2.2k—~2kAutomated safety check: PassMIT
Senior FrontendOhh-889/skyroc7952 repos~1.1kAutomated safety check: NotesMIT

Similar skills

  • React Frontend Development Guidelines

    diet103/claude-code-infrastructure-showcase

    Guidelines for React 18 and TypeScript apps covering Suspense data fetching, lazy loading, feature folders, MUI v7 styling, TanStack Router and performance.

    10k GitHub starsUsed in 2 repos~2.9k tokens
    Frontend & DesignAuto-check passed
  • Create Docs

    victorgarciaesgi/nuxt-typed-router

    Create complete documentation sites for projects. An agent skill from victorgarciaesgi/nuxt-typed-router.

    413 GitHub starsUsed in 2 repos~2.8k tokens
    Frontend & DesignAuto-check passed
  • Sets the file structure, typing and Data API pattern for writing a new Bootstrap-style JavaScript component class in Tabler's vendored port of Bootstrap's JS.

    42k GitHub stars~2.2k tokensUpdated yesterday
    Frontend & DesignAuto-check passed
  • Building With Lobe UI

    lobehub/lobe-ui

    Build UI with the LobeHub design ecosystem — @lobehub/ui (plus its base-ui, chat, mobile, awesome, brand, mdx, i18n namespaces), @lobehub/icons, @lobehub/charts, @lobehub/fluent-emoji and…

    2.2k GitHub stars~2k tokensUpdated yesterday
    Frontend & DesignAuto-check passed
  • Senior Frontend

    Ohh-889/skyroc

    Comprehensive frontend development skill for building modern, performant web applications using ReactJS, NextJS, TypeScript, Tailwind CSS.

    795 GitHub starsUsed in 2 repos~1.1k tokens
    Frontend & DesignAuto-check: notes
  • Phoenix Frontend

    Arize-ai/phoenix

    Frontend development guidelines for the Phoenix AI observability platform.

    12k GitHub stars~709 tokensUpdated today
    Frontend & DesignAuto-check passed

More from lobehub/lobehub

All 50 skills in this repo
  • Builds single-file interactive HTML prototypes rendered with the real LobeHub UI components and written as production-style React, so they can later be split into files.

    83k GitHub stars~1.6k tokensUpdated today
    Auto-check passed
  • Verifies a delivery end to end by driving the real product on a CLI, web, desktop or iOS Simulator surface, capturing evidence and publishing a round with the lh CLI.

    83k GitHub stars~9.7k tokensUpdated today
    Auto-check passed
  • Git Worktree Cleanup

    lobehub/lobehub

    Audits stale Git worktrees and branches with a bundled script, classifies each one, and deletes only after you approve the exact candidates.

    83k GitHub stars~2.8k tokensUpdated today
    Auto-check passed
  • Maintains LobeHub's model-backed alint rule set: writing rules, removing false positives against real code, deciding warn versus error and tracking token cost.

    83k GitHub stars~1.9k tokensUpdated today
    Auto-check passed
  • Guides building LobeHub builtin agent tools, from the manifest and execution runtime to executors, chat UI renders and registry wiring.

    83k GitHub stars~2.4k tokensUpdated today
    Auto-check passed
  • Explains how LobeHub client code fetches data through services, SWR store hooks and cache keys, and when to avoid useEffect fetching or duplicated state.

    83k GitHub stars~1.7k tokensUpdated today
    Auto-check passed

Works with

Questions about Adding Keyboard Shortcuts

What does Adding Keyboard Shortcuts do?

Walks through adding a keyboard shortcut to LobeHub: the id type, default registration, translation text, the hook and an optional tooltip, plus scope and conflict advice. The skill lists five steps for adding a hotkey. First add the new id to the HotkeyId union in the shared types package, which HotkeyEnum is typed against.

When should I use Adding Keyboard Shortcuts?

Adding Keyboard Shortcuts fits situations like: adding a new keyboard shortcut to the app; debugging a shortcut that does not fire or is missing from settings; choosing a shortcut scope and checking for key conflicts.

How do I install Adding Keyboard Shortcuts in Claude Code?

Run `npx skills add lobehub/lobehub --skill hotkey -a claude-code`. Or copy the skill folder (.agents/skills/hotkey in lobehub/lobehub) into .claude/skills/hotkey in your project. Claude Code loads it when a task matches its description.

How do I install Adding Keyboard Shortcuts in Codex?

Run `npx skills add lobehub/lobehub --skill hotkey -a codex`. Or copy the skill folder (.agents/skills/hotkey in lobehub/lobehub) into .agents/skills/hotkey in your project. Codex loads it when a task matches its description.

Can I use Adding Keyboard Shortcuts in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add lobehub/lobehub --skill hotkey -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/hotkey, .gemini/skills/hotkey, .github/skills/hotkey and .opencode/skills/hotkey in your project.

What does Adding Keyboard Shortcuts need to run?

SKILL.md names no scripts, command-line tools or credentials: Adding Keyboard Shortcuts is instructions for the agent only. Our summary lists: A checkout of the LobeHub repository.

Does Adding Keyboard Shortcuts access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Adding Keyboard Shortcuts safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Adding Keyboard Shortcuts use?

Adding Keyboard Shortcuts has a licence file (the repository's licence) that doesn't match a standard licence. Read it on GitHub before reusing the skill.

How many tokens does Adding Keyboard Shortcuts use?

About 647 tokens (SKILL.md is roughly 2.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Adding Keyboard Shortcuts?

Skills that share tags, products or a category with Adding Keyboard Shortcuts: React Frontend Development Guidelines (diet103/claude-code-infrastructure-showcase, 10k stars), Create Docs (victorgarciaesgi/nuxt-typed-router, 413 stars), Tabler Bootstrap Component Rules (tabler/tabler, 42k stars) and Building With Lobe UI (lobehub/lobe-ui, 2.2k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Adding Keyboard Shortcuts?

lobehub (a GitHub organization) maintains it in lobehub/lobehub, which has 83,044 GitHub stars. The repository holds 50 skills in this directory. The repository was last updated on October 8, 2026.

Source: lobehub/lobehub on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.