Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

cli-feature

БесплатноБез исполняемых скриптовНе проверен

Add a new command or TUI view to the WhoDB CLI

clideyот clidey★ 5 073 звезды на GitHub

Об этом скилле

Add a CLI Feature

Adding a New Command

1. Create Command File

cli/cmd/<name>.go:

package cmd

import "github.com/spf13/cobra"

var <name>Cmd = &cobra.Command{
    Use:   "<name>",
    Short: "Description",
    RunE: func(cmd *cobra.Command, args []string) error {
        // Implementation using database.Manager
        return nil
    },
}

func init() {
    rootCmd.AddCommand(<name>Cmd)
}

2. Key Rules

  • Use database.Manager for all DB operations (direct plugin access, not GraphQL)
  • Identity-driven text: write whodb in command examples; use pkg/identity helpers for display names and home-dir paths, never hardcode edition-specific names
  • Structured output: use pkg/output writers (table/json/csv/ndjson) for machine-readable commands
  • Keep main.go thin — it calls the shared runtime, nothing else

3. Verification

cd cli && go build . && go vet ./...

Adding a New TUI View

1. Create View File

cli/internal/tui/<name>_view.go:

Implement the Bubble Tea model interface:

  • Init() tea.Cmd
  • Update(msg tea.Msg) (tea.Model, tea.Cmd)
  • View() string

2. Add to MainModel

  • Add view mode to cli/internal/tui/model.go
  • Add navigation in Update()
  • Use pkg/styles for consistent rendering

3. Key Patterns

  • Vim-like navigation (hjkl)
  • Tab for view switching
  • Esc for going back
  • Don't use lipgloss Padding with viewport output (use manual prefix)
  • Use database.Manager for data access

4. Verification

cd cli && go test ./internal/tui/... && go build .

Установить cli-feature в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл cli-feature?

Add a new command or TUI view to the WhoDB CLI

Как установить скилл cli-feature?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл cli-feature запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить cli-feature с