Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -557,6 +557,32 @@ lk docs --server-url https://docs-staging.example.com/mcp/ search "agents"
lk docs --server-url https://docs-abc123.vercel.app/mcp/ --vercel-header <token> overview
```

## Coding agent skills

`lk skills` installs LiveKit's [agent skills](https://github.com/livekit/agent-skills) into your coding agents (Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Windsurf, Amp, Cline, Goose), and adds the [LiveKit Docs MCP server](https://docs.livekit.io/intro/mcp-server/) to their MCP config.

```shell
# Install every skill and the Docs MCP server for the agents detected on this machine
lk skills install

# Only some agents, or user-wide instead of the current project
lk skills install --agent claude-code --agent codex
lk skills install --global

# See what's installed, whether it's current, and Docs MCP setup
lk skills list

# Pull the latest skills
lk skills update

# Uninstall
lk skills remove
```

Skills are copied (not symlinked) into each agent's skills directory; agents that read the shared `.agents/skills` directory get one copy. Installs are recorded in `skills-lock.json` (commit it with the skills), or `~/.agents/.skill-lock.json` with `--global`. These are the same lock files [`npx skills`](https://github.com/vercel-labs/skills) and `gh skill` use, so any of the three tools can update what another installed. Skills you've edited locally are never overwritten unless you pass `--force`.

`lk agent init` offers to install skills into new agent projects for the coding agents on your machine; pass `--skills=false` to skip.

## Additional notes

### Parameter precedence
Expand Down
9 changes: 8 additions & 1 deletion cmd/lk/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,7 @@ On LiveKit Cloud: "create" and "deploy" ship it, then "status", "logs",
Flags: []cli.Flag{
regionFlag,
installFlag,
skillsSetupFlag,
},
ArgsUsage: "[AGENT-NAME]",
DisableSliceFlagSeparator: true,
Expand Down Expand Up @@ -634,7 +635,13 @@ func initAgent(ctx context.Context, cmd *cli.Command) error {
if shouldDeploy {
cmd.Set("install", "true")
}
if err := setupTemplate(ctx, cmd); err != nil {
if err := setupTemplateWith(ctx, cmd, func(ctx context.Context, cmd *cli.Command, dir string) error {
// Best-effort, like dependency install: the project is still usable.
if err := setupProjectSkills(ctx, cmd, dir); err != nil {
out.Warnf("Couldn't install coding agent skills: %v\nRun %s in ./%s to try again.", err, "lk skills install", dir)
}
return nil
}); err != nil {
return err
}
// Deploy if requested
Expand Down
11 changes: 11 additions & 0 deletions cmd/lk/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,12 @@ func listTemplates(ctx context.Context, cmd *cli.Command) error {
}

func setupTemplate(ctx context.Context, cmd *cli.Command) error {
return setupTemplateWith(ctx, cmd, nil)
}

// setupTemplateWith is setupTemplate with a step that runs after dependencies
// are installed, before the template's post-create output.
func setupTemplateWith(ctx context.Context, cmd *cli.Command, afterInstall func(ctx context.Context, cmd *cli.Command, dir string) error) error {
verbose := cmd.Bool("verbose")
install := cmd.Bool("install")
isSandbox := sandboxID != ""
Expand Down Expand Up @@ -468,6 +474,11 @@ func setupTemplate(ctx context.Context, cmd *cli.Command) error {
os.Setenv("LIVEKIT_DEPS_INSTALLED", "1")
}
}
if afterInstall != nil {
if err := afterInstall(ctx, cmd, appName); err != nil {
return err
}
}
if err := doPostCreate(ctx, cmd, appName, verbose); err != nil {
return err
}
Expand Down
3 changes: 2 additions & 1 deletion cmd/lk/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ Docs: https://docs.livekit.io/intro/basics/cli/`,
app.Commands = append(app.Commands, AnalyticsCommands...)
app.Commands = append(app.Commands, CloudCommands...)
app.Commands = append(app.Commands, DocsCommands...)
app.Commands = append(app.Commands, SkillsCommands...)
app.Commands = append(app.Commands, ProjectCommands...)
app.Commands = append(app.Commands, WorkspaceCommands...)
app.Commands = append(app.Commands, UserCommands...)
Expand Down Expand Up @@ -279,7 +280,7 @@ var rootHelpGroups = []struct {
{"PROJECTS", []string{"project", "cloud", "app"}},
{"ROOMS AND MEDIA", []string{"room", "token", "dispatch", "egress", "ingress"}},
{"TELEPHONY", []string{"sip", "number"}},
{"TOOLS", []string{"docs", "perf"}},
{"TOOLS", []string{"docs", "skills", "perf"}},
}

// agentHelpSections groups a command's visible subcommands by Category, in
Expand Down
Loading
Loading