Skip to content

feat(skills): offer to install skills on first run - #1056

Open
JackNDwyer wants to merge 2 commits into
mainfrom
jackdwyer/devx-843-first-run-skills-prompt
Open

JackNDwyer wants to merge 2 commits into
mainfrom
jackdwyer/devx-843-first-run-skills-prompt

Conversation

@JackNDwyer

@JackNDwyer JackNDwyer commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

What

  • On a run in a terminal, if a coding agent is on the machine and no LiveKit skills are installed (globally or in the current project), lk asks once whether to install them globally. Yes runs the same install as lk skills install --global.
  • It runs before any command, ahead of sign-in, so API-key, lk project add and self-hosted users see it too.
  • It never blocks a non-interactive run. Without a terminal, or with --yes (for example, a coding agent calling lk), it prints a one-line tip instead. CI, --quiet, --json and LK_NO_SKILLS_PROMPT=1 skip it entirely.
  • The answer is saved in the CLI config (skills_prompted), so it's asked only once. Declining also stops the tip.
  • It skips the skills commands, help, version and completion, and lk agent init, which has its own skills offer.
  • An install failure is reported as a warning, and the command the user ran still runs.

Why

Coding agents building LiveKit agents often don't have LiveKit's skills (DEVX-840), especially when starting from an empty folder, where no repo file can point them there. This installs the skills when the CLI is first used, however it was installed (Homebrew can't run this step itself). Ticket: DEVX-843. The cross-platform curl installer from the same ticket is in #1057.

Pairs with the template-side change in livekit-examples/agent-starter-python#114 and livekit-examples/agent-starter-node#75.

How to verify

  1. Build this branch and, in a terminal, run any command with a fresh home folder that has a coding agent's config folder: HOME=$(mktemp -d) sh -c 'mkdir $HOME/.claude && lk token create --list --api-key k --api-secret s'. Expect the prompt. Yes installs seven skills into ~/.claude/skills and adds the Docs MCP server, then the command runs. No prints a skip line, then the command runs.
  2. Run it again with the same HOME: no prompt.
  3. Run with </dev/null (no terminal) on a fresh HOME: one Tip: line on stderr, no prompt. Add --quiet, CI=1 or LK_NO_SKILLS_PROMPT=1: no tip.

Unit tests cover the decision table, the installed-skills check, and resolving the leaf command from the root Before hook. I tested both prompt answers and the non-interactive paths with a local build; the prompt was driven through script rather than a real terminal.

🤖 Generated with Claude Code

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Comment thread cmd/lk/skills_prompt.go Outdated
out.Warnf("Couldn't save your answer to the CLI config: %v", perr)
}
}
if err != nil || !ok {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This also catches huh.ErrUserAborted, so Ctrl+C = permanent no but command still runs.

Repro w/ lk token create: and Ctrl+C at the prompt, the token still gets created and skills_prompted: true gets written. I feeel like this would be bad if the command was lk agent deploy?

IMO check for the abort first, skip persisting, and return an err so initLogger stops the command (confirmUntracked already does this for the same case).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks @ShayneP. I’ll fix it: check for huh.ErrUserAborted first, don’t save the answer, and return the error so initLogger stops the command (same as confirmUntracked).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This now handles your change request: Ctrl+C at the skills prompt cancels the command and doesn't save an answer. I verified that with your lk token create repro, and tests pass

JackNDwyer and others added 2 commits October 21, 2026 13:28
When a coding agent is on the machine and no LiveKit skills are
installed, lk asks once, in a terminal, whether to install them globally
(lk skills install --global). It runs before any sign-in, so API-key and
self-hosted users see it too. Runs without a terminal or with --yes print
a one-line tip instead and never wait for input; CI, --quiet, --json and
LK_NO_SKILLS_PROMPT=1 skip it entirely. The answer is saved in the CLI
config so it's asked only once.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Cancelling the first-run skills prompt with Ctrl+C was treated as a
permanent no: the answer was saved and the command went on to run. Now
it cancels the command, like any other lk prompt, and nothing is saved,
so the prompt comes back next time. A prompt that fails to show is also
no longer saved as an answer.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants