Skip to content

fix: skill builder ctrl+i keybind, ESC navigation, docs screenshots#386

Merged
anandgupta42 merged 5 commits intomainfrom
fix/skill-builder-keybind-esc-docs
Mar 23, 2026
Merged

fix: skill builder ctrl+i keybind, ESC navigation, docs screenshots#386
anandgupta42 merged 5 commits intomainfrom
fix/skill-builder-keybind-esc-docs

Conversation

@anandgupta42
Copy link
Contributor

@anandgupta42 anandgupta42 commented Mar 23, 2026

What does this PR do?

Fixes three issues with the skill builder TUI:

  1. ctrl+i global keybind — Adds skill_list keybind (default ctrl+i) so users can open the skill browser from anywhere, not just via /skills slash command
  2. ESC navigation in sub-dialogs — ESC in Create and Install panels now returns to the skill list instead of closing all dialogs and jumping back to main. Uses the same onClose callback pattern as the action picker.
  3. Documentation screenshots — Adds real TUI screenshots captured via VHS to skills.md

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • Documentation update

Issue for this PR

Closes #385

How did you verify your code works?

  • Typecheck passes (bun run typecheck — no new errors, all pre-existing in test files)
  • Marker check passes (bun run script/upstream/analyze.ts --markers --base main --strict)
  • Verified keybind system: global ctrl+i skips when dialog is open (dialog.stack.length > 0 guard in dialog-command.tsx:62), so no conflict with local ctrl+i for "install" inside the skill browser
  • Verified ESC flow: dialog.replace() with onClose callback follows the exact same pattern used by the action picker (dialog-skill.tsx:512)

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code where necessary
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Added global keyboard shortcut (Ctrl+I) to open the skill browser from anywhere.
    • Added shortcuts to create (Ctrl+N) and install (Ctrl+I) skills within the browser.
    • Made the skill browser shortcut configurable.
  • Documentation

    • Updated TUI documentation with screenshots and revised keyboard shortcut reference guide.

…and docs screenshots

- Add `skill_list` keybind (default `ctrl+i`) to open skill browser globally
- Fix ESC in Create/Install sub-dialogs to return to skill list instead of main
- Remove dead `onCancel` callbacks from `DialogSkillCreate` and `DialogSkillInstall`
- Add TUI screenshots to skills documentation

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link

@claude claude bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This repository is configured for manual code reviews. Comment @claude review to trigger a review.

Tip: disable this comment in your organization's Code Review settings.

@coderabbitai
Copy link

coderabbitai bot commented Mar 23, 2026

Warning

Rate limit exceeded

@anandgupta42 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 9 minutes and 54 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: b421982b-1d64-4590-ae91-caa23d06912d

📥 Commits

Reviewing files that changed from the base of the PR and between 5b4a798 and bc0d8b3.

📒 Files selected for processing (3)
  • docs/docs/configure/skills.md
  • packages/opencode/src/cli/cmd/tui/component/dialog-skill.tsx
  • packages/opencode/test/altimate/training-import.test.ts
📝 Walkthrough

Walkthrough

This change implements a global ctrl+i keybinding to open the skill browser from anywhere, fixes ESC navigation in create/install sub-dialogs to return to the skill list rather than closing all dialogs, and adds documentation with screenshots for the skill builder interface.

Changes

Cohort / File(s) Summary
Configuration & Keybinding Setup
packages/opencode/src/config/config.ts, packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx
Added skill_list keybind configuration field with ctrl+i default, and registered it as the keybind property for the Skills command to enable global activation.
Dialog Flow & Navigation
packages/opencode/src/cli/cmd/tui/component/dialog-skill.tsx
Removed onCancel handlers from create/install sub-dialogs and updated ctrl+n/ctrl+i keybind actions to schedule asynchronous reopening of the skill list via setTimeout after dialog replacement, fixing ESC navigation behavior.
Documentation
docs/docs/configure/skills.md
Updated TUI documentation to describe the new global ctrl+i shortcut, added screenshots for skill browser, create-skill, and install-skill dialogs, and added dedicated sections explaining skill creation (ctrl+n) and installation workflows.

Sequence Diagram(s)

sequenceDiagram
    actor User
    participant KeybindHandler
    participant DialogManager
    participant SkillBrowser
    participant CreateDialog
    
    User->>KeybindHandler: Press ctrl+i
    KeybindHandler->>DialogManager: Replace with SkillBrowser
    DialogManager->>SkillBrowser: Display skill list
    
    User->>SkillBrowser: Press ctrl+n
    SkillBrowser->>DialogManager: Replace with CreateDialog<br/>(schedule reopenSkillList)
    DialogManager->>CreateDialog: Display create form
    
    User->>CreateDialog: Press ESC or submit
    CreateDialog->>DialogManager: Close dialog
    DialogManager->>SkillBrowser: Reopen skill list<br/>(via setTimeout)
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

Suggested labels

contributor

Poem

🐰 A rabbit hops with joy today,
ctrl+i shortcuts light the way!
Skills dance back when ESC is pressed,
Navigation flows from best to best! 🌟

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the three main changes: ctrl+i keybind, ESC navigation, and documentation screenshots.
Description check ✅ Passed The description covers all required template sections: summary, type of change, linked issue, verification steps, and checklist with all items completed.
Linked Issues check ✅ Passed All three objectives from issue #385 are met: global ctrl+i keybind added, ESC navigation fixed to return to skill list, and TUI screenshots added to documentation.
Out of Scope Changes check ✅ Passed All changes directly address the three stated objectives; no unrelated modifications to keybinding system, dialog navigation, or documentation were introduced.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/skill-builder-keybind-esc-docs

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/docs/configure/skills.md`:
- Around line 123-135: Update the wording around the ctrl+i shortcut in the
Skill Browser docs to narrow its scope: remove claims like "from anywhere" and
"global shortcut" and state that ctrl+i opens the skill browser but is
intentionally ignored when another dialog is open so the browser's local
"Install" binding may take precedence; also clarify that typing `/skills` in the
prompt always opens the browser. Reference the ctrl+i key, the Install local
binding, and the `/skills` prompt command when editing the text and screenshot
caption.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 3a880fbb-5bc3-4678-ab87-c9344c67fd53

📥 Commits

Reviewing files that changed from the base of the PR and between d1e8419 and 5b4a798.

⛔ Files ignored due to path filters (3)
  • docs/docs/assets/images/skills/tui-skill-browser.png is excluded by !**/*.png
  • docs/docs/assets/images/skills/tui-skill-create.png is excluded by !**/*.png
  • docs/docs/assets/images/skills/tui-skill-install.png is excluded by !**/*.png
📒 Files selected for processing (4)
  • docs/docs/configure/skills.md
  • packages/opencode/src/cli/cmd/tui/component/dialog-skill.tsx
  • packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx
  • packages/opencode/src/config/config.ts

anandgupta42 and others added 4 commits March 22, 2026 17:45
…ng, comments

- Narrow ctrl+i docs scope: "when no other dialog is open" (CodeRabbit)
- Merge duplicate ctrl+i rows in keybind table (consensus review)
- Move dialog.clear() after validation in Create/Install onConfirm (Gemini)
- Add explanatory comments for setTimeout tick deferral pattern

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Fix `TrainingStore.count` mock: replace invalid `naming` key with `rule`, add missing `context`
- Fix `fs.readFile` mock: return `Buffer.from()` instead of raw string

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@anandgupta42 anandgupta42 merged commit 8d5804f into main Mar 23, 2026
9 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: skill builder — ctrl+i global keybind, ESC navigation, and missing docs screenshots

1 participant